Skip to content

Commit 8b795a9

Browse files
authored
Merge pull request #12 from stackhpc/rl9-support
Further work on RL9 support
2 parents 932e2f8 + 38633e5 commit 8b795a9

File tree

3 files changed

+26
-11
lines changed

3 files changed

+26
-11
lines changed

a-seed-from-nothing.sh

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,36 @@ then
3030
sudo apt update
3131
sudo apt install -y git tmux lvm2 iptables
3232
else
33-
sudo dnf install -y git tmux lvm2
33+
sudo dnf install -y git tmux lvm2 patch
3434
fi
3535

3636
# Work around connectivity issues seen while configuring this node as seed
3737
# hypervisor with Kayobe
38-
if [[ "${CLOUD_USER}" = "cloud-user" ]]
39-
then
40-
sudo dnf install -y network-scripts
41-
sudo rm -f /etc/sysconfig/network-scripts/ifcfg-ens3*
42-
fi
4338
cat <<EOF | sudo tee /etc/sysctl.d/70-ipv6.conf
4439
net.ipv6.conf.all.disable_ipv6 = 1
4540
net.ipv6.conf.default.disable_ipv6 = 1
4641
EOF
4742
sudo sysctl --load /etc/sysctl.d/70-ipv6.conf
4843

44+
# CentOS Stream 8 requires network-scripts. Rocky Linux 9 and onwards use NetworkManager.
4945
if [[ "${CLOUD_USER}" = "cloud-user" ]]
5046
then
51-
sudo systemctl is-active NetworkManager && (sudo systemctl disable NetworkManager; sudo systemctl stop NetworkManager)
52-
sudo systemctl is-active network || (sudo systemctl enable network; sudo pkill dhclient; sudo systemctl start network)
47+
case $(grep -o "[89]\.[0-9]" /etc/redhat-release) in
48+
"8.*")
49+
sudo dnf install -y network-scripts
50+
sudo rm -f /etc/sysconfig/network-scripts/ifcfg-ens3*
51+
sudo systemctl is-active NetworkManager && (sudo systemctl disable NetworkManager; sudo systemctl stop NetworkManager)
52+
sudo systemctl is-active network || (sudo systemctl enable network; sudo pkill dhclient; sudo systemctl start network)
53+
;;
54+
"9.*")
55+
# No network-scripts for RL9
56+
sudo systemctl is-active NetworkManager || (sudo systemctl enable NetworkManager; sudo systemctl start NetworkManager)
57+
;;
58+
"*")
59+
echo "Could not recognise OS release $(< /etc/redhat-release)"
60+
exit -1
61+
;;
62+
esac
5363
fi
5464

5565
# Exit on error

openstack-device.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ resource "openstack_compute_instance_v2" "registry" {
7373

7474
resource "openstack_compute_floatingip_v2" "registry" {
7575
count = var.allocate_floating_ips ? 1 : 0
76-
pool = "external"
76+
pool = var.floating_ip_external_net
7777
}
7878

7979
resource "openstack_compute_floatingip_associate_v2" "registry" {
@@ -143,7 +143,7 @@ resource "openstack_compute_instance_v2" "lab" {
143143

144144
resource "openstack_compute_floatingip_v2" "lab" {
145145
count = var.allocate_floating_ips ? var.lab_count : 0
146-
pool = "external"
146+
pool = var.floating_ip_external_net
147147
}
148148

149149
resource "openstack_compute_floatingip_associate_v2" "lab" {

vars.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ variable "allocate_floating_ips" {
6464
default = "false"
6565
}
6666

67+
variable "floating_ip_external_net" {
68+
description = "Network name to use for floating IP allocation"
69+
default = "external"
70+
}
71+
6772
# Remember to set a floating IP if you're using a bastion
6873
variable "create_bastion" {
6974
description = "Whether or not to create a bastion instance"
@@ -73,4 +78,4 @@ variable "create_bastion" {
7378
variable "bastion_floating_ip" {
7479
description = "Bastion floating IP"
7580
default = "0.0.0.0"
76-
}
81+
}

0 commit comments

Comments
 (0)