Bug #4309
closed
hammer host start no longer powers on VMware host
Added by Matt Chesler almost 11 years ago.
Updated over 5 years ago.
Description
hammer host start --name <FQDN> worked properly to power on VMware host prior to Foreman 1.4.0 upgrade, now it exits with nothing printed to STDOUT/STDERR and an exit code of 65.
This is an RPM based installation, upgraded from Foreman 1.3.2
Relevant RPM versions:
ruby193-rubygem-fog.noarch 1.19.0-1.el6 @foreman
rubygem-hammer_cli.noarch 0.0.18-1.el6 @foreman
rubygem-hammer_cli_foreman.noarch 0.0.18-1.el6 @foreman
foreman.noarch 1.4.0-1.el6 @foreman
- Project changed from Foreman to Hammer CLI
- Category set to Foreman commands (obsolete)
- Status changed from New to Need more information
Could you please run hammer with -v, and also paste the contents of /var/log/foreman/production.log when running the command?
hammer -v output:
$ hammer -v host start --id 597
[ERROR 2014-02-11 09:23:36 Exception] <NilClass> nil
From /var/log/foreman/production.log:
Started PUT "/api/hosts/597/power" for 127.0.0.1 at 2014-02-11 09:23:36 -0500
Processing by Api::V2::HostsController#power as JSON
Parameters: {"apiv"=>"v2", "id"=>"597", "host"=>{}}
Authorized user admin(Admin User)
Completed 422 Unprocessable Entity in 29ms (Views: 0.4ms | ActiveRecord: 6.2ms)
- Status changed from Need more information to New
Looks like it's missing the power_action parameter for the API call. The API controller isn't returning the right format either for error messages, so I'll create an issue for that.
- Related to Bug #4315: Hosts power management API doesn't return standard error responses added
- Category changed from Foreman commands (obsolete) to Hosts
I tried to power on a VMware host on latest Foreman instance with hammer and it worked. Also hammer shows errors properly if there is any.
Closing the issue.
- Status changed from New to Closed
Also available in: Atom
PDF