{"action":"created","issue":{"url":"https://api.github.com/repos/ytti/oxidized/issues/196","labels_url":"https://api.github.com/repos/ytti/oxidized/issues/196/labels{/name}","comments_url":"https://api.github.com/repos/ytti/oxidized/issues/196/comments","events_url":"https://api.github.com/repos/ytti/oxidized/issues/196/events","html_url":"https://github.com/ytti/oxidized/issues/196","id":108460026,"number":196,"title":"poor error handling if debug log is not writable","user":{"login":"nickhilliard","id":807258,"avatar_url":"https://avatars.githubusercontent.com/u/807258?v=3","gravatar_id":"","url":"https://api.github.com/users/nickhilliard","html_url":"https://github.com/nickhilliard","followers_url":"https://api.github.com/users/nickhilliard/followers","following_url":"https://api.github.com/users/nickhilliard/following{/other_user}","gists_url":"https://api.github.com/users/nickhilliard/gists{/gist_id}","starred_url":"https://api.github.com/users/nickhilliard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickhilliard/subscriptions","organizations_url":"https://api.github.com/users/nickhilliard/orgs","repos_url":"https://api.github.com/users/nickhilliard/repos","events_url":"https://api.github.com/users/nickhilliard/events{/privacy}","received_events_url":"https://api.github.com/users/nickhilliard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-26T12:15:15Z","updated_at":"2015-09-26T12:24:53Z","closed_at":null,"body":""},"comment":{"url":"https://api.github.com/repos/ytti/oxidized/issues/comments/143431519","html_url":"https://github.com/ytti/oxidized/issues/196#issuecomment-143431519","issue_url":"https://api.github.com/repos/ytti/oxidized/issues/196","id":143431519,"user":{"login":"nickhilliard","id":807258,"avatar_url":"https://avatars.githubusercontent.com/u/807258?v=3","gravatar_id":"","url":"https://api.github.com/users/nickhilliard","html_url":"https://github.com/nickhilliard","followers_url":"https://api.github.com/users/nickhilliard/followers","following_url":"https://api.github.com/users/nickhilliard/following{/other_user}","gists_url":"https://api.github.com/users/nickhilliard/gists{/gist_id}","starred_url":"https://api.github.com/users/nickhilliard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickhilliard/subscriptions","organizations_url":"https://api.github.com/users/nickhilliard/orgs","repos_url":"https://api.github.com/users/nickhilliard/repos","events_url":"https://api.github.com/users/nickhilliard/events{/privacy}","received_events_url":"https://api.github.com/users/nickhilliard/received_events","type":"User","site_admin":false},"created_at":"2015-09-26T12:24:53Z","updated_at":"2015-09-26T12:24:53Z","body":"The error handling for debug log opening is messed up.  Instead of returning fail up the stack, it should either die or else warn on STDERR that it cannot open the debug log file for writing.  At the moment, it simply returns fail up the stack which is trapped by \"Oxidized::Script\" as \"unable to connect\".  This is completely misleading about the root cause of the problem. \r\n\r\n```\r\n# chown rancid /tmp/oxidized.log-*\r\n# ls -la /tmp/oxidized.log-*\r\n-rw-r--r--  1 rancid  wheel   843 26 Sep 13:17 /tmp/oxidized.log-ssh\r\n-rw-r--r--  1 rancid  wheel  1600 26 Sep 13:13 /tmp/oxidized.log-telnet\r\n# su - oxidized\r\n$ oxs switchname 'show version'\r\nunable to connect\r\n/usr/local/lib/ruby/gems/2.1/gems/oxidized-script-0.1.1/lib/oxidized/script/script.rb:108:in `connect': unable to connect (Oxidized::Script::NoConnection)\r\n\tfrom /usr/local/lib/ruby/gems/2.1/gems/oxidized-script-0.1.1/lib/oxidized/script/script.rb:87:in `initialize'\r\n\tfrom /usr/local/lib/ruby/gems/2.1/gems/oxidized-script-0.1.1/lib/oxidized/script/cli.rb:69:in `new'\r\n\tfrom /usr/local/lib/ruby/gems/2.1/gems/oxidized-script-0.1.1/lib/oxidized/script/cli.rb:69:in `connect'\r\n\tfrom /usr/local/lib/ruby/gems/2.1/gems/oxidized-script-0.1.1/lib/oxidized/script/cli.rb:11:in `run'\r\n\tfrom /usr/local/lib/ruby/gems/2.1/gems/oxidized-script-0.1.1/bin/oxs:5:in `<top (required)>'\r\n\tfrom /usr/local/bin/oxs:23:in `load'\r\n\tfrom /usr/local/bin/oxs:23:in `<main>'\r\n$ ^D\r\n# chown oxidized  /tmp/oxidized.log-*\r\n# su - oxidized\r\n$ ls -la /tmp/oxidized.log-*\r\n-rw-r--r--  1 oxidized  wheel   843 Sep 26 13:17 /tmp/oxidized.log-ssh\r\n-rw-r--r--  1 oxidized  wheel  1600 Sep 26 13:13 /tmp/oxidized.log-telnet\r\n$ oxs switchname 'show version'\r\nSwitch      : 800546-00-06 yyyyy-xxxxx Rev 6.0 BootROM: xxxx    IMG: 15.x.x.x\r\nPSU-1       : Internal PSU-1 800462-00-06 yyyyy-xxxxx\r\nPSU-2       : Internal PSU-2 800462-00-04 yyyyy-xxxxx\r\n\r\nImage   : ExtremeXOS version 15.x.x.x v15xxxx by release-manager\r\nBootROM : x.x\r\nDiagnostics : x.x\r\n$\r\n```"}}