Skip to content

Commit

Permalink
Merge pull request #1221 from chef/ssd/no-log-pw
Browse files Browse the repository at this point in the history
Don't log rabbitmq password during migration 1.31
  • Loading branch information
stevendanna authored Apr 7, 2017
2 parents 954e17e + 1db7040 commit d9eea8c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
[rmq["management_user"], "management_password"]
].each do |name, passname|
pass = Partybus.config.secrets.get('rabbitmq', passname)
run_command("/opt/opscode/embedded/bin/rabbitmqctl change_password #{name} #{pass}")
run_command("/opt/opscode/embedded/bin/rabbitmqctl change_password #{name} #{pass}",
log_msg: "rabbitmq password upgrade for user #{name}")
end

stop_services(["rabbitmq"])
Expand Down
3 changes: 2 additions & 1 deletion omnibus/partybus/lib/partybus/migration_api/v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ def stop_services(service_array)
end

def run_command(command, options={})
log("\tRunning Command: #{command} with options #{options.inspect}")
log_msg = options[:log_msg] || "Running Command: #{command} with options #{options.inspect}"
log("\t#{log_msg}")
runner = Partybus::CommandRunner.new
runner.run_command(command, options)
end
Expand Down

0 comments on commit d9eea8c

Please sign in to comment.