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 1338780 - Unable to update content host name via hammer
Summary: Unable to update content host name via hammer
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Andrew Kofink
QA Contact: Peter Ondrejka
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-23 12:20 UTC by Andrii Balakhtar
Modified: 2021-06-10 11:19 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:54:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 15589 0 None None None 2016-07-06 15:05:32 UTC

Description Andrii Balakhtar 2016-05-23 12:20:35 UTC
Description of problem:
Unable to update content host name via 'hammer content-host update' command - operation succeeds but name is not updating.

Version-Release number of selected component (if applicable):
Sat 6.2.0 GA SNAP 12.1

How reproducible:
Always

Steps to Reproduce:
1. Create any content host:
hammer host subscription register --content-view-id="30" --organization-id="31" --name="XehsTnSPdubYUBECpJJq" --lifecycle-environment-id="30"
2. Get content host info:
hammer content-host info --id="2"
3. Update content-host name via hammer:
hammer content-host update --id="f2cef045-2381-4700-8013-ebbea6a2f141" --new-name="mjbhe8gnp34ihmtocyuusqfk8nzvbokn"
4. Get content-host info again, check its name
hammer content-host info --id="f2cef045-2381-4700-8013-ebbea6a2f141"

Actual results:
Content host name was not updated (although 'Content host updated' message received):
hammer content-host info --id="f2cef045-2381-4700-8013-ebbea6a2f141"
Name:                    XehsTnSPdubYUBECpJJq
ID:                      f2cef045-2381-4700-8013-ebbea6a2f141
Katello Agent Installed: no
Location:                None
Lifecycle Environment:   Library
Content View:            Default Organization View
Entitlement Status:      valid
Release Version:         
Autoheal:                true
Security Errata:         0
Bugfix Errata:           0
Enhancement Errata:      0


Expected results:
Content host name should be updated. And if it wasn't updated for some reason - 'hammer content-host update' should return error message with non-zero return code.

Additional info:

Comment 2 Justin Sherrill 2016-05-23 17:11:14 UTC
Note, that as part of host unification hosts and content hosts are now combined into one object, (the host object).

So you can update the host's name (via hammer host update), but we really aren't supporting updating of the hammer content host view's name anymore.

Comment 4 Andrew Kofink 2016-07-06 14:10:02 UTC
Created redmine issue http://projects.theforeman.org/issues/15589 from this bug

Comment 5 Bryan Kearney 2016-07-11 14:14:48 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/15589 has been closed

Comment 10 Peter Ondrejka 2016-10-24 08:19:33 UTC
Verified in Sat 6.3 snap 5. The content-host sub-command has been removed but the update procedure works correctly under host:

# hammer host subscription register --content-view-id="1" --organization-id="31" --name="XehsTnSPdubYUBECpJJq" --lifecycle-environment-id="1"

# hammer host update --id="5" --new-name updated-name
Host updated

Comment 11 Satellite Program 2018-02-21 16:54:17 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, 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-2018:0336


Note You need to log in before you can comment on or make changes to this bug.