Activity log for bug #1734274

Date Who What changed Old value New value Message
2017-11-24 07:07:22 Ondrej Kuchar bug added bug
2017-11-24 09:29:18 Ante Karamatić tags 4010 4010 cpe-onsite
2017-11-24 09:42:21 Christian Ehrhardt  attachment added suggested unit test https://bugs.launchpad.net/curtin/+bug/1734274/+attachment/5014005/+files/curtin-test-empty-early-command.patch
2017-11-24 09:46:00 Xavier Esteve bug added subscriber Xavier Esteve
2017-11-24 13:56:17 Gábor Mészáros attachment added maas-curtin-nokey.png https://bugs.launchpad.net/curtin/+bug/1734274/+attachment/5014093/+files/maas-curtin-nokey.png
2017-11-24 14:35:21 Scott Moser curtin: status New Triaged
2017-11-24 14:35:33 Scott Moser curtin: importance Undecided Low
2017-11-24 14:35:43 Scott Moser summary curtin fails to deploy on empty config values curtin fails to deploy on some invalid configs.
2017-11-24 22:35:08 Scott Moser description curtin version: root@ba0b1a:~# dpkg -l | grep -i curtin ii curtin-common 0.1.0~bzr532-0ubuntu1~16.04.1 all Library and tools for curtin installer ii python3-curtin 0.1.0~bzr532-0ubuntu1~16.04.1 all Library and tools for curtin installer curtin fails with this error curtin: Installation started. (0.1.0~bzr532-0ubuntu1~16.04.1) curtin: Installation failed with exception: 'NoneType' object has no attribute 'keys' when the test in early_commands is not true root@ba0b1a:~# cat /etc/maas/preseeds/curtin_userdata #cloud-config debconf_selections: maas: | {{for line in str(curtin_preseed).splitlines()}} {{line}} {{endfor}} early_commands: # disable_reboot: touch /run/block-curtin-poweroff /tmp/block-poweroff /tmp/block-reboot {{if third_party_drivers and driver}} {{py: key_string = ''.join(['\\x%x' % x for x in map(ord, driver['key_binary'])])}} driver_00_get_key: /bin/echo -en '{{key_string}}' > /tmp/maas-{{driver['package']}}.gpg driver_01_add_key: ["apt-key", "add", "/tmp/maas-{{driver['package']}}.gpg"] driver_02_add: ["add-apt-repository", "-y", "deb {{driver['repository']}} {{node.get_distro_series()}} main"] driver_03_update_install: ["sh", "-c", "apt-get update --quiet && apt-get --assume-yes install {{driver['package']}}"] driver_04_load: ["sh", "-c", "depmod && modprobe {{driver['module']}}"] {{endif}} workaround was to add placeholder to early_commands root@ba0b1a-mgm231maasregion-sk:~# cat /etc/maas/preseeds/curtin_userdata #cloud-config debconf_selections: maas: | {{for line in str(curtin_preseed).splitlines()}} {{line}} {{endfor}} early_commands: # disable_reboot: touch /run/block-curtin-poweroff /tmp/block-poweroff /tmp/block-reboot dummy_placeholder: echo just a placeholder {{if third_party_drivers and driver}} {{py: key_string = ''.join(['\\x%x' % x for x in map(ord, driver['key_binary'])])}} driver_00_get_key: /bin/echo -en '{{key_string}}' > /tmp/maas-{{driver['package']}}.gpg driver_01_add_key: ["apt-key", "add", "/tmp/maas-{{driver['package']}}.gpg"] driver_02_add: ["add-apt-repository", "-y", "deb {{driver['repository']}} {{node.get_distro_series()}} main"] driver_03_update_install: ["sh", "-c", "apt-get update --quiet && apt-get --assume-yes install {{driver['package']}}"] driver_04_load: ["sh", "-c", "depmod && modprobe {{driver['module']}}"] {{endif}} curtin version: root@ba0b1a:~# dpkg -l | grep -i curtin ii curtin-common 0.1.0~bzr532-0ubuntu1~16.04.1 all Library and tools for curtin installer ii python3-curtin 0.1.0~bzr532-0ubuntu1~16.04.1 all Library and tools for curtin installer curtin fails with this error curtin: Installation started. (0.1.0~bzr532-0ubuntu1~16.04.1) curtin: Installation failed with exception: 'NoneType' object has no attribute 'keys' when the test in early_commands is not true root@ba0b1a:~# cat /etc/maas/preseeds/curtin_userdata #cloud-config debconf_selections:  maas: |   {{for line in str(curtin_preseed).splitlines()}}   {{line}}   {{endfor}} early_commands: # disable_reboot: touch /run/block-curtin-poweroff /tmp/block-poweroff /tmp/block-reboot {{if third_party_drivers and driver}}   {{py: key_string = ''.join(['\\x%x' % x for x in map(ord, driver['key_binary'])])}}   driver_00_get_key: /bin/echo -en '{{key_string}}' > /tmp/maas-{{driver['package']}}.gpg   driver_01_add_key: ["apt-key", "add", "/tmp/maas-{{driver['package']}}.gpg"]   driver_02_add: ["add-apt-repository", "-y", "deb {{driver['repository']}} {{node.get_distro_series()}} main"]   driver_03_update_install: ["sh", "-c", "apt-get update --quiet && apt-get --assume-yes install {{driver['package']}}"]   driver_04_load: ["sh", "-c", "depmod && modprobe {{driver['module']}}"] {{endif}} workaround was to add placeholder to early_commands root@ba0b1a-mgm231maasregion-sk:~# cat /etc/maas/preseeds/curtin_userdata #cloud-config debconf_selections:  maas: |   {{for line in str(curtin_preseed).splitlines()}}   {{line}}   {{endfor}} early_commands: # disable_reboot: touch /run/block-curtin-poweroff /tmp/block-poweroff /tmp/block-reboot   dummy_placeholder: echo just a placeholder {{if third_party_drivers and driver}}   {{py: key_string = ''.join(['\\x%x' % x for x in map(ord, driver['key_binary'])])}}   driver_00_get_key: /bin/echo -en '{{key_string}}' > /tmp/maas-{{driver['package']}}.gpg   driver_01_add_key: ["apt-key", "add", "/tmp/maas-{{driver['package']}}.gpg"]   driver_02_add: ["add-apt-repository", "-y", "deb {{driver['repository']}} {{node.get_distro_series()}} main"]   driver_03_update_install: ["sh", "-c", "apt-get update --quiet && apt-get --assume-yes install {{driver['package']}}"]   driver_04_load: ["sh", "-c", "depmod && modprobe {{driver['module']}}"] {{endif}} Related bugs: * bug 1734391: user editing of preseed files is difficult due to maas internal data