Bug 820862
| Summary: | vdsm and poller error messages on rhel6.2 vdsm managed from rhev 3.0 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Satellite 5 | Reporter: | Karl Stevens <kstevens> | ||||
| Component: | Virtualization | Assignee: | Milan Zázrivec <mzazrivec> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Martin Minar <mminar> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | unspecified | CC: | abaron, bazulay, cperry, danken, gwatson, iheim, jblazek, jpazdziora, mkoci, mkollar, mminar, rhodain, stuart.browne, ykaul | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | infra storage | ||||||
| Fixed In Version: | S-5.4.34-4 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2012-10-12 09:57:45 UTC | Type: | Bug | ||||
| 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: | 818987, 819024 | ||||||
| Attachments: |
|
||||||
|
Description
Karl Stevens
2012-05-11 08:41:33 UTC
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. *** |