-
Story
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
rhel-sst-csi-client-tools
-
None
-
False
-
-
None
-
None
-
None
-
None
-
None
Goal
As a sysadmin, I use rhc in a bash script and act on return codes. Currently, there are no return codes for checking status. It's always zero.
rhc
[root@satellite.site3.example.com ~]$ rhc status Connection status for satellite.site3.example.com: ● Connected to Red Hat Subscription Management ● Connected to Red Hat Insights ● The Remote Host Configuration daemon is inactive Manage your connected systems: https://red.ht/connector [root@satellite.site3.example.com ~]$ echo $? 0 [root@satellite.site3.example.com ~]$
Compare that with what you get from systemctl.
systemctl
[root@satellite.site3.example.com ~]$ systemctl status rhcd
● rhcd.service - Remote Host Configuration daemon
Loaded: loaded (/usr/lib/systemd/system/rhcd.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Docs: https://github.com/redhatinsights/yggdrasil
[root@satellite.site3.example.com ~]$ echo $?
3
[root@satellite.site3.example.com ~]$
Acceptance Criteria
rhc status returns codes to show what is and is not OK. For instance, maybe base codes on an octet like this.
- rc 0 (000), all enabled
- rc 1 (001), RHSM OK, insights OK, rhcd daemon dead
- rc 2 (010), insights nope, others OK
- ...
- rc 7 (111), all dead