]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Add centos9 stream user data file & add centos9 support to openstack 2069/head
authordeepssin <deepssin@redhat.com>
Thu, 24 Jul 2025 08:02:24 +0000 (04:02 -0400)
committerdeepssin <deepssin@redhat.com>
Thu, 24 Jul 2025 08:02:24 +0000 (04:02 -0400)
Signed-off-by: deepssin <deepssin@redhat.com>
teuthology/openstack/__init__.py
teuthology/openstack/openstack-centos-9.stream-user-data.txt [new file with mode: 0644]

index 1fb5481917564e55b83f7d4a985183707c6b8b77..389d387fa92fff63893254301f5902cb04b553a8 100644 (file)
@@ -35,7 +35,6 @@ import subprocess
 import tempfile
 import teuthology
 import time
-import types
 import yaml
 import base64
 
@@ -203,6 +202,7 @@ class OpenStack(object):
     image2url = {
         'centos-7.2-x86_64': 'http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-1511.qcow2',
         'centos-7.3-x86_64': 'http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-1701.qcow2',
+        'centos-9.stream-x86_64': 'https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-9-20240703.1.x86_64.qcow2',
         'opensuse-42.1-x86_64': 'http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2',
         'opensuse-42.2-x86_64': 'http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.2/images/openSUSE-Leap-42.2-OpenStack.x86_64.qcow2',
         'opensuse-42.3-x86_64': 'http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.3/images/openSUSE-Leap-42.3-OpenStack.x86_64.qcow2',
@@ -522,7 +522,7 @@ class OpenStack(object):
         result = copy.deepcopy(defaults)
         if not hints:
             return result
-        if type(hints) is types.DictType:
+        if isinstance(hints, dict):
             raise TypeError("openstack: " + str(hints) +
                             " must be an array, not a dict")
         for hint in hints:
diff --git a/teuthology/openstack/openstack-centos-9.stream-user-data.txt b/teuthology/openstack/openstack-centos-9.stream-user-data.txt
new file mode 100644 (file)
index 0000000..9b6d675
--- /dev/null
@@ -0,0 +1,16 @@
+#cloud-config
+bootcmd:
+ - hostnamectl set-hostname $(cat /etc/hostname)
+ - ( echo ; echo "MaxSessions 1000" ) >> /etc/ssh/sshd_config
+# See https://github.com/ceph/ceph-cm-ansible/blob/main/roles/cobbler/templates/snippets/cephlab_user
+ - ( echo 'Defaults !requiretty' ; echo 'Defaults visiblepw' ) | tee /etc/sudoers.d/cephlab_sudo ; chmod 0440 /etc/sudoers.d/cephlab_sudo
+preserve_hostname: true
+system_info:
+  default_user:
+    name: {username}
+packages:
+ - python3
+ - wget
+ - git
+ - ntp
+final_message: "{up}, after $UPTIME seconds"
\ No newline at end of file