| Summary: | Installing rhn-virtualization-host on Fedora 23+ clients breaks rhn-profile-sync | |||
|---|---|---|---|---|
| Product: | [Community] Spacewalk | Reporter: | Brian Harrington <bharrington> | |
| Component: | Clients | Assignee: | Gennadii Altukhov <galtukho> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Radovan Drazny <rdrazny> | |
| Severity: | high | Docs Contact: | ||
| Priority: | high | |||
| Version: | 2.5 | CC: | eherget, ggainey, rdrazny, tlestach | |
| Target Milestone: | --- | |||
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | 5.4.56-1 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1395893 (view as bug list) | Environment: | ||
| Last Closed: | 2017-09-27 19:22:21 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: | ||
| Bug Depends On: | ||||
| Bug Blocks: | 1310034, 1395893, 1484117 | |||
Ugh - nice catch. To (continue) working around the problem, you will also need to: # sudo dnf install libvirt-python3 # sudo 2to3 -w /usr/share/rhn/virtualization/schedule_poller.py and make the following changes (in addition to the effects of 2to3): # diff ORIG/domain_config.py /usr/share/rhn/virtualization/domain_config.py 17d16 < import string 67c66 < if string.find(uuid, ".xml") > 1 and os.path.exists(uuid): --- > if uuid.decode('utf-8').find(".xml") > 1 and os.path.exists(uuid): 250c245 < (string.join(tag_path, '/'), self.__file_name)), None, sys.exc_info()[2] --- > (tag_path.join('/'), self.__file_name)).with_traceback(sys.exc_info()[2]) # diff ORIG/domain_directory.py /usr/share/rhn/virtualization/domain_directory.py 214c212 < cfg_file.write(string.strip(xml)) --- > cfg_file.write(xml.strip()) # diff ORIG/util.py /usr/share/rhn/virtualization/util.py 45c45 < return uuid.replace('-', '') --- > return uuid.decode('utf-8').replace('-', '') # diff ORIG/schedule_poller.py /usr/share/rhn/virtualization/schedule_poller.py 18d17 < import string 41,50c40,49 < if type(minute) != types.StringType: < minute = string.strip(str(minute)) < if type(hour) != types.StringType: < hour = string.strip(str(hour)) < if type(dom) != types.StringType: < dom = string.strip(str(dom)) < if type(month) != types.StringType: < month = string.strip(str(month)) < if type(dow) != types.StringType: < dow = string.strip(str(dow)) --- > if type(minute) != bytes: > minute = str(minute).strip() > if type(hour) != bytes: > hour = str(hour).strip() > if type(dom) != bytes: > dom = str(dom).strip() > if type(month) != bytes: > month = str(month).strip() > if type(dow) != bytes: > dow = str(dow).strip() With these changes, I was able to get my F23 host registered correctly. If/as you notice any issues, log them here. fixed in spacewalk.git: 621f4d1f5a174f2b0df54adbeb2cc96741e01e1a Switching to modified... Reproduced on rhn-virtualization-{common,host}-5.4.55-1 using the reproducer from initial report with the same result:
# rhn-profile-sync
Traceback (most recent call last):
File "/usr/sbin/rhn-profile-sync", line 29, in <module>
from virtualization import support
File "/usr/share/rhn/virtualization/support.py", line 230
print _retrieve_virtual_domain_list()
^
SyntaxError: invalid syntax
After update to rhn-virtualization-common-5.4.56-1:
# rhn-profile-sync
Updating package profile...
Updating hardware profile...
No errors in /var/log/up2date, and the system has Virtualization tab in the SW WebUI.
VERIFIED
This looks like it was fixed in previous release, but I'm closing it in this one. Spacewalk 2.7 has been released. https://github.com/spacewalkproject/spacewalk/wiki/ReleaseNotes27 |
Description of problem: Much of the python in the rhn-virtualization-common and rhn-virtualization-host packages is still of the era of python2. Version-Release number of selected component (if applicable): 2.5 How reproducible: 100% Steps to Reproduce: 1. install Fedora 23 or 24 2. Add the corresponding spacewalk-client repos 3. install rhn-virtualization-common and rhn-virtualization-host 4. run rhn-profile-sync Actual results: [root@provisioner rhn]# rhn-profile-sync Traceback (most recent call last): File "/usr/sbin/rhn-profile-sync", line 29, in <module> from virtualization import support File "/usr/share/rhn/virtualization/support.py", line 230 print _retrieve_virtual_domain_list() ^ Expected results: [root@provisioner rhn]# rhn-profile-sync Updating package profile... Updating hardware profile... Additional info: While not great, using 2to3 solves the outright breakage of the functions but does not resolve the propagation of VM information: 2to3 -w /usr/share/rhn/virtualization/support.py 2to3 -w /usr/share/rhn/virtualization/domain_control.py 2to3 -w /usr/share/rhn/virtualization/poller.py 2to3 -w /usr/share/rhn/virtualization/notification.py 2to3 -w /usr/share/rhn/virtualization/poller_state_cache.py 2to3 -w /usr/share/rhn/virtualization/domain_directory.py 2to3 -w /usr/share/rhn/virtualization/domain_config.py 2to3 -w /usr/share/rhn/virtualization/start_domain.py