Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Created attachment 1430864[details]
patch and cmds
Description of problem:
Related to bug 1560415, when you provision a VM using cloud-init on azure, then deallocate it, and start it, it does not mount the ephemeral disk.
Version-Release number of selected component (if applicable):
7.5
How reproducible:
az group create --name myrg --location centralus
## create new VM
az vm create \
--resource-group myrg \
--name rh75 \
--admin-username myadmin \
--image RedHat:RHEL:7-RAW-CI:latest \
--ssh-key-value /..
run : cat /proc/mounts, you will see:
/dev/sdb1 /mnt ext4 rw,seclabel,relatime,data=ordered 0 0
dealloc and start:
az vm deallocate --resource-group myrg --name rh75
az vm start --resource-group myrg --name rh75
Actual results:
run : cat /proc/mounts, you will see no entry for /dev/sdb1
Expected results:
/dev/sdb1 /mnt ext4 rw,seclabel,relatime,data=ordered 0 0
Additional info:
We have been testing with the attached patch, cloudinit is not putting the systemd mount options to wait for cloudinit, while the code on disk shows it should, can you take a look?
Please also be aware this is blocking GA for cloud-init on RHEL, we have multiple customers waiting for this.
Hi Dan,
this is a config issue. If you modify your /etc/cloud/cloud.cfg:
diff --git a/redhat/cloud-init-rhel.cfg b/redhat/cloud-init-rhel.cfg
index 986f241e..b38fe13a 100644
--- a/redhat/cloud-init-rhel.cfg
+++ b/redhat/cloud-init-rhel.cfg
@@ -4,7 +4,7 @@ users:
disable_root: 1
ssh_pwauth: 0
-mount_default_fields: [~, ~, 'auto', 'defaults,nofail', '0', '2']
+mount_default_fields: [~, ~, 'auto', 'defaults,nofail,x-systemd.requires=cloud-init.service', '0', '2']
resize_rootfs_tmp: /dev
ssh_deletekeys: 0
ssh_genkeytypes: ~
things will likely work as expected (or, at least this particular issue should be gone). Could you please try it? In the meantime I'll try to make this the default for RHEL7.
Hi Vitaly, thanks for this, i ran through these tests, checking that mounts existed, and monitor for critical errors.
1) Create VM from CI Image, apply patch attached and your additional config (/etc/cloud/cloud.cfg), then deallocate VM.
All tests passed
2) VM Restart (shutdown -r now)
All tests passed
3) Create custom image from VM created in step1
All tests passed
4) Deallocate and Start VM created from custom image
All tests passed
5) Create custom image from VM created in step1, but add 2 data disks
All tests passed
Can you put this change into the RHEL cloud-init package?
(In reply to Dan from comment #3)
> Hi Vitaly, thanks for this, i ran through these tests, checking that mounts
> existed, and monitor for critical errors.
> 1) Create VM from CI Image, apply patch attached and your additional config
> (/etc/cloud/cloud.cfg), then deallocate VM.
> All tests passed
> 2) VM Restart (shutdown -r now)
> All tests passed
> 3) Create custom image from VM created in step1
> All tests passed
> 4) Deallocate and Start VM created from custom image
> All tests passed
> 5) Create custom image from VM created in step1, but add 2 data disks
> All tests passed
>
> Can you put this change into the RHEL cloud-init package?
@Dan, as updated on the other BZ#1560415, I included these changes on the package as well and will submit the package for testing. Will keep this BZ updated as well.
Eduardo, devel_ack is already set. All 3 acks are set for 7.6. Was this just waiting for the cloud-init 18.2 rebase? Should this be moved to POST/MODIFIED?
(In reply to Rick Barry from comment #25)
> Eduardo, devel_ack is already set. All 3 acks are set for 7.6. Was this just
> waiting for the cloud-init 18.2 rebase? Should this be moved to
> POST/MODIFIED?
Yes, it was waiting for the rebase and looks like all pre-tests were ok. I'm not sure which status this BZ should be changed to, though.
Hi Eduardo,
This line "mount_default_fields: [~, ~, 'auto', 'defaults,nofail,x-systemd.requires=cloud-init.service', '0', '2']" is not in cloud.cfg by default in cloud-init-18.2-1.el7.x86_64.rpm. Do we need to add this line into the package? Thanks!
Test with cloud-init-18.2-1.el7_6.1 in RHEL7.6, this issue has fixed.
But cloud-init-18.2-1.el8 in RHEL8.0,this issue still exists.There is not "x-systemd.requires=cloud-init.service" in /etc/cloud/cloud.cfg
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2018:3241