Bug 742811

Summary: rhn-profile-sync requires libvirtd to be running
Product: [Community] Spacewalk Reporter: Colin Coe <colin.coe>
Component: ClientsAssignee: Milan Zázrivec <mzazrivec>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.5CC: slukasik
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 743293 (view as bug list) Environment:
Last Closed: 2011-12-22 16:48:45 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:    
Bug Blocks: 723481    

Description Colin Coe 2011-10-02 23:26:58 UTC
Description of problem:
rhn-profile-sync fails if libvirtd is not running on a virtualisation host.  Fat RHEL hypervisoirs in RHEV fit this category.

Version-Release number of selected component (if applicable):
Spacewalk 1.5

How reproducible:
Anyways

Steps to Reproduce:
1. Build RHEV Env
2. Subscribe fat RHEL hypervisor to spacewalk
3. Run rhn-profile-sync
  
Actual results:
---
[root@hypervisor ~]# rhn-profile-sync
Updating package profile...
Updating hardware profile...
Updating virtualization profile...
libvir: RPC error : authentication failed: Failed to start SASL negotiation: -4 (SASL(-4): no mechanism available: No worthy mechs found)
Warning: Could not retrieve virtualization information!
        libvirtd service needs to be running.
You have new mail in /var/spool/mail/root
[root@hypervisor ~]#
---

Expected results:
---
[root@xen07 07:26 ~]# rhn-profile-sync
Updating package profile...
Updating hardware profile...
Updating virtualization profile...
[root@xen07 07:26 ~]#
---

Additional info:

Comment 1 Colin Coe 2011-10-03 04:54:46 UTC
I've done a smidge more poking at this.

--- /usr/share/rhn/virtualization/support.py.orig     2011-10-03 12:17:06.182383109 +0800
+++ /usr/share/rhn/virtualization/support.py  2011-10-03 12:51:01.451383232 +0800
@@ -48,13 +48,7 @@
     return True


-vdsm_enabled = None
-if not _check_status("libvirtd"):
-    # Only check for vdsm if libvirt is disabled.
-    # sometimes due to manual intervention both could be running
-    # in such case use libvirt as the system is now in
-    # un supported state.
-    vdsm_enabled = _check_status("vdsmd")
+vdsm_enabled = _check_status("vdsmd")


 ###############################################################################
@@ -98,6 +92,8 @@
     domain_list = domains.values()
     domain_uuids = domains.keys()

+    print domain_list
+
     if not vdsm_enabled:
         # We need this only for libvirt
         domain_dir = DomainDirectory()
         # We need this only for libvirt
         domain_dir = DomainDirectory()


This patch slightly changes the way vdsm is looked for.  When you look at a RHEV (fat RHEL) hypervisor (at least in RHEV 3.0 BETA), you see both vdsmd and libvirtd running.  Given this, I think that the check should be on vdsmd, not on libvirtd.

The second mod merely prints those virtual nodes on the host that are found by rhn-profile-sync.  Interesting, on my only RHEV fat RHEL hypervisor, I see:
---
[root@benvir4p virtualization]# rhn-profile-sync
Updating package profile...
Updating hardware profile...
Updating virtualization profile...
[{'name': 'benupd1p', 'virt_type': 'fully_virtualized', 'state': 'running', 'vcpus': '4', 'memory_size': 4194304, 'uuid': '8e4ffa4a7aa84da1a2d3c7cd61857ce0'}, {'name': 'benwah1p', 'virt_type': 'fully_virtualized', 'state': 'running', 'vcpus': '1', 'memory_size': 2097152, 'uuid': 'd7bc4696dc9246548f6d09d489f6eb3d'}, {'name': 'benwas1p', 'virt_type': 'fully_virtualized', 'state': 'running', 'vcpus': '2', 'memory_size': 4194304, 'uuid': '63a412dc124941dcb9c242ceb346812f'}, {'name': 'benpxy1p', 'virt_type': 'fully_virtualized', 'state': 'running', 'vcpus': '1', 'memory_size': 2097152, 'uuid': 'be101eb34150417d9b1a11c2fe300da9'}, {'name': 'benmon1p', 'virt_type': 'fully_virtualized', 'state': 'running', 'vcpus': '1', 'memory_size': 2097152, 'uuid': '8b0e7eeb23974d58970d43b01b7b8933'}, {'name': 'benlah1p', 'virt_type': 'fully_virtualized', 'state': 'running', 'vcpus': '1', 'memory_size': 2097152, 'uuid': 'ea00b884d8f242c88b5f374c095af568'}, {'name': 'bencit1p', 'virt_type': 'fully_virtualized', 'state': 'running', 'vcpus': '1', 'memory_size': 2097152, 'uuid': 'a4f92c143cf04754b2cfb969313c300a'}]
[root@benvir4p virtualization]#
---

So the guests are being seen, but are not showing up in the webUI.

CC

Comment 2 Milan Zázrivec 2011-10-04 09:21:16 UTC
Thank you for the patch, applied in:

spacewalk.git master: 8d2df4f1d3a722c95c54d1cf7f2b4b28680d6dbf

Comment 3 Milan Zázrivec 2011-10-26 15:34:27 UTC
Additional fix: 7c9386db278b848c317b1718d2331cb3078f0d51

Comment 4 Milan Zázrivec 2011-10-26 15:57:05 UTC
Additional fix: ef1a8f4565d0460c3d58cd268ee989585571ae8a

Comment 5 Milan Zázrivec 2011-10-27 08:38:47 UTC
Additional fix: 29544df9fb7d2c79db36b88548cee5f36f928d88

Comment 6 Milan Zázrivec 2011-12-22 16:48:45 UTC
Spacewalk 1.6 has been released.