So I tried another time, this time paying attention to fstab in between
steps. I created a machine and updated cloud-init to
0.7.8-47-gb6561a1-0u.
$ mount|grep sdb ; grep mnt /etc/fstab
/dev/sdb1 on /mnt type ext4 (rw,relatime,data=ordered)
/dev/disk/cloud/azure_resource-part1 /mnt auto
defaults,nofail,comment=cloudconfig 0 2
Now I thought it might be worth trying a reboot, which apparently
rewrites fstab:
$ mount|grep sdb ; grep mnt /etc/fstab
/dev/sdb1 on /mnt type ext4 (rw,relatime,data=ordered)
/dev/disk/cloud/azure_resource-part1 /mnt auto
defaults,nofail,x-systemd.requires=cloud-init.service,comment=cloudconfig
0 2
So now I'm ready to resize, which I do, but unfortunately:
$ mount|grep sdb ; grep mnt /etc/fstab
/dev/sdb1 on /mnt type fuseblk
(rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
/dev/disk/cloud/azure_resource-part1 /mnt auto
defaults,nofail,x-systemd.requires=cloud-init.service,comment=cloudconfig
0 2
And:
$ systemctl status /mnt
● mnt.mount - /mnt
Loaded: loaded (/etc/fstab; bad; vendor preset: enabled)
Active: active (mounted) since Wed 2016-11-16 22:21:17 UTC; 10min ago
Where: /mnt
What: /dev/sdb1
Docs: man:fstab(5)
man:systemd-fstab-generator(8)
Process: 1066 ExecMount=/bin/mount /dev/disk/cloud/azure_resource-part1 /mnt
-o defaults,x-systemd.requires=cloud-init.service,comment=cloudconfig (c
$ systemctl status cloud-init.service
● cloud-init.service - Initial cloud-init job (metadata service crawler)
Loaded: loaded (/lib/systemd/system/cloud-init.service; enabled; vendor
preset: enabled)
Active: active (exited) since Wed 2016-11-16 22:21:15 UTC; 11min ago
Process: 1024 ExecStart=/usr/bin/cloud-init init (code=exited,
status=0/SUCCESS)
>From cloud-init.log:
Nov 16 22:21:18 testvm3 [CLOUDINIT] util.py[WARNING]: Failed during filesystem
operation#012Failed to exec of '['/sbin/mkfs.ext4', '/dev/sdb1']':#012Un
expected error while running command.#012Command: ['/sbin/mkfs.ext4',
'/dev/sdb1']#012Exit code: 1#012Reason: -#012Stdout: ''#012Stderr: 'mke2fs
1.42.1
3 (17-May-2015)\n/dev/sdb1 is mounted; will not make a filesystem here!\n'
So it looks like it's a closer race now than before, but it is still a race.
Should it be x-systemd.after? From the systemd.unit manpage:
If a unit foo.service requires a unit bar.service as configured with
Requires= and no ordering is configured with After= or Before=, then
both units will be started simultaneously and without any delay between
them if foo.service is activated.
** Attachment added: "cloud-init.log"
https://bugs.launchpad.net/cloud-init/+bug/1611074/+attachment/4778349/+files/cloud-init.log
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1611074
Title:
Reformatting of ephemeral drive fails on resize of Azure VM
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1611074/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs