Heats agent for diskimage-builder in Ubuntu 16.04
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Triaged
|
Low
|
Unassigned | ||
diskimage-builder |
New
|
Undecided
|
Unassigned |
Bug Description
Dears,
Summary: I wasn't be able to create xenial-based custom image with Heat integration.
There are few bugs in two areas actually:
1) Documentation to Heat incorrectly describers procedure of creating custom image
2) Installation of Heat's agents don't work when creating Xenial-based custom image
==== Documentation ===
a) https:/
git clone https:/
is enough to launch diskimage-builder. That's wrong at the moment - just git'ing diskimage-builder's tree don't provide access to required executables, one need to install it (preferably in virtualenv) in the way like this :
$ virtualenv dib
$ source dib/bin/activate
$ git clone https:/
$ cd diskimage-builder
$ pip install -e .
and just then all next steps are possible:
git clone https:/
git clone https:/
[ ... ]
b) I guess, it makes sense to note there are different branches of tripleo-
git clone -b stable/ocata https:/
git clone -b stable/ocata https:/
c) to proper work of os-*-config tools, it's required to have dib-run-parts tool on host VM, which need to be added to BASE_ELEMENTS variable (last entry in the following row):
export BASE_ELEMENTS=
==== Code ====
Few fixes required to diskimage-builder's elements to work with Xenial distribution:
d) in Xenial, dib-run-parts tool resides in 'python-dib-utils' package, which need to be reflected in diskimage-
e) heat-config-notify (used for notifying Heat about changes on VM) require keystoneclient, so this package need to be added to heat-agents/
pip install python-heatclient python-zaqarclient python-
f) there is broken dependency in os-collect-config's systemd integration, which prevents it starting upon VM start/reboot. This can be fixed using the following change in tripleo-
[Install]
WantedBy=
instead of "WantedBy=
After all these changes, I was be able to create and launch xenial-based custom image using diskimage-builder tool. Possibly, it can break Trusty-based installation, this needs to be checked when considering changes above.
Hope this'll help. Thank you.
description: | updated |
description: | updated |
description: | updated |
Changed in heat: | |
status: | New → Triaged |
Changed in heat: | |
importance: | Undecided → Low |
affects: | tripleo → diskimage-builder |
Changed in heat: | |
milestone: | none → no-priority-tag-bugs |
Information about second point (f): config. service is defined to start in multi-user.target after cloud-final.service but
os-collect-
cloud-final.service is defined to start after multi-user.target (deadlock)
That's why the following works:
sed -i "s@^WantedBy= .*@WantedBy= cloud-init. target@ " /lib/systemd/ system/ cloud-final. service config. service
systemctl reenable os-collect-
I found some dependency issues when using tripleo- images- elements (os-<xxx>-config) and building a Xenial image, so I used apt and python- os-<xxx> -config in custom elements
Thanks,