Curtin unable to deploy CentOS without hooks

Bug #1791140 reported by Lee Trager
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin
Fix Committed
High
Unassigned

Bug Description

The latest version of Curtin includes native CentOS/RHEL support. Images produced with lp:maas-images and lp:maas-image-builder both include Curtin hooks for backwards compatibility. On older versions of MAAS/Curtin the old code is run while with newer versions the hooks call back into Curtin.

I created a CentOS image with no Curtin hooks[1] and attempted to deploy it with MAAS. Curtin successfully finishes but the deployment never finishes and I'm unable to access the machine even though it boots. What seems to be missing is Curtin isn't creating /etc/cloud/cloud.cfg.d/90_datasource.cfg[2] which cloud-init needs to access the MAAS metadata service to retrieve SSH keys and signal that deployment is finished.

[1] http://162.213.35.187/centos7-nohooks.tgz
[2] https://bazaar.launchpad.net/~maas-images-maintainers/maas-images/maas-ephemerals/view/head:/curtin/centos7/curtin-hooks.py#L328

Related branches

Revision history for this message
Lee Trager (ltrager) wrote :
Revision history for this message
Lee Trager (ltrager) wrote :
Revision history for this message
Lee Trager (ltrager) wrote :
Revision history for this message
Ryan Harper (raharper) wrote :

I see. The in-image hooks called curthooks.handle_cloudconfig() for us. That's not something that we've done in the ubuntu-curthooks path as maas passes it's datasource config in vai debconf set_selections.

I'll add a path in the curthooks for redhat family hooks to run that.

Changed in curtin:
status: New → In Progress
Revision history for this message
Ryan Harper (raharper) wrote :

I believe I've got a fix for this. Please test the experimental PPA, I've uploaded a new bionic curtin build curtin_18.1-137-gfc8c22fb-0ubuntu1

Revision history for this message
Lee Trager (ltrager) wrote :

The updated Curtin works with no hooks. One thing I noticed is that internal Curtin is creating /etc/cloud/cloud.cfg.d/50-cloudconfig-maas-reporting.cfg while the current hooks create /etc/cloud/cloud.cfg.d/90_datasource.cfg. Do you think we should update the hooks to not create 90_datasource.cfg if CENTOS_CURTHOOK_SUPPORT is in features?

Revision history for this message
Lee Trager (ltrager) wrote :

As discussed on IRC 90_datasource.cfg is coming from the finalize hook. I've opened LP:1791189 to handle that separately.

Ryan Harper (raharper)
Changed in curtin:
status: In Progress → Fix Committed
Ryan Harper (raharper)
Changed in curtin:
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.