Skip to content

Commit ba2b7d8

Browse files
authored
M #-: Various improvements (#255)
- improve reboot vs ssh-reconnect race, avoid sleep - don't rely on selinux-relabel via virt-sysprep this requires specific kernel, better reboot+relabel within Packer provision - remove insights-client in RHEL, it causes issues in infra
1 parent 40862b4 commit ba2b7d8

File tree

11 files changed

+19
-26
lines changed

11 files changed

+19
-26
lines changed

packer/alma/11-update-grub.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,7 @@ grub2-mkconfig -o /boot/grub2/grub.cfg
5555

5656
sync
5757

58+
# Avoid reboot vs. packer-ssh-reconnect race
59+
systemctl stop sshd
60+
5861
reboot

packer/alma/11-zzz.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

packer/fedora/12-selinux-fixfiles.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,7 @@ sed -i -e 's:^SELINUX=.*:SELINUX=permissive:' /etc/selinux/config
77

88
fixfiles -F onboot
99

10+
# Avoid reboot vs. packer-ssh-reconnect race
11+
systemctl stop sshd
12+
1013
reboot

packer/fedora/12-zzz.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

packer/ol/11-update-grub.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,7 @@ grub2-mkconfig -o /boot/grub2/grub.cfg
5353

5454
sync
5555

56+
# Avoid reboot vs. packer-ssh-reconnect race
57+
systemctl stop sshd
58+
5659
reboot

packer/ol/11-zzz.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

packer/rhel/11-update-grub.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ dracut --force "$INITRAMFS_IMG" "$INITRAMFS_VER"
5353

5454
grub2-mkconfig -o /boot/grub2/grub.cfg
5555

56+
# force relinux relabel
57+
fixfiles -F onboot
58+
5659
sync
5760

61+
# Avoid reboot vs. packer-ssh-reconnect race
62+
systemctl stop sshd
63+
5864
reboot

packer/rhel/11-zzz.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

packer/rhel/98-collect-garbage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ systemctl disable kdump.service
1010
# Remove old kernels.
1111
dnf remove -y $(dnf repoquery --installonly --latest-limit=-1 -q)
1212

13-
dnf remove -y linux-firmware
13+
dnf remove -y linux-firmware insights-client
1414

1515
dnf clean -y all
1616

packer/rocky/11-update-grub.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,7 @@ grub2-mkconfig -o /boot/grub2/grub.cfg
5757

5858
sync
5959

60+
# Avoid reboot vs. packer-ssh-reconnect race
61+
systemctl stop sshd
62+
6063
reboot

0 commit comments

Comments
 (0)