This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 820862 - vdsm and poller error messages on rhel6.2 vdsm managed from rhev 3.0
vdsm and poller error messages on rhel6.2 vdsm managed from rhev 3.0
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Virtualization (Show other bugs)
unspecified
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Milan Zazrivec
Martin Minar
infra storage
:
: 841215 (view as bug list)
Depends On:
Blocks: sat550-blockers sat550-post-ga/sat550-test-blockers
  Show dependency treegraph
 
Reported: 2012-05-11 04:41 EDT by Karl Stevens
Modified: 2016-07-03 20:57 EDT (History)
14 users (show)

See Also:
Fixed In Version: S-5.4.34-4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-12 05:57:45 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
messages log and example mail (199.48 KB, application/x-gzip)
2012-05-11 04:41 EDT, Karl Stevens
no flags Details

  None (edit)
Description Karl Stevens 2012-05-11 04:41:33 EDT
Created attachment 583765 [details]
messages log and example mail

Description of problem:
-----------------------

On two newly installed systems running RHEL6.2 + vdsm installed via RHEV-M ver: 3.0.3_0001-3.el6 (managed hypervisors) we are seeing the following error messages:

In root's mail:

localvdsm.py:35:<module>:ImportError: local vdsm not found

Also in /var/log/messages:

May 10 10:16:01 rhev-h5 python: abrt: detected unhandled Python
exception in /usr/share/rhn/virtualization/poller.py

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

vdsm version is vdsm-4.9-112.12.el6_2.x86_64

rhn-virtualization-host-5.4.14-8.el6sat.noarch


How reproducible:
-----------------

Reproduced on two separate hosts installed at the same time.

Steps to Reproduce:
1. Build 2 x Basic RHEL6.2 server
2. Install IPA replicating on the 2 servers for DNS & Directory
3. Install RHCS (ricci & luci) and set up clustered IP, filesystem, scripts and NFS making up an HA RHEVM service as per: https://access.redhat.com/knowledge/techbriefs/setting-rhev-m-highly-available-cluster-rhev-30
4. Manage the two underlying machines as rhev hypervisors from the rhev instance running as a clustered service, as described in the etherpad referenced below
  
Actual results:
---------------
As documented here

Expected results:
-----------------
No errors in root's mail or /var/log/messages

Additional info:
----------------

This is a test system to prove the concept of RHEVM running natively on the hosts it is managing, so the hosts are running RHCS, managing RHEVM as a clustered service, and are also each running an instance of IPA for DNS and Directory. 1 Master & 1 replica IPA.  The architecture is discussed here:

http://post-office.corp.redhat.com/archives/rhev-tech/2012-April/msg00403.html

and the builds of the current test systems, with logins etc.. are described here:

http://uki-sa.etherpad.corp.redhat.com/6

Example mail and copy /var/log/messages attached to this BZ
Comment 2 Karl Stevens 2012-05-11 06:21:44 EDT
Additional information on design of the solution is here:
http://etherpad.corp.redhat.com/NSN-RHEVM
Comment 3 RHEL Product and Program Management 2012-05-17 00:03:45 EDT
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 4 Dan Kenigsberg 2012-05-21 07:58:12 EDT
polling for VMs via localvdsm.py was a hack introduced in the rhel-5 and rhev-2.x days. It should have been discontinued on rhel-6.
Comment 7 Jan Pazdziora 2012-06-07 14:32:18 EDT
Could you check if the following patch addresses the problem?

diff --git a/client/tools/rhn-virtualization/virtualization/poller.py b/client/tools/rhn-virtualization/virtualization/poller.py
index e9e4e76..6f86b51 100644
--- a/client/tools/rhn-virtualization/virtualization/poller.py
+++ b/client/tools/rhn-virtualization/virtualization/poller.py
@@ -279,25 +279,15 @@ if __name__ == "__main__":
     # First, handle the options.
     _parse_options()
 
-    # check for VDSM status
-    import commands
-    vdsm_enabled = False
-    status, msg = commands.getstatusoutput("/etc/init.d/vdsmd status")
-    if status == 0:
-        vdsm_enabled = True
-
-    # Crawl each of the domains on this host and obtain the new state.
-    if vdsm_enabled:
-        domain_list = poll_through_vdsm()
-    elif libvirt:
+    if libvirt:
         domain_list = poll_hypervisor()
     else:
-        # If no libvirt nor vdsm is present, this program is pretty much
+        # If libvirt is not present, this program is pretty much
         # useless.  Just exit.
         sys.exit(0)
 
     # create the unkonwn domain config files (for libvirt only)
-    if libvirt and not vdsm_enabled:
+    if libvirt:
         uuid_list = domain_list.keys()
         domain = DomainDirectory()
         domain.save_unknown_domain_configs(uuid_list)
Comment 8 Clifford Perry 2012-06-08 15:02:07 EDT
Jan - I don't think we can blanket remove vdsm checks though, since they were added due to RHEV 2.x needs on RHEL 6 (I *think*, if memory is correct). While it seems that RHEV 3 on RHEL 6 is back to using libvirt. 

It may be beneficial to get a full matrix on RHEV versions and preferred methods used. 

Cliff
Comment 9 Jan Pazdziora 2012-06-11 08:22:07 EDT
OKay then, what is the correct way for checking which method (VDSM or libvirt) is the authoritative, on any given system? Would reverting the order, checking with libvirt first and only then with VDSM help? Or do we need to specifically check for the RHEV versions?

What would be the ultimate documentation to work with?
Comment 10 Jan Pazdziora 2012-06-11 08:30:13 EDT
(In reply to comment #8)
> Jan - I don't think we can blanket remove vdsm checks though, since they
> were added due to RHEV 2.x needs on RHEL 6 (I *think*, if memory is

But Dan said in comment 4 that the RHEV 2 vdsm approach is RHEL 5 only thing. So we could just leave it there on RHEL 5 and remove it on RHEL 6.

> correct). While it seems that RHEV 3 on RHEL 6 is back to using libvirt. 
> 
> It may be beneficial to get a full matrix on RHEV versions and preferred
> methods used. 

Indeed.
Comment 11 Dan Kenigsberg 2012-06-19 06:59:40 EDT
(In reply to comment #10)
> But Dan said in comment 4 that the RHEV 2 vdsm approach is RHEL 5 only
> thing. So we could just leave it there on RHEL 5 and remove it on RHEL 6.

exactly.
Comment 12 Dan Kenigsberg 2012-06-19 07:01:16 EDT
(However, make sure that you connection to libvirt is read-only. Vdsm does not allow rw connections to libvirt when it is installed.)
Comment 14 Jan Pazdziora 2012-08-07 02:58:59 EDT
Alright, how about doing it with %if on .spec level. We would not ship localvdsm.py on RHEL 6+, thus import localvdsm would fail, but otherwise the code bases could stay the same.

diff --git a/client/tools/rhn-virtualization/virtualization/poller.py b/client/tools/rhn-virtualization/virtualization/poller.py
index e9e4e76..fdca45e 100644
--- a/client/tools/rhn-virtualization/virtualization/poller.py
+++ b/client/tools/rhn-virtualization/virtualization/poller.py
@@ -127,7 +127,7 @@ def poll_hypervisor():
 
     return state
 
-def poll_through_vdsm():
+def poll_through_vdsm(server):
     """
      This method polls all the virt guests running on a VDSM enabled Host.
      Libvirt is disabled by default on RHEV-M managed clients.
@@ -138,12 +138,6 @@ def poll_through_vdsm():
      * The server should account for business rules similar to
        xen/kvm.
     """
-    import localvdsm
-    try:
-        server = localvdsm.connect()
-    except:
-        # VDSM raised an exception we're done here
-        return {}
     # Extract list of vm's. True returns full list
     try:
         domains = server.list(True)
@@ -279,16 +273,20 @@ if __name__ == "__main__":
     # First, handle the options.
     _parse_options()
 
-    # check for VDSM status
-    import commands
     vdsm_enabled = False
-    status, msg = commands.getstatusoutput("/etc/init.d/vdsmd status")
-    if status == 0:
-        vdsm_enabled = True
+    try:
+        import localvdsm
+        import commands
+        status, msg = commands.getstatusoutput("/etc/init.d/vdsmd status")
+        if status == 0:
+            server = localvdsm.connect()
+            vdsm_enabled = True
+    except ImportError:
+        pass
 
     # Crawl each of the domains on this host and obtain the new state.
     if vdsm_enabled:
-        domain_list = poll_through_vdsm()
+        domain_list = poll_through_vdsm(server)
     elif libvirt:
         domain_list = poll_hypervisor()
     else:
Comment 15 Milan Zazrivec 2012-08-10 05:10:56 EDT
spacewalk.git master: bf4e0a4736186ea5473b425e23e55bf0c3420003
Comment 17 Milan Zazrivec 2012-08-10 05:32:32 EDT
*** Bug 841215 has been marked as a duplicate of this bug. ***

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