Commit 167b074
committed
CLOS-4056 follow-up: gate check_cl_license on is_cln_package_channel_active() + fix dead inhibitor branch
The check_cl_license actor verifies CL licensing by calling /usr/sbin/rhn_check,
which under rhn-client-tools >= 3.0 does an XML-RPC roundtrip to CLN to refresh
the JWT credential. On a no-auth (SWNG) system the systemid file written by
clnreg_ks (2.x flow) is not in the format rhn_check 3.0+ expects against the
prod CLN server, and the call dies with
rhn-plugin: Error communicating with server. The message was:
com.cloudlinux.clos.domain.exceptions.xmlrpc.ClnXmlRpcException:
(=_=) Invalid System Credentials. Cannot parse request or identify
server. Please, run registration again.
elevate-qa Run #55 hit this immediately after the CLBS bundle began landing
rhn-client-tools 3.0.3 source-side (now that the cln-switch-channel=2 install-
time pin no longer forces a 2.x downgrade).
Under no-auth, licensing is not the CLN XML-RPC roundtrip - it's IP-based
(or other static mechanisms). The rhn_check route is the wrong validation
here. Gate the actor on is_cln_package_channel_active() and skip when it
returns False, matching the same pattern the other CLOS-4056-gated actors
use (switchclnchannel, pinclnmirror, copycllicense, ...).
While here, fix a pre-existing dead-code bug: `run([rhn_check_bin])` raises
CalledProcessError on non-zero exit, so the `if not res or res['exit_code']
!= 0 or res['stderr']: produce inhibitor` branch never executed on CLN-active
failures - the actor crashed instead of producing the intended INHIBITOR
report. Wrap the run() call in try/except so the existing reporting path
takes over when rhn_check fails on a CLN-active system.1 parent e89d73b commit 167b074
1 file changed
Lines changed: 27 additions & 2 deletions
Lines changed: 27 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
32 | 48 | | |
33 | 49 | | |
34 | | - | |
35 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
36 | 61 | | |
37 | 62 | | |
38 | 63 | | |
| |||
0 commit comments