Description of problem: anamon was updated for RHEL8 and python3 recently (see bug 1619482), but the update has broken older releases like RHEL7. The serial console log shows: + /usr/libexec/platform-python /tmp/anamon --recipe-id 5619971 --xmlrpc-url http://lab-02.rhts.eng.bos.redhat.com:8000/RPC2 Traceback (most recent call last): File "/tmp/anamon", line 21, in <module> from xmlrpc.client import Server as xmlrpc_server ImportError: No module named xmlrpc.client Version-Release number of selected component (if applicable): Beaker 25.6 How reproducible: always Steps to Reproduce: 1. provision a system with a recent snapshot of RHEL-7.6 Actual results: no anaconda logs are attached to the job console log shows anamon failed with ImportError: No module named xmlrpc.client Expected results: anamon uploads anaconda logs to Beaker Additional info:
Kickstart checks for the presence of /usr/libexec/platform-python when deciding to use anamon or anamon3: if command -v python3 >/dev/null ; then fetch /tmp/anamon http://lab-02.rhts.eng.bos.redhat.com/beaker/anamon3 python_command="python3" elif [ -f /usr/libexec/platform-python ] ; then fetch /tmp/anamon http://lab-02.rhts.eng.bos.redhat.com/beaker/anamon3 python_command="/usr/libexec/platform-python" else fetch /tmp/anamon http://lab-02.rhts.eng.bos.redhat.com/beaker/anamon python_command="python" fi RHEL 7 also has /usr/libexec/platform-python but it is Python 2.x: [anaconda root@huawei-t2280-06 ~]# /usr/libexec/platform-python Python 2.7.5 (default, Jul 16 2018, 15:58:59) ...
Untested, but this should work: ... elif [ -f /usr/libexec/platform-python ] ; then if /usr/libexec/platform-python --version 2>&1 | grep -q "Python 2" ; then fetch /tmp/anamon http://lab-02.rhts.eng.bos.redhat.com/beaker/anamon python_command="python" else fetch /tmp/anamon http://lab-02.rhts.eng.bos.redhat.com/beaker/anamon3 python_command="/usr/libexec/platform-python" fi else ...
Scratch comment 3. This is better: elif [ -f /usr/libexec/platform-python ] && \ /usr/libexec/platform-python --version 2>&1 | grep -q "Python 3" ; then fetch /tmp/anamon http://lab-02.rhts.eng.bos.redhat.com/beaker/anamon3 python_command="/usr/libexec/platform-python" else
Patch submitted from idea in comment 4: https://gerrit.beaker-project.org/6295
Dear Jeff, many thanks for the patch and the bug report. Is this a blocking issue? It seems the job did pass. We do have an extensive acceptance test suite we've run before the release which didn't uncover this problem. Has platform-python been added to very recent versions of RHEL 7.6?
I think this is not blocking since kickstarts generally work fine. If kickstarts fail, though, we won't have the logs to learn why. Martin, would you consider this a blocker for RTT? It looks like platform-python is indeed new in RHEL 7.6. I checked RHEL 7.0 through 7.5 and it did not exist in the LiveOS/squashfs.img, but it does exist in the latest 7.6 composes.
*** Bug 1631398 has been marked as a duplicate of this bug. ***
This bug was fixed on the release-25 branch, but the next release will be Beaker 26.0.
Beaker 26.0 has been released.