andsens / bootstrap-vz

Bootstrap Debian images for virtualized environments
http://bootstrap-vz.readthedocs.io/
Other
263 stars 143 forks source link

'NoneType' object has no attribute 'get' #498

Closed kevin-olbrich closed 5 years ago

kevin-olbrich commented 5 years ago

If I try to build a VM on a buster host, I receive this:

Adding image packages required for kvm
'NoneType' object has no attribute 'get'
Traceback (most recent call last):
  File "/var/lib/jenkins/workspace/vm_image_build/project/imageconf/bootstrap-vz/bootstrapvz/base/main.py", line 111, in run
    tasklist.run(info=bootstrap_info, dry_run=dry_run)
  File "/var/lib/jenkins/workspace/vm_image_build/project/imageconf/bootstrap-vz/bootstrapvz/base/tasklist.py", line 44, in run
    task.run(info)
  File "/var/lib/jenkins/workspace/vm_image_build/project/imageconf/bootstrap-vz/bootstrapvz/providers/kvm/tasks/packages.py", line 14, in run
    info.manifest.system['architecture']])
  File "/var/lib/jenkins/workspace/vm_image_build/project/imageconf/bootstrap-vz/bootstrapvz/common/tools.py", line 118, in config_get
    config = config.get(key)
AttributeError: 'NoneType' object has no attribute 'get'
Rolling back

Manifest: https://bitbucket.org/code-orange/thinclient-os/src/master/imageconf/vmtemplate.yml

kevin-olbrich commented 5 years ago

PS: Seems to be only a problem with i386.

andsens commented 5 years ago

hm, buster is defined in the package kernel list, though there could be some yaml parsing issue because amd64 is defined multiple times.

Try removing the duplicate amd64 key in the yaml file.
If that doesn't help I suggest inserting a print('%s %s' % (info.manifest.release.codename, info.manifest.system['architecture'])) before the task tries to get the package name to see what is going on.

andsens commented 5 years ago

Nevermind, fixed :-)

However, the duplicate definition was not the cause of the issue. I'm fairly certain you're running an old version. Update to the latest master and check again :-)

kevin-olbrich commented 5 years ago

Ouch, you are right. My jenkins pipeline had a wrong regex which resulted in skipping the submodule update for this one.

Thank you very much!