Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1596662

Summary: Changing location of a VM via hammer fails if VMWare hot plugin is enabled.
Product: Red Hat Satellite Reporter: Shivdutt Bharadwaj <shbharad>
Component: Compute Resources - VMWareAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.3.1CC: akarimi, akarsale, apatel, bkearney, chrobert, dhlavacd, emil.sylvio.golinelli, kgaikwad, lhellebr, mbacovsk, mhulan, oezr, rabajaj, rajgupta, shisingh
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-15 16:57:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Shivdutt Bharadwaj 2018-06-29 12:04:42 UTC
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:

Comment 7 Marek Hulan 2019-02-07 13:51:30 UTC
Created redmine issue https://projects.theforeman.org/issues/26012 from this bug

Comment 11 Ondřej Ezr 2019-05-15 16:57:36 UTC
This one is duplicating a solved bug, closing as duplicate.

*** This bug has been marked as a duplicate of bug 1551014 ***