Bug 822365 - Can't update the registered system's name: headpin: error: no such option: --new-name
Can't update the registered system's name: headpin: error: no such option: --...
Status: CLOSED CURRENTRELEASE
Product: Subscription Asset Manager
Classification: Red Hat
Component: katello (Show other bugs)
1.0.0
Unspecified Unspecified
medium Severity medium
: beta
: 1.X
Assigned To: Tom McKay
Og Maciel
: Triaged
Depends On:
Blocks: sam12-tracker
  Show dependency treegraph
 
Reported: 2012-05-17 03:33 EDT by Hui Wang
Modified: 2013-06-07 13:25 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-07 13:24:51 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Hui Wang 2012-05-17 03:33:17 EDT
Description of problem:
Can't update a registered system's name via SAM CLI: headpin -u admin -p admin system update --org=ACME_Corporation --name=oldname --new-name=$newname --description="..."

Version-Release number of selected component (if applicable):
subscription-manager-0.99.16-1.el6.x86_64
katello-configure-0.3.3-2.el6_2.noarch
katello-headpin-all-0.2.6-4.el6_2.noarch
katello-common-0.3.1-1.el6_2.noarch
katello-cli-common-0.3.2-3.el6_2.noarch
katello-headpin-0.2.6-4.el6_2.noarch
katello-glue-candlepin-0.3.1-1.el6_2.noarch
katello-cli-headpin-0.2.0-1.el6_2.noarch
katello-selinux-0.2.4-1.el6_2.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-certs-tools-1.1.5-1.el6_2.noarch
candlepin-0.6.2-1.el6_2.noarch
katello-glue-candlepin-0.3.1-1.el6_2.noarch
candlepin-tomcat6-0.6.2-1.el6_2.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
thumbslug-0.0.24-1.el6_2.noarch


How reproducible:
100%

Steps to Reproduce:
1.Register one machine to SAM
2.List the registered system info from sam.
# headpin -u admin -p admin system info --org=ACME_Corporation --name=localhost.localdomain
-------------------------------------------------------------------------------------------------------------------------------------------------------------
                                                      System Information For Org [ ACME_Corporation ]
-------------------------------------------------------------------------------------------------------------------------------------------------------------

Name:            localhost.localdomain
Ipv4 Address:    127.0.0.1
Uuid:            3a273960-c0d5-4838-91b0-4af9392e682e
Location:        None
Registered:      2012/05/17 03:05:17
Last updated:    2012/05/17 03:05:17
Description:
    Initial Registration Params
Service Level:   

3.Update the system's name
# headpin -u admin -p admin system update --org=ACME_Corporation --name=localhost.localdomain --new-name=newname --description="this is localhost.localdomain" --location=other
Usage: headpin [options]

headpin: error: no such option: --new-name

  
Actual results:
Can't update the registered system's name.

Expected results:
Can update the registered system's name.

Additional info:
Comment 1 Eric Sammons 2012-05-29 11:22:46 EDT
Reproduced (sort of):




sam> system list --org RedHat_QE
system list --org RedHat_QE
--------------------------------------------------------------------------------
                      Systems List For Org [ RedHat_QE ]

 Name              Ipv4 Address   Service Level  
--------------------------------------------------------------------------------
 systemUPlgbO      None                          
 dTpk8             None                          
 WLQ0              None                          
 DMrv              None                          
 dMCi7A            None       <--- We'll change this one                     
 SearchSysKl0G     None                          
 SearchSysI3yK     None                          
 SearchSyso6qda    None                          
 SearchSys8r2X79   None                          
sam> system update --org=RedHat_QE --name=dMCi7A --new-name=test123 
system update --org=RedHat_QE --name=dMCi7A --new-name=test123
Successfully updated system [ dMCi7A ]
sam> system list --org RedHat_QE
system list --org RedHat_QE
--------------------------------------------------------------------------------
                      Systems List For Org [ RedHat_QE ]

 Name              Ipv4 Address   Service Level  
--------------------------------------------------------------------------------
 systemUPlgbO      None                          
 dTpk8             None                          
 WLQ0              None                          
 DMrv              None                          
 SearchSysKl0G     None                          
 SearchSysI3yK     None                          
 SearchSyso6qda    None                          
 SearchSys8r2X79   None                          
 -name             None     <--- Oops what's that...
Comment 2 Eric Sammons 2012-05-29 11:41:09 EDT
sam> system list --org RedHat_QE
--------------------------------------------------------------------------------
                      Systems List For Org [ RedHat_QE ]

 Name              Ipv4 Address   Service Level  
--------------------------------------------------------------------------------
 systemUPlgbO      None                          
 dTpk8             None                          
 WLQ0              None                          
 DMrv              None                          
 SearchSysKl0G     None                          
 SearchSysI3yK     None                          
 SearchSyso6qda    None                          
 SearchSys8r2X79   None                          
 -name             None    <--- We'll change this one                      
sam> system update --org RedHat_QE --name -name --new_name test123
Successfully updated system [ -name ]
sam> system list --org RedHat_QE
--------------------------------------------------------------------------------
                      Systems List For Org [ RedHat_QE ]

 Name              Ipv4 Address   Service Level  
--------------------------------------------------------------------------------
 systemUPlgbO      None                          
 dTpk8             None                          
 WLQ0              None                          
 DMrv              None                          
 SearchSysKl0G     None                          
 SearchSysI3yK     None                          
 SearchSyso6qda    None                          
 SearchSys8r2X79   None                          
 test123           None   <--- Success                       

Conclusion:
--new_name works in lieu of --new-name, it seems that this could be a easy help doc fix.
Comment 4 Og Maciel 2012-10-10 11:46:15 EDT
First, using katello-cli-1.1.8-7.el6cf.noarch:

# katello -u admin -p admin system list --org Starbucks
---------------------------------------------------------------------------------------------------------------------------------------------
                                                    Systems List For Org [ Starbucks ]

 Name                            Uuid                                   Ipv4 Address   Service Level  
---------------------------------------------------------------------------------------------------------------------------------------------
 qeclient01.usersys.redhat.com   5d504b77-4fd0-40e0-ae57-b6c3aef07b83   127.0.0.1                     
 g-10090828                      86d84d2b-c786-48a8-a816-300ab2da7073   None                          
# katello -u admin -p admin system update --org Starbucks --name g-10090828 --new_name alien_machine
Successfully updated system [ g-10090828 ]
# katello -u admin -p admin system list --org Starbucks
---------------------------------------------------------------------------------------------------------------------------------------------
                                                    Systems List For Org [ Starbucks ]

 Name                            Uuid                                   Ipv4 Address   Service Level  
---------------------------------------------------------------------------------------------------------------------------------------------
 qeclient01.usersys.redhat.com   5d504b77-4fd0-40e0-ae57-b6c3aef07b83   127.0.0.1                     
 alien_machine                   86d84d2b-c786-48a8-a816-300ab2da7073   None
Comment 5 Og Maciel 2012-10-12 13:28:51 EDT
[root@qetello03 ~]# headpin  -u admin -p admin org list
---------------------------------------------------------------------------------------------------------------------------------------------
                                                             Organization List

Id Name             Label            Description                   
---------------------------------------------------------------------------------------------------------------------------------------------
4  Rome             Rome             None                          
3  Doritos          Doritos          None                          
2  Praha            Praha            Radio Praha                   
1  ACME_Corporation ACME_Corporation ACME_Corporation Organization 
[root@qetello03 ~]# headpin  -u admin -p admin system list --org Rome
---------------------------------------------------------------------------------------------------------------------------------------------
                                                       Systems List For Org [ Rome ]

Name                          Uuid                                 Ipv4 Address Service Level 
---------------------------------------------------------------------------------------------------------------------------------------------
qeclient09.usersys.redhat.com 5d4bbbfc-b3ba-46b8-9bc2-ef781cfb758a 127.0.0.1                  
qeclient08.usersys.redhat.com 41d0ae11-1646-42c0-8ea6-a8909134943d 127.0.0.1                  
qeclient07.usersys.redhat.com cb89d463-18cc-4476-ad99-01b1dd3d5c60 127.0.0.1                  
qeclient06.usersys.redhat.com 5907a600-1573-45de-a698-c9e624e4b927 127.0.0.1                  
qeclient05.usersys.redhat.com 4c10a39b-c207-4f4e-b19c-68e2e66e6209 127.0.0.1                  
qeclient04.usersys.redhat.com ddfa1031-020f-4c48-bcb0-bdff6c34202b 127.0.0.1                  
qeclient03.usersys.redhat.com 862a7be1-9616-4a91-8cc4-4569b0c33164 127.0.0.1                  
qeclient02.usersys.redhat.com ea1aa510-dc17-4b66-912d-657eb10a0d1c 127.0.0.1                  
[root@qetello03 ~]# headpin  -u admin -p admin system update --org Rome --name qeclient02.usersys.redhat.com --new_name alien_machine
Successfully updated system [ qeclient02.usersys.redhat.com ]
[root@qetello03 ~]# headpin  -u admin -p admin system list --org Rome
---------------------------------------------------------------------------------------------------------------------------------------------
                                                       Systems List For Org [ Rome ]

Name                          Uuid                                 Ipv4 Address Service Level 
---------------------------------------------------------------------------------------------------------------------------------------------
qeclient09.usersys.redhat.com 5d4bbbfc-b3ba-46b8-9bc2-ef781cfb758a 127.0.0.1                  
qeclient08.usersys.redhat.com 41d0ae11-1646-42c0-8ea6-a8909134943d 127.0.0.1                  
qeclient07.usersys.redhat.com cb89d463-18cc-4476-ad99-01b1dd3d5c60 127.0.0.1                  
qeclient06.usersys.redhat.com 5907a600-1573-45de-a698-c9e624e4b927 127.0.0.1                  
qeclient05.usersys.redhat.com 4c10a39b-c207-4f4e-b19c-68e2e66e6209 127.0.0.1                  
qeclient04.usersys.redhat.com ddfa1031-020f-4c48-bcb0-bdff6c34202b 127.0.0.1                  
qeclient03.usersys.redhat.com 862a7be1-9616-4a91-8cc4-4569b0c33164 127.0.0.1                  
alien_machine                 ea1aa510-dc17-4b66-912d-657eb10a0d1c 127.0.0.1                  
[root@qetello03 ~]# headpin  -u admin -p admin system update --org Rome --name alien_machine --new_name qeclient02.usersys.redhat.com
Successfully updated system [ alien_machine ]
[root@qetello03 ~]# headpin  -u admin -p admin system list --org Rome
---------------------------------------------------------------------------------------------------------------------------------------------
                                                       Systems List For Org [ Rome ]

Name                          Uuid                                 Ipv4 Address Service Level 
---------------------------------------------------------------------------------------------------------------------------------------------
qeclient09.usersys.redhat.com 5d4bbbfc-b3ba-46b8-9bc2-ef781cfb758a 127.0.0.1                  
qeclient08.usersys.redhat.com 41d0ae11-1646-42c0-8ea6-a8909134943d 127.0.0.1                  
qeclient07.usersys.redhat.com cb89d463-18cc-4476-ad99-01b1dd3d5c60 127.0.0.1                  
qeclient06.usersys.redhat.com 5907a600-1573-45de-a698-c9e624e4b927 127.0.0.1                  
qeclient05.usersys.redhat.com 4c10a39b-c207-4f4e-b19c-68e2e66e6209 127.0.0.1                  
qeclient04.usersys.redhat.com ddfa1031-020f-4c48-bcb0-bdff6c34202b 127.0.0.1                  
qeclient03.usersys.redhat.com 862a7be1-9616-4a91-8cc4-4569b0c33164 127.0.0.1                  
qeclient02.usersys.redhat.com ea1aa510-dc17-4b66-912d-657eb10a0d1c 127.0.0.1
Comment 6 Og Maciel 2012-10-12 13:30:31 EDT
Verified:

* candlepin-0.7.13-1.el6_3.noarch
* candlepin-tomcat6-0.7.13-1.el6_3.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.1.8-1h.el6_3.noarch
* katello-cli-1.1.11-1h.el6_3.noarch
* katello-cli-common-1.1.11-1h.el6_3.noarch
* katello-common-1.1.15-2h.el6_3.noarch
* katello-configure-1.1.11-1h.el6_3.noarch
* katello-glue-candlepin-1.1.15-2h.el6_3.noarch
* katello-headpin-1.1.15-2h.el6_3.noarch
* katello-headpin-all-1.1.15-2h.el6_3.noarch
* katello-selinux-1.1.2-1h.el6_3.noarch
* thumbslug-0.0.24-1.el6_2.noarch
* thumbslug-selinux-0.0.24-1.el6_2.noarch
Comment 7 Bryan Kearney 2013-06-07 13:24:51 EDT
Closing out verified bugs from 1.2. Somehow the errata tool missed them.
Comment 8 Bryan Kearney 2013-06-07 13:25:45 EDT
Closing out verified bugs from 1.2. Somehow the errata tool missed them.

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