Bug 1733098 - Command subscription-manager release --set=? only affect once at the first time for repoquery, but option --releasever=? works
Summary: Command subscription-manager release --set=? only affect once at the first ti...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: redhat-release
Version: 7.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: pdubovsk
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-25 08:13 UTC by Fengshuang Tan
Modified: 2019-08-07 20:27 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)

Description Fengshuang Tan 2019-07-25 08:13:22 UTC
Description of problem:
Command subscription-manager release --set=? only affect once at the first time for repoquery, but option --releasever=? works.

And this issue exists for several products, so I think it should be redhat-release's issue.

Version-Release number of selected component (if applicable):
RHEL-7.6-updates-20190722.1
RHEL-7.6

How reproducible:
always

Steps to Reproduce:
1. Register, subscribe and release list.
[root@amd-pike-06 ~]# subscription-manager register --auto-attach
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: entitlement_testing
Password: 
The system has been registered with ID: f2df2cc2-445e-4736-bc26-0694d3427e74
The registered system name is: amd-pike-06.khw2.lab.eng.bos.redhat.com
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed[root@amd-pike-06 ~]# subscription-manager list --avail | grep -C 4 ESA0002
                     Red Hat Virtualization Host
                     JBoss Enterprise Application Platform
                     Red Hat Enterprise Linux Atomic Host
                     Red Hat Virtualization - Extended Update Support
SKU:                 ESA0002
Contract:            11872185
Pool ID:             8a99f9a86a74615d016a961e758907e1
Provides Management: No
Available:           Unlimited
[root@amd-pike-06 ~]# subscription-manager subscribe --pool=8a99f9a86a74615d016a961e758907e1
Successfully attached a subscription for: Red Hat Enterprise Virtualization, Premium (One Year, Enterprise Program)
[root@amd-pike-06 ~]# subscription-manager release --list
+-------------------------------------------+
          Available Releases
+-------------------------------------------+
7.0
7.1
7.2
7.3
7.4
7.5
7.6
7.7
7Server

2. Command repoquery failed when run it first on one  new system.
[root@amd-pike-06 ~]# subscription-manager release --show
Release not set
[root@amd-pike-06 ~]# repoquery --pkgnarrow=available --quiet --all --repoid=rhel-7-server-rhvh-4.2-build-eus-source-rpms --archlist=src --qf "%{name}%{version}%{release}.src"
Could not match packages: failure: repodata/repomd.xml from rhel-7-server-rhvh-4.2-build-eus-source-rpms: [Errno 256] No more mirrors to try.
https://cdn.redhat.com/content/eus/rhel/server/7/7Server/x86_64/rhvh-build/4.2/source/SRPMS/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
[root@amd-pike-06 ~]# cat /etc/yum.repos.d/redhat.repo | grep -A 3 rhel-7-server-rhvh-4.2-build-eus-source-rpms
[rhel-7-server-rhvh-4.2-build-eus-source-rpms]
metadata_expire = 86400
sslclientcert = /etc/pki/entitlement/1350548501032152274.pem
baseurl = https://cdn.redhat.com/content/eus/rhel/server/7/$releasever/$basearch/rhvh-build/4.2/source/SRPMS

3. Command repoquery works for release 7.6
[root@amd-pike-06 ~]# subscription-manager release --set=7.6
Release set to: 7.6
[root@amd-pike-06 ~]# cat /etc/yum.repos.d/redhat.repo | grep -A 3 rhel-7-server-rhvh-4.2-build-eus-source-rpms
[rhel-7-server-rhvh-4.2-build-eus-source-rpms]
metadata_expire = 86400
sslclientcert = /etc/pki/entitlement/1350548501032152274.pem
baseurl = https://cdn.redhat.com/content/eus/rhel/server/7/7.6/$basearch/rhvh-build/4.2/source/SRPMS
[root@amd-pike-06 ~]# repoquery --pkgnarrow=available --quiet --all --repoid=rhel-7-server-rhvh-4.2-build-eus-source-rpms --archlist=src --qf "%{name}%{version}%{release}.src"
cockpit-ovirt0.11.401.el7ev.src
imgbased1.0.311.el7ev.src
ovirt-node-ng4.2.00.20170814.0.el7.src
redhat-release-virtualization-host4.211.1.el7.src

4. Command repoquery worked when I set it as 7.7 - which should be incorrect
[root@amd-pike-06 ~]# subscription-manager release --set=7.7
Release set to: 7.7
[root@amd-pike-06 ~]# cat /etc/yum.repos.d/redhat.repo | grep -A 3 rhel-7-server-rhvh-4.2-build-eus-source-rpms
[rhel-7-server-rhvh-4.2-build-eus-source-rpms]
metadata_expire = 86400
sslclientcert = /etc/pki/entitlement/1350548501032152274.pem
baseurl = https://cdn.redhat.com/content/eus/rhel/server/7/7.7/$basearch/rhvh-build/4.2/source/SRPMS
[root@amd-pike-06 ~]# repoquery --pkgnarrow=available --quiet --all --repoid=rhel-7-server-rhvh-4.2-build-eus-source-rpms --archlist=src --qf "%{name}%{version}%{release}.src"
cockpit-ovirt0.11.401.el7ev.src
imgbased1.0.311.el7ev.src
ovirt-node-ng4.2.00.20170814.0.el7.src
redhat-release-virtualization-host4.211.1.el7.src

5. Command repoquery worked when I unset the release - which should be incorrect
[root@amd-pike-06 ~]# subscription-manager release --unset
Release preference has been unset
[root@amd-pike-06 ~]# cat /etc/yum.repos.d/redhat.repo | grep -A 3 rhel-7-server-rhvh-4.2-build-eus-source-rpms
[rhel-7-server-rhvh-4.2-build-eus-source-rpms]
metadata_expire = 86400
sslclientcert = /etc/pki/entitlement/1350548501032152274.pem
baseurl = https://cdn.redhat.com/content/eus/rhel/server/7/$releasever/$basearch/rhvh-build/4.2/source/SRPMS
[root@amd-pike-06 ~]# repoquery --pkgnarrow=available --quiet --all --repoid=rhel-7-server-rhvh-4.2-build-eus-source-rpms --archlist=src --qf "%{name}%{version}%{release}.src"
cockpit-ovirt0.11.401.el7ev.src
imgbased1.0.311.el7ev.src
ovirt-node-ng4.2.00.20170814.0.el7.src
redhat-release-virtualization-host4.211.1.el7.src

6. Command repoquery worked when I set the release as 7Server
[root@amd-pike-06 ~]# subscription-manager release --set=7Server
Release set to: 7Server
[root@amd-pike-06 ~]# cat /etc/yum.repos.d/redhat.repo | grep -A 3 rhel-7-server-rhvh-4.2-build-eus-source-rpms
[rhel-7-server-rhvh-4.2-build-eus-source-rpms]
metadata_expire = 86400
sslclientcert = /etc/pki/entitlement/1350548501032152274.pem
baseurl = https://cdn.redhat.com/content/eus/rhel/server/7/7Server/$basearch/rhvh-build/4.2/source/SRPMS
[root@amd-pike-06 ~]# repoquery --pkgnarrow=available --quiet --all --repoid=rhel-7-server-rhvh-4.2-build-eus-source-rpms --archlist=src --qf "%{name}%{version}%{release}.src"
cockpit-ovirt0.11.401.el7ev.src
imgbased1.0.311.el7ev.src
ovirt-node-ng4.2.00.20170814.0.el7.src
redhat-release-virtualization-host4.211.1.el7.src

7. Additionally, rhvh-4.2-build repos exists only for 7.6 release.
[ftan@dhcp-128-22 CDN_Debug_Cert]$ curl --cert ./rcm-debug-2028-04-05.crt --key ./rcm-debug-2028-04-05.key -k https://cdn.redhat.com/content/eus/rhel/server/7/7Server/x86_64/rhvh-build/4.2/source/SRPMS
File not found.
[ftan@dhcp-128-22 CDN_Debug_Cert]$ curl --cert ./rcm-debug-2028-04-05.crt --key ./rcm-debug-2028-04-05.key -k https://cdn.redhat.com/content/eus/rhel/server/7/7.7/x86_64/rhvh-build/4.2/source/SRPMS
File not found. 
[ftan@dhcp-128-22 CDN_Debug_Cert]$ curl --cert ./rcm-debug-2028-04-05.crt --key ./rcm-debug-2028-04-05.key -k https://cdn.redhat.com/content/eus/rhel/server/7/7.6/x86_64/rhvh-build/4.2/source/SRPMS
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
 <HEAD>
  <TITLE>Index of /98675/rcm/content/eus/rhel/server/7/7.6/x86_64/rhvh-build/4.2/source/SRPMS</TITLE>
 </HEAD>
 <BODY>
<H1>Index of /98675/rcm/content/eus/rhel/server/7/7.6/x86_64/rhvh-build/4.2/source/SRPMS</H1>
<PRE>   <A HREF="?N=D">Name</A>                              <A HREF="?M=A">Last modified</A>        <A HREF="?S=A">Size</A>  
<HR>
<IMG SRC="/icons/dir.gif" ALT="[DIR]"> <A HREF="SRPMS/..">Parent Directory</A>                  25-Jun-2019 09:02     1k  
<IMG SRC="/icons/dir.gif" ALT="[DIR]"> <A HREF="SRPMS/Packages/">Packages/</A>                         25-Jun-2019 08:57     1k  
<IMG SRC="/icons/dir.gif" ALT="[DIR]"> <A HREF="SRPMS/repodata/">repodata/</A>                         10-Jul-2019 01:12     1k  
</PRE><HR>
</BODY></HTML>

8.I tried yum clean all, the same result(works for 7.6/7.7/7Server release)

9. And, if I unregister and register again, rhvh-4.2-build repos still works for all releases(7.6/7.7/7Server), I installed another new system, then command repoquery failed before I set the release as 7.6.



Additional info:
 I tried another 2 repos today on compose RHEL-7.6-updates-20190722.1, the same result:

1. Register and subscribe
[root@cloud-qe-16-vm-09 ~]# subscription-manager register --auto-attach
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: entitlement_testing
Password: 
The system has been registered with ID: d869d5a2-29c3-4d8c-8390-09a68371830a
The registered system name is: cloud-qe-16-vm-09.idmqe.lab.eng.bos.redhat.com
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status: Subscribed
[root@cloud-qe-16-vm-09 ~]# subscription-manager subscribe --pool=8a99f9a86a74615d016a961e758907e1
Successfully attached a subscription for: Red Hat Enterprise Virtualization, Premium (One Year, Enterprise Program)
[root@cloud-qe-16-vm-09 ~]# subscription-manager release --list
+-------------------------------------------+
 Available Releases
+-------------------------------------------+
7.0
7.1
7.2
7.3
7.4
7.5
7.6
7.7
7Server

2. Succeeded to repoquery repo rhel-7-server-openstack-8-tools-debug-rpms on release 7.6  --> for this step, I only want to change the release with rhsm command.
[root@cloud-qe-16-vm-09 ~]# subscription-manager release --set=7.6
Release set to: 7.6
[root@cloud-qe-16-vm-09 ~]# repoquery -a --repoid=rhel-7-server-openstack-8-tools-debug-rpms
python-crypto-debuginfo-0:2.6.1-16.el7ost.x86_64
python-msgpack-debuginfo-0:0.4.6-3.el7ost.x86_64
python-netifaces-debuginfo-0:0.10.4-3.el7ost.x86_64
python-simplejson-debuginfo-0:3.5.3-1.el7ost.x86_64
python-wrapt-debuginfo-0:1.10.5-1.el7ost.x86_64

3. Also succeeded to repoquery repo rhel-7-server-openstack-8-tools-debug-rpms on release 7.1, but it should be **FAIL** on release 7.1
[root@cloud-qe-16-vm-09 ~]# subscription-manager release --set=7.1
Release set to: 7.1
[root@cloud-qe-16-vm-09 ~]# repoquery -a --repoid=rhel-7-server-openstack-8-tools-debug-rpms
python-crypto-debuginfo-0:2.6.1-16.el7ost.x86_64
python-msgpack-debuginfo-0:0.4.6-3.el7ost.x86_64
python-netifaces-debuginfo-0:0.10.4-3.el7ost.x86_64
python-simplejson-debuginfo-0:3.5.3-1.el7ost.x86_64
python-wrapt-debuginfo-0:1.10.5-1.el7ost.x86_64
[ftan@dhcp-128-22 CDN_Debug_Cert]$ curl --cert ./rcm-debug-2028-04-05.crt --key ./rcm-debug-2028-04-05.key -k https://cdn.redhat.com/content/dist/rhel/server/7/7.1/x86_64/openstack-tools/8/debug
File not found.
 
4. But it works when set option --releasever=7.1
[root@cloud-qe-16-vm-09 ~]# repoquery -a --repoid=rhel-7-server-openstack-8-tools-debug-rpms --releasever=7.1
failure: repodata/repomd.xml from rhel-7-server-openstack-8-tools-debug-rpms: [Errno 256] No more mirrors to try.
https://cdn.redhat.com/content/dist/rhel/server/7/7.1/x86_64/openstack-tools/8/debug/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found

5. And, for repo rh-gluster-3-client-for-rhel-7-server-source-rpms, the same result:
[root@cloud-qe-16-vm-09 ~]# subscription-manager release
Release: 7.1
[root@cloud-qe-16-vm-01 ~]# repoquery --pkgnarrow=available --quiet --all --repoid=rh-gluster-3-client-for-rhel-7-server-source-rpms --archlist=src
cns-deploy-0:7.0.0-11.el7rhgs.src
glusterfs-0:3.12.2-47.2.el7.src
heketi-0:8.0.0-12.el7rhgs.src
[root@cloud-qe-16-vm-01 ~]# repoquery --pkgnarrow=available --quiet --all --repoid=rh-gluster-3-client-for-rhel-7-server-source-rpms --archlist=src --releasever=7.1 ---> got correct result when add option --releasever=7.1
glusterfs-0:3.7.1-16.el7.src
[ftan@dhcp-128-22 CDN_Debug_Cert]$ curl --cert ./rcm-debug-2028-04-05.crt --key ./rcm-debug-2028-04-05.key -k https://cdn.redhat.com/content/dist/rhel/server/7/7.1/x86_64/rhs-client/source/SRPMS
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
 <HEAD>
 <TITLE>Index of /98675/rcm/content/dist/rhel/server/7/7.1/x86_64/rhs-client/source/SRPMS</TITLE>
 </HEAD>
 <BODY>
<H1>Index of /98675/rcm/content/dist/rhel/server/7/7.1/x86_64/rhs-client/source/SRPMS</H1>
<PRE> <A HREF="?N=D">Name</A> <A HREF="?M=A">Last modified</A> <A HREF="?S=A">Size</A> 
<HR>
<IMG SRC="/icons/dir.gif" ALT="[DIR]"> <A HREF="SRPMS/..">Parent Directory</A> 05-Jun-2019 08:16 1k 
<IMG SRC="/icons/generic.gif" ALT="[FILE]"> <A HREF="SRPMS/glusterfs-3.7.1-11.el7.src.rpm">glusterfs-3.7.1-11.el7.src.rpm</A> 05-Aug-2015 20:16 7.6M 
<IMG SRC="/icons/generic.gif" ALT="[FILE]"> <A HREF="SRPMS/glusterfs-3.7.1-16.el7.src.rpm">glusterfs-3.7.1-16.el7.src.rpm</A> 01-Oct-2015 07:14 7.8M 
<IMG SRC="/icons/dir.gif" ALT="[DIR]"> <A HREF="SRPMS/repodata/">repodata/</A> 05-Jun-2019 08:16 1k 
</PRE><HR>
</BODY></HTML>


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