Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Replaces Azure rocky-9.1 with rocky-9.3 image #1215

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

manoj-nutanix
Copy link
Contributor

@manoj-nutanix manoj-nutanix commented Oct 29, 2024

What problem does this PR solve?:
As existing rocky's publisher(publisher ID: erockyenterprisesoftwarefoundationinc1653071250513) has been removed as mentioned in the doc https://docs.rockylinux.org/fr/guides/cloud/migration-to-new-azure-images/

And, only 9.3 version has been published yet so we'll need to replace existing Azure rocky-9.1 with rocky-9.3 (ref)

Which issue(s) does this PR fix?:

Special notes for your reviewer:

Passed job: https://github.com/mesosphere/konvoy-image-builder/actions/runs/11579280960/job/32235097621

Does this PR introduce a user-facing change?:


Comment on lines -27 to -47
# https://d2iq.atlassian.net/browse/D2IQ-96417 removes extra 4 and 5 partitions so that growpart cloud-init module can expand the root filesystem to the rest of the disk.
#
# [packer@pkrvmia9ljyrxtg ~]$ lsblk -oMOUNTPOINT,PKNAME -P | grep 'MOUNTPOINT="/"' | cut -d= -f3 | xargs
# sda
- name: Get Device that holds root filesystem
shell: lsblk -oMOUNTPOINT,PKNAME -P | grep 'MOUNTPOINT="/"' | cut -d= -f3 | xargs
register: rootdevice

- name: Loop over ansible block devices
parted:
number: "{{ item }}"
state: absent
device: "/dev/{{ rootdevice.stdout }}"
with_items:
- 4
- 5

- name: unconditionally reboot the machine with all defaults
ansible.builtin.reboot:
when:
- packer["image_publisher"] == "erockyenterprisesoftwarefoundationinc1653071250513" and packer["image_version"] == "9.1.20230215"
Copy link
Contributor Author

@manoj-nutanix manoj-nutanix Oct 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need this workaround anymore with 9.3 image as I see last partition is meant for root so it can grow if needed -

[root@manoj-rocky-9 ~]# lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda      8:0    0   10G  0 disk
├─sda1   8:1    0   99M  0 part /boot/efi
├─sda2   8:2    0 1000M  0 part /boot
├─sda3   8:3    0    4M  0 part
├─sda4   8:4    0    1M  0 part
└─sda5   8:5    0  8.9G  0 part /
sdb      8:16   0   16G  0 disk
└─sdb1   8:17   0   16G  0 part /mnt
sr0     11:0    1  628K  0 rom

[root@manoj-rocky-9 ~]# cat /etc/os-release
NAME="Rocky Linux"
VERSION="9.3 (Blue Onyx)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.3"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Rocky Linux 9.3 (Blue Onyx)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:9::baseos"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
SUPPORT_END="2032-05-31"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-9"
ROCKY_SUPPORT_PRODUCT_VERSION="9.3"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.3"

Comment on lines +27 to +33
# - name: Reboot after dracut update
# ansible.builtin.reboot:
# msg: "Rebooting to apply initramfs changes"
# pre_reboot_delay: 5
# post_reboot_delay: 30
# reboot_timeout: 600 # Timeout of 10 minutes to ensure full reboot
# connect_timeout: 30
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commented out reboot task temporarily as it was causing packer build to hung up - https://github.com/mesosphere/konvoy-image-builder/actions/runs/11571038857/job/32208060620#step:8:1304

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant