{"action":"created","issue":{"url":"https://api.github.com/repos/bloomberg/chef-bcpc/issues/587","labels_url":"https://api.github.com/repos/bloomberg/chef-bcpc/issues/587/labels{/name}","comments_url":"https://api.github.com/repos/bloomberg/chef-bcpc/issues/587/comments","events_url":"https://api.github.com/repos/bloomberg/chef-bcpc/issues/587/events","html_url":"https://github.com/bloomberg/chef-bcpc/pull/587","id":78261050,"number":587,"title":"Clean up Chef run output","user":{"login":"erhudy","id":1065271,"avatar_url":"https://avatars.githubusercontent.com/u/1065271?v=3","gravatar_id":"","url":"https://api.github.com/users/erhudy","html_url":"https://github.com/erhudy","followers_url":"https://api.github.com/users/erhudy/followers","following_url":"https://api.github.com/users/erhudy/following{/other_user}","gists_url":"https://api.github.com/users/erhudy/gists{/gist_id}","starred_url":"https://api.github.com/users/erhudy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erhudy/subscriptions","organizations_url":"https://api.github.com/users/erhudy/orgs","repos_url":"https://api.github.com/users/erhudy/repos","events_url":"https://api.github.com/users/erhudy/events{/privacy}","received_events_url":"https://api.github.com/users/erhudy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-19T21:40:02Z","updated_at":"2015-05-20T15:21:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bloomberg/chef-bcpc/pulls/587","html_url":"https://github.com/bloomberg/chef-bcpc/pull/587","diff_url":"https://github.com/bloomberg/chef-bcpc/pull/587.diff","patch_url":"https://github.com/bloomberg/chef-bcpc/pull/587.patch"},"body":"This PR eliminates a lot of extraneous noise during Chef runs:\r\n* anywhere `puts` was used has been replaced by a call to `Chef::Log` and an appropriate log level (usually **info**)\r\n* invocations of `mysql` now receive their password via the `MYSQL_PWD` environment variable rather than the `-p` switch, which suppresses the warning about using a password on the command line\r\n* guards that were created as `if` or `if not` statements inside a `ruby_block` resource type have been moved out of the main block into an `only_if` or `not_if` guard\r\n* command stdout and/or stderr was redirected to `/dev/null` in certain cases where the command is known to always output something that isn't needed (mostly used in cases where `nova-manage` is invoked to suppress the complaint about `oslo_config.log`)\r\n* added a guard on `load-virsh-keys`\r\n* rewrote `wait-for-mon-quorum` to have a timeout (`ruby_block` resources do not have a `:timeout` attribute of their own)"},"comment":{"url":"https://api.github.com/repos/bloomberg/chef-bcpc/issues/comments/103924253","html_url":"https://github.com/bloomberg/chef-bcpc/pull/587#issuecomment-103924253","issue_url":"https://api.github.com/repos/bloomberg/chef-bcpc/issues/587","id":103924253,"user":{"login":"erhudy","id":1065271,"avatar_url":"https://avatars.githubusercontent.com/u/1065271?v=3","gravatar_id":"","url":"https://api.github.com/users/erhudy","html_url":"https://github.com/erhudy","followers_url":"https://api.github.com/users/erhudy/followers","following_url":"https://api.github.com/users/erhudy/following{/other_user}","gists_url":"https://api.github.com/users/erhudy/gists{/gist_id}","starred_url":"https://api.github.com/users/erhudy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erhudy/subscriptions","organizations_url":"https://api.github.com/users/erhudy/orgs","repos_url":"https://api.github.com/users/erhudy/repos","events_url":"https://api.github.com/users/erhudy/events{/privacy}","received_events_url":"https://api.github.com/users/erhudy/received_events","type":"User","site_admin":false},"created_at":"2015-05-20T15:21:59Z","updated_at":"2015-05-20T15:21:59Z","body":"One little annoyance to note: on the very first run, since the guard on the initial MySQL setup for monitoring/head roles has a password in it and there is initially no password set, the guard will print to stderr\r\n`ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)`. This is fine because the guard still fails (as it should) and the database setup runs, and the message disappears on subsequent runs when the password is set. If we really want to get rid of this error, we can add the stderr->stdout redirects."}}