RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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.
Bug 1823780 - /etc/cron.daily/rhsmd gives error sleep: missing operand [rhel-7.8.z]
Summary: /etc/cron.daily/rhsmd gives error sleep: missing operand [rhel-7.8.z]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.9
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
: 1824961 (view as bug list)
Depends On: 1803794
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-14 13:47 UTC by RAD team bot copy to z-stream
Modified: 2023-10-06 19:39 UTC (History)
32 users (show)

Fixed In Version: subscription-manager-1.24.26-2.el7_8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1803794
Environment:
Last Closed: 2020-05-12 18:40:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 4963101 0 None None None 2020-04-14 13:47:46 UTC
Red Hat Product Errata RHBA-2020:2101 0 None None None 2020-05-12 18:40:25 UTC

Description RAD team bot copy to z-stream 2020-04-14 13:47:41 UTC
This bug has been copied from bug #1803794 and has been proposed to be backported to 7.8 z-stream (EUS).

Comment 5 Rehana 2020-04-24 14:47:23 UTC
*** Bug 1824961 has been marked as a duplicate of this bug. ***

Comment 6 John Sefler 2020-04-27 21:35:12 UTC
Verification Testing...

Demonstrating the original failure on RHEL-7.8 with no processtimeout configuration in /etc/rhsm/rhsm.conf...
[root@intel-chiefriver-02 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.8 (Maipo)
[root@intel-chiefriver-02 ~]# rpm -q subscription-manager
subscription-manager-1.24.26-1.el7.x86_64
[root@intel-chiefriver-02 ~]# 
[root@intel-chiefriver-02 ~]# grep --ignore-case processtimeout /etc/rhsm/rhsm.conf
[root@intel-chiefriver-02 ~]# 
[root@intel-chiefriver-02 ~]# /etc/cron.daily/rhsmd
sleep: missing operand
Try 'sleep --help' for more information.
/etc/cron.daily/rhsmd: line 19: 22829 Terminated              /usr/libexec/rhsmd -s
[root@intel-chiefriver-02 ~]# 

BANG! Original "sleep: missing operand" failure reproduced.


Now I will upgrade (steps not shown) to the latest RHEL-7.8z stream build of subscription-manager and re-test
[root@intel-chiefriver-02 ~]# rpm -q subscription-manager
subscription-manager-1.24.26-3.el7_8.x86_64
[root@intel-chiefriver-02 ~]# rpm -q --changelog subscription-manager | grep 1823780
- 1823780: corrected missing quotes for config check; ENT-2010
[root@intel-chiefriver-02 ~]# 
[root@intel-chiefriver-02 ~]# grep --ignore-case processtimeout /etc/rhsm/rhsm.conf
[root@intel-chiefriver-02 ~]# 
[root@intel-chiefriver-02 ~]# /etc/cron.daily/rhsmd
[root@intel-chiefriver-02 ~]# 

VERIFIED: No more "sleep: missing operand" error.

In fact, a processtimeout of 5 minutes (300 seconds) was used as re-demonstrated below using "time" to show that when processtimeout is absent from the /etc/rhsm/rhsm.conf (which can occur during an upgrade situation), the /etc/cron.daily/rhsmd process will take 5 minutes to timeout...

[root@intel-chiefriver-02 ~]# grep --ignore-case processtimeout /etc/rhsm/rhsm.conf
[root@intel-chiefriver-02 ~]# 
[root@intel-chiefriver-02 ~]# subscription-manager config | grep --ignore-case processtimeout
   processtimeout = [300]
[root@intel-chiefriver-02 ~]# 
[root@intel-chiefriver-02 ~]# time /etc/cron.daily/rhsmd

real	5m0.034s
user	0m0.182s
sys	0m0.065s
[root@intel-chiefriver-02 ~]# 

VERIFIED: The /etc/cron.daily/rhsmd job will timeout after the default 5 minutes (the square braces in the config report indicates a default value).

Comment 11 errata-xmlrpc 2020-05-12 18:40:21 UTC
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, 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/RHBA-2020:2101


Note You need to log in before you can comment on or make changes to this bug.