Executing update on ns3a-srv1-iad - this may take some time Executing update on ns2a-srv1-iad - this may take some time Executing update on ns4a-srv1-iad - this may take some time
ns4a.srv1.iad.dnsimple.com Stopping exabgp exabgp stopped Stopping erldnsimple erldnsimple stopped Running chef client Chef client exit status: 0 chef client run completed erldnsimple started Starting exabgp exabgp started Unsilencing Sensu sensu unsilenced for ns4a.srv1.iad.dnsimple.com
run chef-client and start it back up robot.respond /deploy nameserver (\w+-\w+-\w+)$/i, (msg) -> host = msg.match[1] callGoRemoteControl(msg, host, 'update')
def run_chef_client puts "Running chef client" o, e, s = Open3.capture3("chef-client") puts "Chef client exit status: #{s.exitstatus}" if s.exitstatus == 0 notify("chef client run completed", true) else notify("chef client run failed: #{e}", false) end end def main silence stop_exabgp stop_erldnsimple remove_erldnsimple_run_file run_chef_client || return while !erldnsimple_started? sleep 3 end if name_server_answering? puts "erldnsimple started" start_exabgp || return unsilence else puts "erldnsimple failed to start properly" end end if __FILE__==$0 main end