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
Additional information on design of the solution is here: http://etherpad.corp.redhat.com/NSN-RHEVM
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.
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.
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)
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
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?
(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.
(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.
(However, make sure that you connection to libvirt is read-only. Vdsm does not allow rw connections to libvirt when it is installed.)
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:
spacewalk.git master: bf4e0a4736186ea5473b425e23e55bf0c3420003
*** Bug 841215 has been marked as a duplicate of this bug. ***