You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have successfully used this same process to build cloud-init during the packer image creation on Rocky (CentOS) 8 for x86 vbox and AMIs for a couple of years, and Rocky 7 before that. Obviously this was done on x86 hardware.
None of this might matter, but for the sake of transparency - I'm now trying to build a Rocky 9 Parallels VM on an M1 mac (so aarch64), as above, using packer. I can't compare to Rocky 8 arm because Parallels won't boot a Rocky 8 arm iso, and virtualbox won't boot much of anything on arm.
cloud-init appears to build (python3 setup.py build) fine, but is crashing during the install phase, trying to do something with a template.
File "/tmp/packer/cloud-init/cloud-init-22.4/cloudinit/templater.py", line 93, in replacer
return str(selected_params[key])
I don't think I'm doing anything special. The provisioner script[1] that packer is running to build/install cloud-init is pretty simple.
As to the python error specifically, I see two references to a var named 'u' in cloud-final.service.tmpl:
[root@rockylinux-9 cloud-init-22.4]# python3 setup.py install --init-system=systemd
Traceback (most recent call last):
File "/tmp/packer/cloud-init/cloud-init-22.4/./tools/render-cloudcfg", line 67, in
main()
File "/tmp/packer/cloud-init/cloud-init-22.4/./tools/render-cloudcfg", line 63, in main
templater.render_cloudcfg(args.variant, args.template, args.output)
File "/tmp/packer/cloud-init/cloud-init-22.4/cloudinit/templater.py", line 171, in render_cloudcfg
contents = (render_string(contents, tpl_params)).rstrip() + "\n"
File "/tmp/packer/cloud-init/cloud-init-22.4/cloudinit/templater.py", line 163, in render_string
return renderer(content, params)
File "/tmp/packer/cloud-init/cloud-init-22.4/cloudinit/templater.py", line 95, in basic_render
return BASIC_MATCHER.sub(replacer, content)
File "/tmp/packer/cloud-init/cloud-init-22.4/cloudinit/templater.py", line 93, in replacer
return str(selected_params[key])
KeyError: 'u'
Traceback (most recent call last):
File "/tmp/packer/cloud-init/cloud-init-22.4/setup.py", line 145, in
"systemd": [
File "/tmp/packer/cloud-init/cloud-init-22.4/setup.py", line 146, in
render_tmpl(f)
File "/tmp/packer/cloud-init/cloud-init-22.4/setup.py", line 121, in render_tmpl
subprocess.run(
File "/usr/lib64/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', './tools/render-cloudcfg', 'systemd/cloud-final.service.tmpl', 'RENDERED_TEMPDg9hznmwx/cloud-final.service']' returned non-zero exit status 1.
The text was updated successfully, but these errors were encountered:
Launchpad user richard hornsby(smoketree) wrote on 2023-02-05T22:07:30.400620+00:00
Have mysteriously resolved this while working on what I thought were unrelated dependency/permissions issues in the x86 vbox version of the same box. Wish I had a better answer to provide as to why this was happening, but seems to be fixed now.
This bug was originally filed in Launchpad as LP: #2005125
Launchpad details
Launchpad user richard hornsby(smoketree) wrote on 2023-02-04T06:00:54.133793+00:00
cloud-init version: 22.4
source: https://launchpad.net/cloud-init/trunk/22.4/+download/cloud-init-22.4.tar.gz
target platform: Rocky Linux 9, aarch64
hypervisor: Parallels 18
error output included at the bottom
Have successfully used this same process to build cloud-init during the packer image creation on Rocky (CentOS) 8 for x86 vbox and AMIs for a couple of years, and Rocky 7 before that. Obviously this was done on x86 hardware.
None of this might matter, but for the sake of transparency - I'm now trying to build a Rocky 9 Parallels VM on an M1 mac (so aarch64), as above, using packer. I can't compare to Rocky 8 arm because Parallels won't boot a Rocky 8 arm iso, and virtualbox won't boot much of anything on arm.
cloud-init appears to build (python3 setup.py build) fine, but is crashing during the install phase, trying to do something with a template.
I don't think I'm doing anything special. The provisioner script[1] that packer is running to build/install cloud-init is pretty simple.
As to the python error specifically, I see two references to a var named 'u' in cloud-final.service.tmpl:
but I'm still trying to figure out what the replacer() method is doing when it tries to return and hits the KeyError.
[1] https://gist.github.com/rjhornsby/359ad009d0bd7ff2f6976a97d9b29f20
Error output:
[root@rockylinux-9 cloud-init-22.4]# python3 setup.py install --init-system=systemd
Traceback (most recent call last):
File "/tmp/packer/cloud-init/cloud-init-22.4/./tools/render-cloudcfg", line 67, in
main()
File "/tmp/packer/cloud-init/cloud-init-22.4/./tools/render-cloudcfg", line 63, in main
templater.render_cloudcfg(args.variant, args.template, args.output)
File "/tmp/packer/cloud-init/cloud-init-22.4/cloudinit/templater.py", line 171, in render_cloudcfg
contents = (render_string(contents, tpl_params)).rstrip() + "\n"
File "/tmp/packer/cloud-init/cloud-init-22.4/cloudinit/templater.py", line 163, in render_string
return renderer(content, params)
File "/tmp/packer/cloud-init/cloud-init-22.4/cloudinit/templater.py", line 95, in basic_render
return BASIC_MATCHER.sub(replacer, content)
File "/tmp/packer/cloud-init/cloud-init-22.4/cloudinit/templater.py", line 93, in replacer
return str(selected_params[key])
KeyError: 'u'
Traceback (most recent call last):
File "/tmp/packer/cloud-init/cloud-init-22.4/setup.py", line 145, in
"systemd": [
File "/tmp/packer/cloud-init/cloud-init-22.4/setup.py", line 146, in
render_tmpl(f)
File "/tmp/packer/cloud-init/cloud-init-22.4/setup.py", line 121, in render_tmpl
subprocess.run(
File "/usr/lib64/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', './tools/render-cloudcfg', 'systemd/cloud-final.service.tmpl', 'RENDERED_TEMPDg9hznmwx/cloud-final.service']' returned non-zero exit status 1.
The text was updated successfully, but these errors were encountered: