Comment 5 for bug 1734274

Revision history for this message
Ondrej Kuchar (ondrej-kuchar) wrote : Re: curtin fails to deploy on empty config values

this is the full config: (I'm not sure what you mean by generated)

#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}}
late_commands:
  maas: [wget, '--no-proxy', {{node_disable_pxe_url|escape.json}}, '--post-data', {{node_disable_pxe_data|escape.json}}, '-O', '/dev/null']
  add_ca_1: ["curtin", "in-target", "--", "wget", "--output-document", "/usr/local/share/ca-certificates/local.crt", "http://100.107.0.4/conf/ca.pem" ]
  add_ca_2: ["curtin", "in-target", "--", "wget", "--output-document", "/usr/local/share/ca-certificates/pannetss-ica1.crt", "http://100.107.0.4/conf/pannet/pannetss-ica1.crt" ]
  add_ca_3: ["curtin", "in-target", "--", "wget", "--output-document", "/usr/local/share/ca-certificates/pannetss-root.crt", "http://100.107.0.4/conf/pannet/pannetss-root.crt" ]
  add_ca_4: ["curtin", "in-target", "--", "update-ca-certificates"]
{{if third_party_drivers and driver}}
  driver_00_key_get: curtin in-target -- sh -c "/bin/echo -en '{{key_string}}' > /tmp/maas-{{driver['package']}}.gpg"
  driver_02_key_add: ["curtin", "in-target", "--", "apt-key", "add", "/tmp/maas-{{driver['package']}}.gpg"]
  driver_03_add: ["curtin", "in-target", "--", "add-apt-repository", "-y", "deb {{driver['repository']}} {{node.get_distro_series()}} main"]
  driver_04_update_install: ["curtin", "in-target", "--", "apt-get", "update", "--quiet"]
  driver_05_install: ["curtin", "in-target", "--", "apt-get", "-y", "install", "{{driver['package']}}"]
  driver_06_depmod: ["curtin", "in-target", "--", "depmod"]
  driver_07_update_initramfs: ["curtin", "in-target", "--", "update-initramfs", "-u"]
{{endif}}
showtrace: true
verbosity: 3