Bug 1326347

Summary: Content host description is not returned in info and cannot be updated
Product: Red Hat Satellite Reporter: Oleksandr Shtaier <oshtaier>
Component: HammerAssignee: Walden Raines <walden>
Status: CLOSED ERRATA QA Contact: Sachin Ghai <sghai>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham, sghai
Target Milestone: UnspecifiedKeywords: Regression, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
URL: http://projects.theforeman.org/issues/14821
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:34:07 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:
Bug Depends On: 1330603    
Bug Blocks:    
Attachments:
Description Flags
the updated comment for host, is shown in webUI under content-host -> description none

Description Oleksandr Shtaier 2016-04-12 13:29:16 UTC
Description of problem:
Create:
hammer -u user -p pass content-host create --content-view-id=1707 --lifecycle-environment-id=1640 --organization-id=1731 --description=test123 --name=test1122221

Name:                    test1122221
ID:                      e851a406-c273-448b-b0cd-a26f2e66bb74
Katello Agent Installed: no
Description:             
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

Content host created

Update:
[ERROR 2016-04-08 17:22:40 Exception] Error: Unrecognised option '--description'
           
  See: 'hammer content-host update --help'
  Could not update content host:
    Error: Unrecognised option '--description'
             

Version-Release number of selected component (if applicable):
6.2 SNAP7.1

How reproducible:
Always

Steps to Reproduce:
Provided in description

Actual results:
Description for new content host is not available and error is raised for update procedure

Expected results:
Description is available and can be updated 

Additional info:

Comment 3 Brad Buckingham 2016-04-21 22:34:55 UTC
WORKAROUND:

The 'description' for a content host may be viewed and updated from the UI (Hosts -> Content Hosts).

Comment 4 Walden Raines 2016-04-26 14:39:43 UTC
Created redmine issue http://projects.theforeman.org/issues/14821 from this bug

Comment 5 Walden Raines 2016-04-26 15:39:00 UTC
PR - https://github.com/Katello/hammer-cli-katello/pull/385

Comment 6 Walden Raines 2016-04-28 13:50:06 UTC
Note when testing this that content_host.description has been removed and migrated to the existing field host.comment.

Comment 7 Walden Raines 2016-05-02 14:27:20 UTC
This has been merged to hammer-cli-katello master:

commit 599f5c2d1d898a46229f19b15b4dba233e43c011
Merge: c527eb1 ce6112b
Author: Justin Sherrill <jlsherrill>
Date:   Thu Apr 28 09:39:30 2016 -0400

    Merge pull request #385 from waldenraines/14821
    
    Fixes #14821: remove description from content host.

commit ce6112b4fba7fde08c10e6fc06cb7ae3707ddefa
Author: Walden Raines <walden>
Date:   Tue Apr 26 11:34:36 2016 -0400

    Fixes #14821: remove description from content host.
    
    Viewing/updating description on content host is no longer supported
    as viewing/updating the comment field on host replaces this field.
    This commit removes the description field output from hammer for
    content hosts.
    
    http://projects.theforeman.org/issues/14821

Comment 8 Sachin Ghai 2016-05-12 10:01:59 UTC
Verified with sat6.2 GA snap10

As per host-unification feature, we don't have --description in hammer for content-host. This has been migrated to host as --comment.

~]# hammer -u admin -p changeme host create --help | grep comment
 --comment COMMENT                         Additional information about this host
[root@cloud- ~]# hammer -u admin -p changeme host update --help | grep comment
 --comment COMMENT                         Additional information about this host


Content-host doesn't have 'create' sub-command and neither --description option for "content-host update"


Here I updated the description/comment of a existing host:


[root@cloud- ~]# hammer -u admin -p changeme host list | grep test-host-comment
5  | test-host-comment 

# hammer -u admin -p changeme host update --comment 'testing description fields' --id 5
Host updated


----------------------------|------------------|------------|---------------|------------------
[root@cloud-qe-3 ~]# hammer -u admin -p changeme host info --id 5
Id:                 5
Name:               test-host-comment
Organization:       Default Organization
Location:           Default Location
Puppet CA Id:       
Puppet Master Id:   
Cert name:          test-host-comment
Managed:            no
Installed at:       
Last report:        
Network:            
    IP:  
    MAC:
Network interfaces: 
 1) Id:          10
    Identifier:  
    Type:        interface (primary, provision)
    MAC address: 
    IP address:  
    FQDN:
Operating system:   
    Build:                  no
    Custom partition table:
Parameters:         

Additional info:    
    Owner Id:   3
    Owner Type: User
    Enabled:    yes
    Comment:    
      testing description fields

Comment 9 Sachin Ghai 2016-05-12 10:02:45 UTC
Created attachment 1156621 [details]
the updated comment for host, is shown in webUI under content-host -> description

Comment 10 Bryan Kearney 2016-07-27 11:34:07 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/RHBA-2016:1501