Bug 526371 - rhn-virt-host needs to work with VDSM
Summary: rhn-virt-host needs to work with VDSM
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Virtualization
Version: 530
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Pradeep Kilambi
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On:
Blocks: sat531-blockers 548812
TreeView+ depends on / blocked
 
Reported: 2009-09-30 01:48 UTC by Andrew Cathrow
Modified: 2016-04-26 23:20 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 548812 (view as bug list)
Environment:
Last Closed: 2009-10-12 08:06:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Fix localvdsm to also work without ssl (980 bytes, patch)
2009-10-03 08:09 UTC, Dan Kenigsberg
no flags Details | Diff
ss of entitlements working w/ vdsm, xen, libvirt (228.05 KB, image/png)
2009-10-08 02:25 UTC, wes hayutin
no flags Details
vdsm host w/ virt guests (197.83 KB, image/png)
2009-10-08 02:28 UTC, wes hayutin
no flags Details
vdsmGuest not consuming entitlements in rhn hosted, stage (518.14 KB, image/png)
2009-10-08 18:13 UTC, wes hayutin
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2009:1491 0 normal SHIPPED_LIVE rhn-virtualization enhancement update 2009-10-12 08:06:12 UTC

Comment 3 Grant Gainey 2009-09-30 14:24:40 UTC
This BZ requires code change on the client side, so that the RHEL host in this situation correctly dentifies itself and its guests to RHN.  Rerouting to Satellite, since that's where the client tools live.

Comment 5 Todd Sanders 2009-10-01 01:27:33 UTC
Re-assigning to Pradeep per kwirth's request.  Pradeep - will sync up with you in the morning on this.

-Todd

Comment 10 Dan Kenigsberg 2009-10-03 08:09:48 UTC
Created attachment 363543 [details]
Fix localvdsm to also work without ssl

Prad, sorry about that, but please rebuild with the attached patch.

Comment 14 wes hayutin 2009-10-06 21:18:59 UTC
getting an error on RHEL 5.4

hulk.idm.bos.redhat.com

[root@hulk FIX]# rhn-profile-sync -vvv
updateLoginInfo() login info
D: login(forceUpdate=True) invoked
D: opening  db environment /var/lib/rpm/Packages joinenv
D: opening  db index       /var/lib/rpm/Packages rdonly mode=0x0
D: locked   db index       /var/lib/rpm/Packages
D: opening  db index       /var/lib/rpm/Providename rdonly mode=0x0
logging into up2date server
D: writeCachedLogin() invoked
D: Wrote pickled loginInfo at  1254864059.69  with expiration of  1254867659.69  seconds.
successfully retrieved authentication token from up2date server
D: logininfo: {'X-RHN-Server-Id': 1000010100, 'X-RHN-Auth-Server-Time': '1254863309.98', 'X-RHN-Auth': 'hPQqKrcXl3leYqRmH/dcNg==', 'X-RHN-Auth-Channels': [['rhel-x86_64-server-5', '20091005163118', '1', '1'], ['rhn-tools-rhel-x86_64-server-5', '20090918020855', '0', '1'], ['rhel-x86_64-server-vt-5', '20091002234329', '0', '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset': '3600.0'}
Updating package profile...
Updating package profile
Updating hardware profile...
Updating virtualization profile...
An error has occurred:
exceptions.TypeError
See /var/log/up2date for more information
D: closed   db index       /var/lib/rpm/Providename
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm/Packages

/var/log/up2date
[Tue Oct  6 14:18:25 2009] up2date 
Traceback (most recent call last):
  File "/usr/sbin/rhn-profile-sync", line 54, in ?
    cli.run()
  File "/usr/share/rhn/up2date_client/rhncli.py", line 65, in run
    sys.exit(self.main() or 0)
  File "/usr/sbin/rhn-profile-sync", line 49, in main
    support.refresh()
  File "/usr/share/rhn/virtualization/support.py", line 96, in refresh
    if not len(domains):
exceptions.TypeError: len() of unsized object

[root@hulk ~]# rpm -qa | grep rhn-virt
rhn-virtualization-host-5.3.0-11.el5sat
rhn-virtualization-common-5.3.0-11.el5sat

Comment 15 wes hayutin 2009-10-06 21:24:58 UTC
lol.. this is not as critical as I thought
It appears the rhn-virtualization-guest service was not actually running on the guest.  We should die more gracefully.

However once the service is running on the guest, the rhn-profile-sync command runs successfully.  

The guest now shows up in rhn satellite
The correct number of entitlements can are displayed.  The guest is no longer consuming an entitlement


[root@hulk FIX]# rhn-profile-sync -vvv
updateLoginInfo() login info
D: login(forceUpdate=True) invoked
D: opening  db environment /var/lib/rpm/Packages joinenv
D: opening  db index       /var/lib/rpm/Packages rdonly mode=0x0
D: locked   db index       /var/lib/rpm/Packages
D: opening  db index       /var/lib/rpm/Providename rdonly mode=0x0
logging into up2date server
D: writeCachedLogin() invoked
D: Wrote pickled loginInfo at  1254864764.97  with expiration of  1254868364.97  seconds.
successfully retrieved authentication token from up2date server
D: logininfo: {'X-RHN-Server-Id': 1000010100, 'X-RHN-Auth-Server-Time': '1254864015.23', 'X-RHN-Auth': '4JwTE/SI1ijelF66eryL7A==', 'X-RHN-Auth-Channels': [['rhel-x86_64-server-5', '20091005163118', '1', '1'], ['rhn-tools-rhel-x86_64-server-5', '20090918020855', '0', '1'], ['rhel-x86_64-server-vt-5', '20091002234329', '0', '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset': '3600.0'}
Updating package profile...
Updating package profile
Updating hardware profile...
Updating virtualization profile...
D: closed   db index       /var/lib/rpm/Providename
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm/Packages
D: May free Score board((nil))
You have new mail in /var/spool/mail/root

Comment 19 wes hayutin 2009-10-07 22:20:55 UTC
one note here..
libvirtd and vdsm can not be running at the same time for this fix to work.
If libvirtd is running vdsm guests will NOT be reported to satellite or hosted

Comment 20 wes hayutin 2009-10-07 23:19:09 UTC
using the satellite virt guest controls will not work which is also ok..
no exceptions are thrown when using them..

s>\n</methodCall>\n", 'version': 2, 'id': 741}
D: handle_action actionid = 741, version = 2
D: do_call virt.shutdown ('67e3e61e7d124fb3b9ea9c2d337a4c47',)
libvir: Remote error : unable to connect to '/var/run/libvirt/libvirt-sock': Connection refused
D: Sending back response ((6,), 'Fatal error in Python code occured', {})
D: do_call packages.checkNeedUpdate ('rhnsd=1',)
D: local action status:  (0, 'rpm database not modified since last update (or package list recently updated)', {})

Comment 21 wes hayutin 2009-10-08 02:25:55 UTC
Created attachment 364052 [details]
ss of entitlements working w/ vdsm, xen, libvirt

hulk = vdsm
sat-blade = kvm
rlx-2-20 = xen

Comment 22 wes hayutin 2009-10-08 02:28:09 UTC
Created attachment 364053 [details]
vdsm host w/ virt guests

This is a vdsm host w/ the lastest rhn-virt-common/host package and its guests.. one registered two are not.  The important feature is that the guests are married to the host properly.

Comment 23 wes hayutin 2009-10-08 02:33:05 UTC
virt controls from satellite are working - STOP
\n<params>\n<param>\n<value><string>390471ccb88bd946f6f54e4687cfa033</string></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 1141}
D: handle_action actionid = 1141, version = 2
D: do_call virt.shutdown ('390471ccb88bd946f6f54e4687cfa033',)
D: Sending back response (0, 'Domain 390471ccb88bd946f6f54e4687cfa033 shutdown.', {})
D: do_call packages.checkNeedUpdate ('rhnsd=1',)
Loaded plugins: rhnplugin

[root@rlx-2-20 xen]# xm list
Name                                      ID Mem(MiB) VCPUs State   Time(s)
Domain-0                                   0      998     1 r-----    578.3
xentest02                                  8      511     1 -b----     36.0
[root@rlx-2-20 xen]# 
[root@rlx-2-20 xen]# 
[root@rlx-2-20 xen]# 
[root@rlx-2-20 xen]# xm list
Name                                      ID Mem(MiB) VCPUs State   Time(s)
Domain-0                                   0      998     1 r-----    581.1
[root@rlx-2-20 xen]# 

START
D: do_call virt.start ('390471ccb88bd946f6f54e4687cfa033',)
D: Sending back response (0, 'Domain 390471ccb88bd946f6f54e4687cfa033 started.', {})
D: do_call packages.checkNee
[root@rlx-2-20 xen]# xm list
Name                                      ID Mem(MiB) VCPUs State   Time(s)
Domain-0                                   0      998     1 r-----    585.9
xentest02                                  9      512     1 ------      1.0
[root@rlx-2-20 xen]#

Comment 24 wes hayutin 2009-10-08 18:13:08 UTC
Created attachment 364165 [details]
vdsmGuest not consuming entitlements in rhn hosted, stage

A screenshot of a node running vdsm, with one guest.
You can see that the guest is correctly NOT consuming entitlements

Comment 25 wes hayutin 2009-10-08 21:46:21 UTC
Stephen Herr has completed his testing for RHN Hosted and confirms the fix is working and ready to ship

Comment 26 wes hayutin 2009-10-08 21:47:34 UTC
fix has been regression tested against rhel 5.3 w/ xen

Comment 27 wes hayutin 2009-10-08 21:48:10 UTC
All of QE's tests are now complete..

Comment 28 wes hayutin 2009-10-09 21:08:10 UTC
release pending

Comment 29 errata-xmlrpc 2009-10-12 08:06:15 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1491.html

Comment 30 Jan Pazdziora 2010-01-22 15:32:40 UTC
In Spacewalk upstream, the commit is 41df363e238ffb345f2dce35eb013c9f1a7c2f26 plus the cleanups after that.


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