Skip to content

Commit cc1ba3a

Browse files
authored
Merge pull request #2069 from deepssin/openstack_issues
Add centos9 stream user data file & add centos9 support to openstack
2 parents a614c16 + e24cc3f commit cc1ba3a

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

teuthology/openstack/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import tempfile
3636
import teuthology
3737
import time
38-
import types
3938
import yaml
4039
import base64
4140

@@ -203,6 +202,7 @@ class OpenStack(object):
203202
image2url = {
204203
'centos-7.2-x86_64': 'http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-1511.qcow2',
205204
'centos-7.3-x86_64': 'http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-1701.qcow2',
205+
'centos-9.stream-x86_64': 'https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-9-20240703.1.x86_64.qcow2',
206206
'opensuse-42.1-x86_64': 'http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.1/images/openSUSE-Leap-42.1-OpenStack.x86_64.qcow2',
207207
'opensuse-42.2-x86_64': 'http://download.opensuse.org/repositories/Cloud:/Images:/Leap_42.2/images/openSUSE-Leap-42.2-OpenStack.x86_64.qcow2',
208208
'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 @@ def interpret_hints(self, defaults, hints):
522522
result = copy.deepcopy(defaults)
523523
if not hints:
524524
return result
525-
if type(hints) is types.DictType:
525+
if isinstance(hints, dict):
526526
raise TypeError("openstack: " + str(hints) +
527527
" must be an array, not a dict")
528528
for hint in hints:
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#cloud-config
2+
bootcmd:
3+
- hostnamectl set-hostname $(cat /etc/hostname)
4+
- ( echo ; echo "MaxSessions 1000" ) >> /etc/ssh/sshd_config
5+
# See https://github.com/ceph/ceph-cm-ansible/blob/main/roles/cobbler/templates/snippets/cephlab_user
6+
- ( echo 'Defaults !requiretty' ; echo 'Defaults visiblepw' ) | tee /etc/sudoers.d/cephlab_sudo ; chmod 0440 /etc/sudoers.d/cephlab_sudo
7+
preserve_hostname: true
8+
system_info:
9+
default_user:
10+
name: {username}
11+
packages:
12+
- python3
13+
- wget
14+
- git
15+
- ntp
16+
final_message: "{up}, after $UPTIME seconds"

0 commit comments

Comments
 (0)