Bug 1736818 - [RHEL8] choose_repo.py should check redhat-rhui-beta.repo existing status before renaming it
Summary: [RHEL8] choose_repo.py should check redhat-rhui-beta.repo existing status bef...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: Operations
Version: 3.1.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Martin Minar
QA Contact: Vratislav Hutsky
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-02 06:32 UTC by Frank Liang
Modified: 2020-03-03 09:26 UTC (History)
9 users (show)

Fixed In Version: rh-amazon-rhui-client-3.0.22
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-03 09:26:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Frank Liang 2019-08-02 06:32:56 UTC
In RHEL-8.1.0_HVM_BETA-20190701-arm64-0-Hourly2-GP2 AMIs, choose_repo.py tries to rename '/etc/yum.repos.d/redhat-rhui-beta.repo' to '/etc/yum.repos.d/redhat-rhui-beta.repo.disabled'in each boot.

It was interrupt by the following exception:
# choose_repo.py
Traceback (most recent call last):
  File "/sbin/choose_repo.py", line 100, in <module>
    main()
  File "/sbin/choose_repo.py", line 80, in main
    os.rename('/etc/yum.repos.d/redhat-rhui-beta.repo', '/etc/yum.repos.d/redhat-rhui-beta.repo.disabled')
FileNotFoundError: [Errno 2] No such file or directory: '/etc/yum.repos.d/redhat-rhui-beta.repo' -> '/etc/yum.repos.d/redhat-rhui-beta.repo.disabled'

# rpm -qa|grep rhui
rh-amazon-rhui-client-3.0.18-1.el8.noarch

Version-Release number of selected component (if applicable):

RHEL Version:
RHEL8.1(4.18.0-107.el8.aarch64)

How reproducible:
100%

Steps to Reproduce:
1. Boot RHEL8.1 beta AMIs and reboot it.
2. Check the journalctl log after reboot
Actual results:
choose_repo.py was interrupted
Expected results:
choose_repo.py run without error throw out.

Additional info:
-N/A

Comment 1 Frank Liang 2019-08-13 02:45:54 UTC
Added Jan Stodola in cc list, I guess this bug only happened in aws platform as this script below to rh-amazon-rhui-client-3.0.15-1.el8.noarch.

Below error log reported in each boot message:
[root@ip-10-116-2-173 ec2-user]# journalctl |grep choo
Aug 13 02:17:54 localhost rpc.statd[371]: Running as root.  chown /var/lib/nfs/statd to choose different user
Aug 13 02:18:06 ip-10-116-2-173.us-west-2.compute.internal choose_repo[1673]: Traceback (most recent call last):
Aug 13 02:18:06 ip-10-116-2-173.us-west-2.compute.internal choose_repo[1673]:   File "/usr/sbin/choose_repo.py", line 100, in <module>
Aug 13 02:18:06 ip-10-116-2-173.us-west-2.compute.internal choose_repo[1673]:     main()
Aug 13 02:18:06 ip-10-116-2-173.us-west-2.compute.internal choose_repo[1673]:   File "/usr/sbin/choose_repo.py", line 76, in main
Aug 13 02:18:06 ip-10-116-2-173.us-west-2.compute.internal choose_repo[1673]:     os.rename('/etc/yum.repos.d/redhat-rhui.repo', '/etc/yum.repos.d/redhat-rhui.repo.disabled')
Aug 13 02:18:06 ip-10-116-2-173.us-west-2.compute.internal choose_repo[1673]: FileNotFoundError: [Errno 2] No such file or directory: '/etc/yum.repos.d/redhat-rhui.repo' -> '/etc/yum.repos.d/redhat-rhui.repo.disabled'

Comment 8 Frank Liang 2020-03-03 09:26:36 UTC
I am closing this bug as it is already in RHUI client repos across AWS regions. Thanks

[ec2-user]# rpm -qa|grep rhui
rh-amazon-rhui-client-3.0.24-1.el8.noarch
[ec2-user]# uname -r
4.18.0-167.el8.x86_64


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