Code review comment for ~paul-meyer/cloud-init:paulmey/fix-fs-setup

Revision history for this message
Paul Meyer (paul-meyer) wrote :

It also works well for the re-provision scenario.
I did find that the assert_... function logs a warning when the device is a partition for mkfs():

2017-05-25 04:48:41,565 - cc_disk_setup.py[DEBUG]: setting up filesystems: [{'label': 'etcd_disk', 'extra_opts': ['-F', '-E', 'lazy_itable_init=1,lazy_journal_init=1'], 'device': '/dev/sdc1', 'filesystem': 'ext4'}]
2017-05-25 04:48:41,565 - cc_disk_setup.py[DEBUG]: Creating new filesystem.
2017-05-25 04:48:41,565 - util.py[DEBUG]: Running command ['/sbin/blockdev', '--rereadpt', '/dev/sdc1'] with allowed return codes [0] (shell=False, capture=True)
2017-05-25 04:48:41,568 - util.py[DEBUG]: out=b''
2017-05-25 04:48:41,568 - util.py[DEBUG]: err=b'blockdev: ioctl error on BLKRRPART: Invalid argument\n'
2017-05-25 04:48:41,568 - util.py[DEBUG]: rc=1
2017-05-25 04:48:41,569 - cc_disk_setup.py[WARNING]: failed command: Unexpected error while running command.
Command: ['/sbin/blockdev', '--rereadpt', '/dev/sdc1']
Exit code: 1
Reason: -
Stdout: -
Stderr: blockdev: ioctl error on BLKRRPART: Invalid argument
2017-05-25 04:48:41,576 - util.py[DEBUG]: Running command ['udevadm', 'settle'] with allowed return codes [0] (shell=False, capture=True)
2017-05-25 04:48:41,630 - util.py[DEBUG]: out=b''
2017-05-25 04:48:41,630 - util.py[DEBUG]: err=b''
2017-05-25 04:48:41,630 - util.py[DEBUG]: rc=0

I do need to figure out why the ephemeral drive was not setup here... it's not even in the fs_setup list.

« Back to merge proposal