Bug 820742

Summary: RFE: headpin cli method for removing a deletion record on a hypervisor
Product: [Retired] Subscription Asset Manager Reporter: Chris Duryee <cduryee>
Component: Docs Installation GuideAssignee: sachua
Status: CLOSED CURRENTRELEASE QA Contact: ecs-bugs
Severity: high Docs Contact:
Priority: high    
Version: 1.0.0CC: cduryee, cwelton, dlackey, dmacpher, esammons, huiwang, inecas, jomara, jskeoch, khong, mmccune, sachua, yqiao
Target Milestone: rcKeywords: FutureFeature, TestBlocker, Triaged
Target Release: 1.X   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 812891 Environment:
Last Closed: 2012-07-10 04:14:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 802263, 812891    
Bug Blocks: 803375    
Attachments:
Description Flags
the result
none
the new result against the latest sam none

Comment 2 RHEL Program Management 2012-05-10 20:44:43 UTC
Thank you for your bug report. This issue was evaluated for inclusion
in the current release of Subscription Asset Manager (SAM). Unfortunately,
we are unable to address this request. Because we are in the final stages
of development in the current release, only significant, release-blocking
issues involving serious regressions and data corruption can be considered.

If you believe this issue meets the release blocking criteria as defined and
communicated to you by your Red Hat Support representative, please ask
your representative to file this issue as a blocker for the current release.
Otherwise, ask that it be evaluated for inclusion in the next release of SAM.

Comment 3 RHEL Program Management 2012-05-10 21:04:46 UTC
Thank you for your bug report. This issue was evaluated for inclusion
in the current release of Subscription Asset Manager (SAM). Unfortunately,
we are unable to address this request. Because we are in the final stages
of development in the current release, only significant, release-blocking
issues involving serious regressions and data corruption can be considered.

If you believe this issue meets the release blocking criteria as defined and
communicated to you by your Red Hat Support representative, please ask
your representative to file this issue as a blocker for the current release.
Otherwise, ask that it be evaluated for inclusion in the next release of SAM.

Comment 7 yqiao 2012-05-22 09:26:20 UTC
Failed

From the UI i can see  the guest whose uuid=42372e7b-20e5-03fb-9435-e45f2fe5fb43
  has been registered to sam ,but when i delete it form the sam server via command line ,it doesn't work efficiently.  
      # headpin -u admin -p admin system remove_deletion --uuid=500

Comment 8 yqiao 2012-05-22 09:26:56 UTC
Created attachment 585975 [details]
the result

Comment 9 sachua 2012-05-24 03:34:18 UTC
Hi Chris, can you please assist with yqiao's comment? Thanks!

Comment 10 Chris Duryee 2012-05-24 18:26:37 UTC
yqiao,

what version of katello-cli-headpin are you running?

Comment 13 yqiao 2012-05-30 08:07:01 UTC
(In reply to comment #10)
> yqiao,
> 
> what version of katello-cli-headpin are you running?

the version of katello-cli-headpin which i was running on is katello-cli-headpin-0.2.0-1.el6_2.noarch

Comment 14 Chris Duryee 2012-05-30 18:33:21 UTC
Can you try again with katello-cli-headpin-0.2.2-1.el6_2 or higher? 0.2.0 does not have this feature.

Comment 15 yqiao 2012-05-31 02:46:41 UTC
Failed.

I have already checked again against the lastest sam with katello-cli-headpin-0.2.2-1.el6_2. the result still failed. But the error information has changed.you can check it with the new attachment.

Comment 16 yqiao 2012-05-31 02:47:11 UTC
(In reply to comment #14)
> Can you try again with katello-cli-headpin-0.2.2-1.el6_2 or higher? 0.2.0
> does not have this feature.

Failed.

I have already checked again against the lastest sam with katello-cli-headpin-0.2.2-1.el6_2. the result still failed. But the error information has changed.you can check it with the new attachment.

Comment 17 yqiao 2012-05-31 02:48:42 UTC
Created attachment 587927 [details]
the new result against the latest sam

Comment 18 sachua 2012-05-31 03:41:56 UTC
Hi Chris, can you please assist yqiao? Thanks!

Comment 19 Chris Duryee 2012-05-31 14:16:33 UTC
That error is correct.

The intent of the command is to allow users to undo an accidential deletion of a vmware hypervisor, since these hypervisors cannot be re-registered with a new UUID. Note that once the command is run, the hypervisor still has to check in again for it to show up in SAM.

If you delete the hypervisor in the sam UI, and then try the command again, it should return a success message. The command is intended for vmware, but any hypervisor will work in terms of testing the command.

Comment 23 Hui Wang 2012-06-04 05:52:06 UTC
Verified the bug. The result is PASS.
Build:
SAM-2012-05-31.1

step:
1. Restart virt-who service
[root@7234 ~]# service virt-who restart
Stopping virt-who:                                         [  OK  ]
Starting virt-who:                                         [  OK  ]
Listening for events is not available in VDSM or ESX mode
[root@7234 ~]# Virt-who is running in esx mode
Starting infinite loop with 3600 seconds interval and event handling
Sending update in hosts-to-guests mapping: {44454c4c-4c00-1031-8053-b8c04f4e3258: [421f875f-f7f1-4743-ad34-cffda0abc4a2, 421febe8-208a-3072-0a0d-c4d641f0dd01, 420a6910-75c5-ec7d-8890-186bed705daa], 44454c4c-4200-1034-8039-b8c04f503258: [421f1822-367a-dff2-837a-d0b63712ae27, 42372e7b-20e5-03fb-9435-e45f2fe5fb43, 421f931a-9067-d179-8a19-6f7a7c9993ef]}
Updated host: 44454c4c-4c00-1031-8053-b8c04f4e3258 with guests: [421f875f-f7f1-4743-ad34-cffda0abc4a2, 421febe8-208a-3072-0a0d-c4d641f0dd01, 420a6910-75c5-ec7d-8890-186bed705daa]
Updated host: 44454c4c-4200-1034-8039-b8c04f503258 with guests: [421f1822-367a-dff2-837a-d0b63712ae27, 42372e7b-20e5-03fb-9435-e45f2fe5fb43, 421f931a-9067-d179-8a19-6f7a7c9993ef]
2. Remove the ESX registered host to unregister the machine from SAM.
3. Remove the the deletion record of the ESX machine
# headpin -u admin -p admin system remove_deletion --uuid=44454c4c-4200-1034-8039-b8c04f503258
Successfully removed deletion record for hypervisor with uuid [ 44454c4c-4200-1034-8039-b8c04f503258 ]
4. Checking the systems that registered on SAM, the unregistered ESX machine re-registered to SAM.