Bug 1910314

Summary: "hammer host update --id <id> --owner-id <id>" does not set new owner
Product: Red Hat Satellite Reporter: Phil Jasbutis <pjasbuti>
Component: HostsAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: tstrych
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.8.0CC: ahumbe, apatel, bhoefer, egolov, inecas, kgaikwad, oezr, ofedoren, rabajaj
Target Milestone: 6.10.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-hammer_cli_foreman-2.4.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 14:09:38 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 Phil Jasbutis 2020-12-23 12:03:53 UTC
Description of problem:

  Updating the owner of a host via 

   # hammer host update --id <host_id> --owner-id <owner_id>

  returns "Host updated." but changes are not applied.


Version-Release number of selected component (if applicable):

  tfm-rubygem-hammer_cli-2.1.2-1


How reproducible:

  # hammer host info --id 30 | grep 'Owner Id'
      Owner Id:   22

  # hammer host update --id 30 --owner-id 4
  Host updated.

  # hammer host info --id 30 | grep 'Owner Id'
      Owner Id:   22


Actual results:

  owner_id 22 is still assigned to host_id 30


Expected results:

  owner_id 4 should be assigned to host_id 30


Additional info:

  Worked fine on Satellite 6.7.x.

Comment 1 Oleh Fedorenko 2021-01-11 23:29:57 UTC
Created redmine issue https://projects.theforeman.org/issues/31609 from this bug

Comment 5 Bernie Hoefer 2021-05-03 14:22:01 UTC
Is there a postgresql command that will change the owner that we can use as a work-around?

Comment 7 tstrych 2021-06-17 10:41:38 UTC
Problem reproduced with 6.8.4 with package tfm-rubygem-hammer_cli_foreman-2.1.2.2-1.el7sat.noarch

BZ verified with 6.10 snap 4 with package tfm-rubygem-hammer_cli_foreman-2.5.1-1.el7sat.noarch

# hammer host update --id 3 --owner-id 6
Host updated.
# hammer host info --id 3 | grep 'Owner Id'
    Owner Id:   6
# hammer host update --id 3 --owner-id 5
Host updated.
# hammer host info --id 3 | grep 'Owner Id'
    Owner Id:   5

Comment 10 errata-xmlrpc 2021-11-16 14:09:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Satellite 6.10 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:4702