Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
After installing katello-agent on a RHEL 9 host, Goferd service fails to start with error AttributeError: 'Scheduler' object has no attribute 'isAlive'
Description of problem:
Python 3.9 has renamed the isAlive() method to is_alive().
RHEL 9 runs on Python 3.9 but the gofer package we ship via satellite-client-6-for-rhel-9-x86_64-rpms repo, It still contains the isAlive() method.
# grep -r isAlive /usr/lib/python3.9/site-packages/gofer/
grep: /usr/lib/python3.9/site-packages/gofer/agent/__pycache__/plugin.cpython-39.opt-1.pyc: binary file matches
grep: /usr/lib/python3.9/site-packages/gofer/agent/__pycache__/plugin.cpython-39.pyc: binary file matches
/usr/lib/python3.9/site-packages/gofer/agent/plugin.py: return self.scheduler.isAlive()
Version-Release number of selected component (if applicable):
Satellite 6.11 and 6.12
RHEL 9
python3-gofer-2.12.5-7.1.el9sat.noarch
How reproducible:
Always
Steps to Reproduce:
1. Install a Sat 6.12 or 6.11
2. Sync satellite-client-6-for-rhel-9-x86_64-rpms in satellite
3. Connect a RHEL 9 client with the satellite.
4. Enable the satellite-client-6-for-rhel-9-x86_64-rpms repo on the RHEL 9 host
5. Install katello-agent on the RHEL 9 host
6. Check the status of goferd on the RHEL 9 host.
Actual results:
# systemctl status goferd
× goferd.service - Gofer Agent
Loaded: loaded (/usr/lib/systemd/system/goferd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2022-09-05 13:04:11 UTC; 4s ago
Process: 5093 ExecStart=/usr/bin/env ${PYTHON} /usr/bin/goferd --foreground (code=exited, status=1/FAILURE)
Main PID: 5093 (code=exited, status=1/FAILURE)
CPU: 234ms
Sep 05 13:04:10 rhel9.example.com env[5093]: plugin.start()
Sep 05 13:04:10 rhel9.example.com env[5093]: File "/usr/lib/python3.9/site-packages/gofer/common.py", line 312, in sfn
Sep 05 13:04:10 rhel9.example.com env[5093]: return fn(*args, **kwargs)
Sep 05 13:04:10 rhel9.example.com env[5093]: File "/usr/lib/python3.9/site-packages/gofer/agent/plugin.py", line 317, in start
Sep 05 13:04:10 rhel9.example.com env[5093]: if self.is_started:
Sep 05 13:04:10 rhel9.example.com env[5093]: File "/usr/lib/python3.9/site-packages/gofer/agent/plugin.py", line 304, in is_started
Sep 05 13:04:10 rhel9.example.com env[5093]: return self.scheduler.isAlive()
Sep 05 13:04:10 rhel9.example.com env[5093]: AttributeError: 'Scheduler' object has no attribute 'isAlive'
Sep 05 13:04:11 rhel9.example.com systemd[1]: goferd.service: Main process exited, code=exited, status=1/FAILURE
Sep 05 13:04:11 rhel9.example.com systemd[1]: goferd.service: Failed with result 'exit-code'.
Expected results:
If we are shipping the package and the goferd service, It should be running fine for RHEL 9 as well.
Additional info:
Following fixes the issue on RHEL 9 host.
# cd /usr/lib/python3.9/site-packages/gofer/
# git init .;git add .;git commit -m 'original state'
# vi agent/plugin.py
# git diff
diff --git a/agent/plugin.py b/agent/plugin.py
index a3f3c97..ae9d6ba 100644
--- a/agent/plugin.py
+++ b/agent/plugin.py
@@ -301,7 +301,7 @@ class Plugin(object):
@property
def is_started(self):
- return self.scheduler.isAlive()
+ return self.scheduler.is_alive()
@property
def latency(self):
# systemctl restart goferd
# systemctl status goferd -l
● goferd.service - Gofer Agent
Loaded: loaded (/usr/lib/systemd/system/goferd.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2022-09-05 13:08:12 UTC; 5s ago
Main PID: 16514 (python3)
Verified.
Tested on Satellite 6.12.0 Snap 12.0
Version: python3-gofer-2.12.5-8.el9sat.noarch
Steps:
1. Setup Satellite 6.12, Enable/Sync dogfood EL9 client repo and register a RHEL9 host
2. Verify EL9 client repo is enabled and this on RHEL9 client
# grep -nR is_alive /usr/lib/python3.9/site-packages/gofer/agent/plugin.py
304: return self.scheduler.is_alive()
3. Install katello-agent and check the status of goferd on the RHEL9 host
Observation:
katello-agent install works and goferd is in running state after install on EL9 host, Package install via katello-agent worked.
Additionally, I tested EL7 and EL8 content hosts with this fix for renaming "isAlive" to "is_alive" is done, and they also worked fine.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (Important: Satellite 6.12 Release), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2022:8506
Description of problem: Python 3.9 has renamed the isAlive() method to is_alive(). RHEL 9 runs on Python 3.9 but the gofer package we ship via satellite-client-6-for-rhel-9-x86_64-rpms repo, It still contains the isAlive() method. # grep -r isAlive /usr/lib/python3.9/site-packages/gofer/ grep: /usr/lib/python3.9/site-packages/gofer/agent/__pycache__/plugin.cpython-39.opt-1.pyc: binary file matches grep: /usr/lib/python3.9/site-packages/gofer/agent/__pycache__/plugin.cpython-39.pyc: binary file matches /usr/lib/python3.9/site-packages/gofer/agent/plugin.py: return self.scheduler.isAlive() Version-Release number of selected component (if applicable): Satellite 6.11 and 6.12 RHEL 9 python3-gofer-2.12.5-7.1.el9sat.noarch How reproducible: Always Steps to Reproduce: 1. Install a Sat 6.12 or 6.11 2. Sync satellite-client-6-for-rhel-9-x86_64-rpms in satellite 3. Connect a RHEL 9 client with the satellite. 4. Enable the satellite-client-6-for-rhel-9-x86_64-rpms repo on the RHEL 9 host 5. Install katello-agent on the RHEL 9 host 6. Check the status of goferd on the RHEL 9 host. Actual results: # systemctl status goferd × goferd.service - Gofer Agent Loaded: loaded (/usr/lib/systemd/system/goferd.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Mon 2022-09-05 13:04:11 UTC; 4s ago Process: 5093 ExecStart=/usr/bin/env ${PYTHON} /usr/bin/goferd --foreground (code=exited, status=1/FAILURE) Main PID: 5093 (code=exited, status=1/FAILURE) CPU: 234ms Sep 05 13:04:10 rhel9.example.com env[5093]: plugin.start() Sep 05 13:04:10 rhel9.example.com env[5093]: File "/usr/lib/python3.9/site-packages/gofer/common.py", line 312, in sfn Sep 05 13:04:10 rhel9.example.com env[5093]: return fn(*args, **kwargs) Sep 05 13:04:10 rhel9.example.com env[5093]: File "/usr/lib/python3.9/site-packages/gofer/agent/plugin.py", line 317, in start Sep 05 13:04:10 rhel9.example.com env[5093]: if self.is_started: Sep 05 13:04:10 rhel9.example.com env[5093]: File "/usr/lib/python3.9/site-packages/gofer/agent/plugin.py", line 304, in is_started Sep 05 13:04:10 rhel9.example.com env[5093]: return self.scheduler.isAlive() Sep 05 13:04:10 rhel9.example.com env[5093]: AttributeError: 'Scheduler' object has no attribute 'isAlive' Sep 05 13:04:11 rhel9.example.com systemd[1]: goferd.service: Main process exited, code=exited, status=1/FAILURE Sep 05 13:04:11 rhel9.example.com systemd[1]: goferd.service: Failed with result 'exit-code'. Expected results: If we are shipping the package and the goferd service, It should be running fine for RHEL 9 as well. Additional info: Following fixes the issue on RHEL 9 host. # cd /usr/lib/python3.9/site-packages/gofer/ # git init .;git add .;git commit -m 'original state' # vi agent/plugin.py # git diff diff --git a/agent/plugin.py b/agent/plugin.py index a3f3c97..ae9d6ba 100644 --- a/agent/plugin.py +++ b/agent/plugin.py @@ -301,7 +301,7 @@ class Plugin(object): @property def is_started(self): - return self.scheduler.isAlive() + return self.scheduler.is_alive() @property def latency(self): # systemctl restart goferd # systemctl status goferd -l ● goferd.service - Gofer Agent Loaded: loaded (/usr/lib/systemd/system/goferd.service; enabled; vendor preset: disabled) Active: active (running) since Mon 2022-09-05 13:08:12 UTC; 5s ago Main PID: 16514 (python3)