From: deepssin Date: Thu, 24 Jul 2025 08:02:24 +0000 (-0400) Subject: Add centos9 stream user data file & add centos9 support to openstack X-Git-Tag: 1.2.2~10^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F2069%2Fhead;p=teuthology.git Add centos9 stream user data file & add centos9 support to openstack Signed-off-by: deepssin --- diff --git a/teuthology/openstack/__init__.py b/teuthology/openstack/__init__.py index 1fb548191..389d387fa 100644 --- a/teuthology/openstack/__init__.py +++ b/teuthology/openstack/__init__.py @@ -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 index 000000000..9b6d6753c --- /dev/null +++ b/teuthology/openstack/openstack-centos-9.stream-user-data.txt @@ -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