Description of problem: The rhel_subscribe task in openshift-ansible does not work correctly with Satellite. Satellite requires that the katello-ca.rpm be installed prior to satellite registration, the task in the playbook tries to install the katello-ca.rpm at the end of the task. here is an example patch that I found fixes this issue for satellite while preserving the cdn registration functions: https://github.com/broskos/openshift-ansible/commit/c8c1bf591e822174aedf1d8389e8c44b9135b197#diff-1e7b37efed8aecff09358fe8a0c2a15e Version-Release number of selected component (if applicable): release-3.10 release-3.11 How reproducible: always Steps to Reproduce: set the 3 required variables rhsub_ak: ocp311 rhsub_orgid: brentandkrysti rhsub_server: satellite6.home.brentandkrysti.com run the openshift-ansible installer Actual results: registration fails Expected results: registration succeeds Additional info: Description of problem: Version-Release number of the following components: rpm -q openshift-ansible rpm -q ansible ansible --version How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Please include the entire output from the last TASK line through the end of output if an error is generated Expected results: Additional info: Please attach logs from ansible-playbook with the -vvv flag
This can probably be fixed in 3.11 and be backported to various releases.
Thanks for the code reference however there appear to be no active cases related to this bug. As such we're closing this bug in order to focus on bugs that are still tied to active customer cases. Please re-open this bug if you feel it was closed in error or a new active case is attached. We'd also be willing to accept a pull request too.
Verified this bug with openshift-ansible-3.11.154-1.git.0.7a11cbe.el7.noarch, and PASS. $ ansible-playbook -i /tmp/qe-inventory-host-file /usr/share/ansible/openshift-ansible/playbooks/byo/rhel_subscribe.yml -vv <--snip--> PLAY [Subscribe hosts, update repos and update OS packages] ********************************************************************************************************** TASK [Gathering Facts] *********************************************************************************************************************************************** task path: /usr/share/ansible/openshift-ansible/playbooks/byo/rhel_subscribe.yml:4 ok: [ci-vm-10-0-151-156.hosted.upshift.rdu2.redhat.com] META: ran handlers TASK [rhel_subscribe : fail] ***************************************************************************************************************************************** task path: /usr/share/ansible/openshift-ansible/roles/rhel_subscribe/tasks/main.yml:2 skipping: [ci-vm-10-0-151-156.hosted.upshift.rdu2.redhat.com] => {"changed": false, "skip_reason": "Conditional result was False"} TASK [rhel_subscribe : Install Red Hat Subscription manager] ********************************************************************************************************* task path: /usr/share/ansible/openshift-ansible/roles/rhel_subscribe/tasks/main.yml:6 ok: [ci-vm-10-0-151-156.hosted.upshift.rdu2.redhat.com] => {"attempts": 1, "changed": false, "msg": "", "rc": 0, "results": ["subscription-manager-1.24.13-3.el7_7.x86_64 providing subscription-manager is already installed"]} TASK [rhel_subscribe : Is host already registered?] ****************************************************************************************************************** task path: /usr/share/ansible/openshift-ansible/roles/rhel_subscribe/tasks/main.yml:13 ok: [ci-vm-10-0-151-156.hosted.upshift.rdu2.redhat.com] => {"changed": false, "cmd": ["subscription-manager", "version"], "delta": "0:00:01.155877", "end": "2019-11-05 06:32:09.011204", "rc": 0, "start": "2019-11-05 06:32:07.855327", "stderr": "", "stderr_lines": [], "stdout": "server type: This system is currently not registered.\nsubscription management server: 2.9.17-1\nsubscription management rules: 5.37\nsubscription-manager: 1.24.13-3.el7_7", "stdout_lines": ["server type: This system is currently not registered.", "subscription management server: 2.9.17-1", "subscription management rules: 5.37", "subscription-manager: 1.24.13-3.el7_7"]} TASK [rhel_subscribe : Satellite preparation] ************************************************************************************************************************ task path: /usr/share/ansible/openshift-ansible/roles/rhel_subscribe/tasks/satellite.yml:2 [WARNING]: Consider using the yum, dnf or zypper module rather than running rpm. If you need to use command because yum, dnf or zypper is insufficient you can add warn=False to this command task or set command_warnings=False in ansible.cfg to get rid of this message. fatal: [ci-vm-10-0-151-156.hosted.upshift.rdu2.redhat.com]: FAILED! => {"changed": true, "cmd": ["rpm", "-Uvh", "http://satellite6.home.brentandkrysti.com/pub/katello-ca-consumer-latest.noarch.rpm"], "delta": "0:00:00.184275", "end": "2019-11-05 06:32:09.616389", "msg": "non-zero return code", "rc": 1, "start": "2019-11-05 06:32:09.432114", "stderr": "curl: (6) Could not resolve host: satellite6.home.brentandkrysti.com; Unknown error\nerror: skipping http://satellite6.home.brentandkrysti.com/pub/katello-ca-consumer-latest.noarch.rpm - transfer failed", "stderr_lines": ["curl: (6) Could not resolve host: satellite6.home.brentandkrysti.com; Unknown error", "error: skipping http://satellite6.home.brentandkrysti.com/pub/katello-ca-consumer-latest.noarch.rpm - transfer failed"], "stdout": "Retrieving http://satellite6.home.brentandkrysti.com/pub/katello-ca-consumer-latest.noarch.rpm", "stdout_lines": ["Retrieving http://satellite6.home.brentandkrysti.com/pub/katello-ca-consumer-latest.noarch.rpm"]} <--snip--> The katello-ca rpm package is installed prior to satellite registration (the failure is because no existing Satellite server in my testing env)
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, 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-2019:3817