Bug 2026320
| Summary: | client assumes SCA cert 'lastUpdate' date is in it's local timezone, then thinks it re-converts to UTC | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Rehana <redakkan> |
| Component: | subscription-manager | Assignee: | Pino Toscano <ptoscano> |
| Status: | CLOSED ERRATA | QA Contact: | Red Hat subscription-manager QE Team <rhsm-qe> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 9.0 | CC: | arpandey, candlepin-bugs, cdonnell, nmoumoul, rhsm-qe |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | 9.0 | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | subscription-manager-1.29.23-1.el9 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 2024589 | Environment: | |
| Last Closed: | 2022-05-17 15:58:19 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 2024589 | ||
| Bug Blocks: | |||
| Deadline: | 2022-01-11 | ||
|
Description
Rehana
2021-11-24 11:10:58 UTC
Pre-verification
Reproducing the issue on subscription-manager: 1.29.7-1.el9
[root@kvm-03-guest22 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.21-1
subscription management rules: 5.41
subscription-manager: 1.29.7-1.el9
[root@kvm-03-guest22 ~]#
[root@kvm-03-guest22 ~]# subscription-manager register --username rhel9GA --password *******
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
The system has been registered with ID: fcc3eadb-5aeb-4351-a674-ebaccb10fbc0
The registered system name is: kvm-03-guest22.lab.eng.rdu2.redhat.com
[root@kvm-03-guest22 ~]# cut -d ',' -f1 /var/lib/rhsm/cache/content_access.json
{"lastUpdate": "2022-01-17T16:50:32+0000" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< remember the value for lastUpdate to verify with If-Modified-Since header
[root@kvm-03-guest22 ~]#
[root@kvm-03-guest22 ~]# export SUBMAN_DEBUG_PRINT_REQUEST=1 SUBMAN_DEBUG_PRINT_REQUEST_HEADER=1
[root@kvm-03-guest22 ~]#
[root@kvm-03-guest22 ~]# subscription-manager refresh
<output cropped>
Making request: subscription.rhsm.stage.redhat.com:443 GET /subscription/consumers/fcc3eadb-5aeb-4351-a674-ebaccb10fbc0/accessible_content {'Content-type': 'application/json', 'Accept': 'application/json', 'x-subscription-manager-version': '1.29.7-1.el9', 'X-Correlation-ID': 'e1cd5a2bcd1f49159a58676bdbf12dc4', 'Accept-Language': 'en-us', 'User-Agent': 'RHSM/1.0 (cmd=subscription-manager) subscription-manager/1.29.7-1.el9', 'Content-Length': '0', 'If-Modified-Since': 'Mon, 17 Jan 2022 15:50:32 GMT'}
^^^^^ notice the time difference, subman is sending the date to be 1 hour earlier than what the cache says,
============================================================
verifying issue on jenkins build of sub-man
[root@kvm-03-guest22 ~]# rpm -qa subscription-manager
subscription-manager-1.29.23-1.git.0.e927a6c.el9.x86_64
[root@kvm-03-guest22 ~]# subscription-manager refresh
Making request: subscription.rhsm.stage.redhat.com:443 GET /subscription/consumers/fcc3eadb-5aeb-4351-a674-ebaccb10fbc0/certificates/serials {'Content-type': 'application/json', 'Accept': 'application/json', 'x-subscription-manager-version': '1.29.23-1.git.0.e927a6c.el9', 'X-Correlation-ID': 'd974c339f0a54de186e1b8156969c769', 'Accept-Language': 'en-us', 'User-Agent': 'RHSM/1.0 (cmd=subscription-manager) subscription-manager/1.29.23-1.git.0.e927a6c.el9', 'Content-Length': '0'}
Making request: subscription.rhsm.stage.redhat.com:443 GET /subscription/status {'Content-type': 'application/json', 'Accept': 'application/json', 'x-subscription-manager-version': '1.29.23-1.git.0.e927a6c.el9', 'X-Correlation-ID': 'd974c339f0a54de186e1b8156969c769', 'Accept-Language': 'en-us', 'User-Agent': 'RHSM/1.0 (cmd=subscription-manager) subscription-manager/1.29.23-1.git.0.e927a6c.el9', 'Content-Length': '0'}
Making request: subscription.rhsm.stage.redhat.com:443 GET /subscription/consumers/fcc3eadb-5aeb-4351-a674-ebaccb10fbc0/accessible_content {'Content-type': 'application/json', 'Accept': 'application/json', 'x-subscription-manager-version': '1.29.23-1.git.0.e927a6c.el9', 'X-Correlation-ID': 'd974c339f0a54de186e1b8156969c769', 'Accept-Language': 'en-us', 'User-Agent': 'RHSM/1.0 (cmd=subscription-manager) subscription-manager/1.29.23-1.git.0.e927a6c.el9', 'Content-Length': '0', 'If-Modified-Since': 'Mon, 17 Jan 2022 16:50:32 GMT'}
^^^^^ correct time reported
All local data refreshed
<output cropped>
Actual Results and expected results are same here, subman is sending the date correct date time.
Based on above observation setting verified field to tested.
Verifying on nightly build with sub-man version subscription-manager-1.29.23-1.el9.x86_64
Beaker Test information:
HOSTNAME=dell-per630-fc-01.dell2.lab.eng.bos.redhat.com
JOBID=6244150
RECIPEID=11377664
RESULT_SERVER=
DISTRO=RHEL-9.0.0-20220125.3
ARCHITECTURE=x86_64
[root@dell-per630-fc-01 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.22-1
subscription management rules: 5.41
subscription-manager: 1.29.23-1.el9
[root@dell-per630-fc-01 ~]# rpm -qa --changelog subscription-manager | grep 2026320
- 2026320: fix format of HTTP-date headers (ptoscano)
- 2026320: fix format of HTTP-date headers (ptoscano)
[root@dell-per630-fc-01 ~]#
[root@dell-per630-fc-01 ~]# subscription-manager register --username rhel9GA --password *****
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
The system has been registered with ID: 90f92978-3e21-4e51-bf3b-4018a01bbd5f
The registered system name is: dell-per630-fc-01.dell2.lab.eng.bos.redhat.com
[root@dell-per630-fc-01 ~]#
[root@dell-per630-fc-01 ~]#
[root@dell-per630-fc-01 ~]# cut -d ',' -f1 /var/lib/rhsm/cache/content_access.json
{"lastUpdate": "2022-01-31T07:39:32+0000"
[root@dell-per630-fc-01 ~]# export SUBMAN_DEBUG_PRINT_REQUEST=1 SUBMAN_DEBUG_PRINT_REQUEST_HEADER=1
[root@dell-per630-fc-01 ~]# subscription-manager refresh
Making request: subscription.rhsm.stage.redhat.com:443 GET /subscription/consumers/90f92978-3e21-4e51-bf3b-4018a01bbd5f/certificates/serials {'Content-type': 'application/json', 'Accept': 'application/json', 'x-subscription-manager-version': '1.29.23-1.el9', 'X-Correlation-ID': '7d0e4acc739340c9816425a2fdf5664a', 'Accept-Language': 'en-us', 'User-Agent': 'RHSM/1.0 (cmd=subscription-manager) subscription-manager/1.29.23-1.el9', 'Content-Length': '0'}
Making request: subscription.rhsm.stage.redhat.com:443 GET /subscription/status {'Content-type': 'application/json', 'Accept': 'application/json', 'x-subscription-manager-version': '1.29.23-1.el9', 'X-Correlation-ID': '7d0e4acc739340c9816425a2fdf5664a', 'Accept-Language': 'en-us', 'User-Agent': 'RHSM/1.0 (cmd=subscription-manager) subscription-manager/1.29.23-1.el9', 'Content-Length': '0'}
Making request: subscription.rhsm.stage.redhat.com:443 GET /subscription/consumers/90f92978-3e21-4e51-bf3b-4018a01bbd5f/accessible_content {'Content-type': 'application/json', 'Accept': 'application/json', 'x-subscription-manager-version': '1.29.23-1.el9', 'X-Correlation-ID': '7d0e4acc739340c9816425a2fdf5664a', 'Accept-Language': 'en-us', 'User-Agent': 'RHSM/1.0 (cmd=subscription-manager) subscription-manager/1.29.23-1.el9', 'Content-Length': '0', 'If-Modified-Since': 'Mon, 31 Jan 2022 07:39:32 GMT'}
^^^^^^^^^-------------------------------------header shows correct time
All local data refreshed
Making request: subscription.rhsm.stage.redhat.com:443 GET /subscription/consumers/90f92978-3e21-4e51-bf3b-4018a01bbd5f/compliance {'Content-type': 'application/json', 'Accept': 'application/json', 'x-subscription-manager-version': '1.29.23-1.el9', 'X-Correlation-ID': '7d0e4acc739340c9816425a2fdf5664a', 'Accept-Language': 'en-us', 'User-Agent': 'RHSM/1.0 (cmd=subscription-manager) subscription-manager/1.29.23-1.el9', 'Content-Length': '0'}
Making request: subscription.rhsm.stage.redhat.com:443 GET /subscription/consumers/90f92978-3e21-4e51-bf3b-4018a01bbd5f/compliance {'Content-type': 'application/json', 'Accept': 'application/json', 'x-subscription-manager-version': '1.29.23-1.el9', 'X-Correlation-ID': '7d0e4acc739340c9816425a2fdf5664a', 'Accept-Language': 'en-us', 'User-Agent': 'RHSM/1.0 (cmd=subscription-manager) subscription-manager/1.29.23-1.el9', 'Content-Length': '0'}
Making request: subscription.rhsm.stage.redhat.com:443 GET /subscription/consumers/90f92978-3e21-4e51-bf3b-4018a01bbd5f/compliance {'Content-type': 'application/json', 'Accept': 'application/json', 'x-subscription-manager-version': '1.29.23-1.el9', 'X-Correlation-ID': '7d0e4acc739340c9816425a2fdf5664a', 'Accept-Language': 'en-us', 'User-Agent': 'RHSM/1.0 (cmd=subscription-manager) subscription-manager/1.29.23-1.el9', 'Content-Length': '0'}
Making request: subscription.rhsm.stage.redhat.com:443 GET /subscription/consumers/90f92978-3e21-4e51-bf3b-4018a01bbd5f/compliance {'Content-type': 'application/json', 'Accept': 'application/json', 'x-subscription-manager-version': '1.29.23-1.el9', 'X-Correlation-ID': '7d0e4acc739340c9816425a2fdf5664a', 'Accept-Language': 'en-us', 'User-Agent': 'RHSM/1.0 (cmd=subscription-manager) subscription-manager/1.29.23-1.el9', 'Content-Length': '0'}
[root@dell-per630-fc-01 ~]#
Actual Results:
'If-Modified-Since': 'Mon, 31 Jan 2022 07:39:32 GMT'
Expected Results:
'If-Modified-Since': 'Mon, 31 Jan 2022 07:39:32 GMT'
Verification : Passed
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 (new packages: subscription-manager), 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-2022:3984 |