Bug #26012
openChanging location of a VM via hammer fails if VMWare hot plugin is enabled.
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1596662
Description of problem: Changing location of a VM via hammer fails if VMWare hot plugin feature is enabled and VM is powered ON.
Basically if satellite is not able to verify all vm attributes in a compute resource, it won't allow to update the host of that compute resource.
NOTE: Same is possible via GUI from bulk actions.
Case 1 -
For VMWare (VM is on and hot plugin is enabled on both satellite as well as VMWare)-
- hammer host update --name=hostname --location=$LOC
Could not update the host:
Failed to update a compute $COMPUTE_RESOURCE (VMware) instance $INSTANCE_NAME: InvalidPowerState: The attempted operation cannot be performed in the current state (Powered on).
Case 2
For libvirt (if communication breaks from satellite to KVM)
- hammer host update --name=hostname --location=$LOC
Failed to create a compute $COMPUTE_RESOURCE (Libvirt) instance $INSTANCE_NAME: undefined method `name' for nil:NilClass
Version-Release number of selected component (if applicable):
hammer (0.11.0.1)
* hammer_cli_csv (unknown version)
* hammer_cli_foreman (0.11.0.5)
* hammer_cli_foreman_admin (0.0.8)
* hammer_cli_foreman_bootdisk (0.1.3.3)
* hammer_cli_foreman_discovery (1.0.0)
* hammer_cli_foreman_docker (unknown version)
* hammer_cli_foreman_openscap (unknown version)
* hammer_cli_foreman_remote_execution (unknown version)
* hammer_cli_foreman_tasks (unknown version)
* hammer_cli_foreman_virt_who_configure (unknown version)
* hammer_cli_katello (0.11.3.5)
How reproducible: Always
Steps to Reproduce:
1. Update host location via hammer. Host should be a VMWare host and hotplugin feature should be enabled from both satellite and VMWare end.
2. Update host location via hammer. Host should be a KVM host and compute resource should not be accessible.
3.
Actual results: Host update failed.
Expected results: Host update should succeed.
Additional info:
Updated by Tomer Brisker over 5 years ago
- Subject changed from Changing location of a VM via hammer fails if VMWare hot plugin is enabled. to Changing location of a VM via hammer fails if VMWare hot plugin is enabled.
- Priority changed from Urgent to Normal