redhat-openstack / infrared

Plugin based framework that aims to provide an easy-to-use CLI for Ansible based projects
https://infrared.readthedocs.io/en/latest/index.html
Apache License 2.0
99 stars 96 forks source link

Missing repos for 16.2 #411

Open bshephar opened 2 years ago

bshephar commented 2 years ago

Issue: While it is possible to deploy RHOSP16.2, if you do so with the --cdn option, it fails to lookup the repos since they are missing from the subscriptions dictionary:

Error:

TASK [cdn_registery : register to openstack repos for OSP >= 15] ***********************************************************************************************************************************************
fatal: [undercloud-0]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: {{ repo_list | map('regex_replace', '^(.*)$', '--enable=\\1') | join(' ') }}: {{ (subscription
s.common_8) + (subscriptions[(repo_version|float)] if not cdn_skip_openstack_repos | default(false) else []) + (subscriptions.ceph_4 if install.storage is defined and install.storage.backend is defined and in
stall.storage.backend == 'ceph' else []) }}: dict object has no element 16.2\n\nThe error appears to be in '/home/fedora/Documents/Code/OpenStack/infrared/.venv/lib/python3.10/site-packages/infrared/common/ro
les/cdn_registery/tasks/main.yml': line 17, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n    - name: register to openstack repos
 for OSP >= 15\n      ^ here\n"}

They will need to be added here: https://github.com/redhat-openstack/infrared/blob/master/infrared/common/roles/cdn_registery/defaults/main.yml#L19

bshephar commented 2 years ago

Apparently I don't have access to this repo on gerrithub. I'll push through the review once that access is sorted.

Or, if someone else wants to fix it. This should do it:

❯ git diff master
diff --git a/infrared/common/roles/cdn_registery/defaults/main.yml b/infrared/common/roles/cdn_registery/defaults/main.yml
index b1de3ad5..24721d2a 100644
--- a/infrared/common/roles/cdn_registery/defaults/main.yml
+++ b/infrared/common/roles/cdn_registery/defaults/main.yml
@@ -4,9 +4,9 @@ subscriptions:
         - rhel-7-server-extras-rpms
         - rhel-7-server-rh-common-rpms
     common_8:
-        - rhel-8-for-x86_64-baseos-rpms
-        - rhel-8-for-x86_64-appstream-rpms
-        - rhel-8-for-x86_64-highavailability-rpms
+        - rhel-8-for-x86_64-baseos-eus-rpms
+        - rhel-8-for-x86_64-appstream-eus-rpms
+        - rhel-8-for-x86_64-highavailability-eus-rpms
         - fast-datapath-for-rhel-8-x86_64-rpms
     ceph_3:
         - rhel-7-server-rhceph-3-mon-rpms
@@ -16,6 +16,10 @@ subscriptions:
         - rhceph-4-mon-for-rhel-8-x86_64-rpms
         - rhceph-4-osd-for-rhel-8-x86_64-rpms
         - rhceph-4-tools-for-rhel-8-x86_64-rpms
+    16.2:
+        - openstack-16.2-for-rhel-8-x86_64-rpms
+        - ansible-2.9-for-rhel-8-x86_64-rpms
+        - advanced-virt-for-rhel-8-x86_64-rpms
     16.1:
         - openstack-16.1-for-rhel-8-x86_64-rpms
         - ansible-2.9-for-rhel-8-x86_64-rpms
@@ -53,6 +57,13 @@ subscriptions:
         - rhel-7-server-openstack-7.0-director-rpms
 cdn_skip_openstack_repos: "{{ skip_release|default(false) }}"
 dnf_modules:
+    16.2:
+        disabled:
+          - container-tools
+          - virt
+        enabled:
+          - container-tools:3.0
+          - virt:8.4
     16.1:
         disabled:
           - container-tools
queria commented 2 years ago

You should have access to gerrithub now, please try to use that for uploading changes, or try asking either @atalmor or @igersht on irc, they should be able to help You (rest of us after end-of-year holidays).