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: 0ubuntu1~ 16.04.1 all Library and tools for curtin installer 0ubuntu1~ 16.04.1 all Library and tools for curtin installer
root@ba0b1a:~# dpkg -l | grep -i curtin
ii curtin-common 0.1.0~bzr532-
ii python3-curtin 0.1.0~bzr532-
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 preseeds/ curtin_ userdata preseed) .splitlines( )}} curtin- poweroff /tmp/block-poweroff /tmp/block-reboot 'key_binary' ])])}} 00_get_ key: /bin/echo -en '{{key_string}}' > /tmp/maas- {{driver[ 'package' ]}}.gpg 01_add_ key: ["apt-key", "add", "/tmp/maas- {{driver[ 'package' ]}}.gpg" ] repository" , "-y", "deb {{driver[ 'repository' ]}} {{node. get_distro_ series( )}} main"] 03_update_ install: ["sh", "-c", "apt-get update --quiet && apt-get --assume-yes install {{driver[ 'package' ]}}"] 'module' ]}}"]
root@ba0b1a:~# cat /etc/maas/
#cloud-config
debconf_selections:
maas: |
{{for line in str(curtin_
{{line}}
{{endfor}}
early_commands:
# disable_reboot: touch /run/block-
{{if third_party_drivers and driver}}
{{py: key_string = ''.join(['\\x%x' % x for x in map(ord, driver[
driver_
driver_
driver_02_add: ["add-apt-
driver_
driver_04_load: ["sh", "-c", "depmod && modprobe {{driver[
{{endif}}
workaround was to add placeholder to early_commands mgm231maasregio n-sk:~# cat /etc/maas/ preseeds/ curtin_ userdata preseed) .splitlines( )}} curtin- poweroff /tmp/block-poweroff /tmp/block-reboot placeholder: echo just a placeholder 'key_binary' ])])}} 00_get_ key: /bin/echo -en '{{key_string}}' > /tmp/maas- {{driver[ 'package' ]}}.gpg 01_add_ key: ["apt-key", "add", "/tmp/maas- {{driver[ 'package' ]}}.gpg" ] repository" , "-y", "deb {{driver[ 'repository' ]}} {{node. get_distro_ series( )}} main"] 03_update_ install: ["sh", "-c", "apt-get update --quiet && apt-get --assume-yes install {{driver[ 'package' ]}}"] 'module' ]}}"]
root@ba0b1a-
#cloud-config
debconf_selections:
maas: |
{{for line in str(curtin_
{{line}}
{{endfor}}
early_commands:
# disable_reboot: touch /run/block-
dummy_
{{if third_party_drivers and driver}}
{{py: key_string = ''.join(['\\x%x' % x for x in map(ord, driver[
driver_
driver_
driver_02_add: ["add-apt-
driver_
driver_04_load: ["sh", "-c", "depmod && modprobe {{driver[
{{endif}}