CentOS finalize curthook duplicates MAAS credentials

Bug #1791189 reported by Lee Trager
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
maas-images
Fix Released
Undecided
Lee Trager

Bug Description

Both curt-hooks and finalize are creating MAAS credentials in /etc/cloud/cloud.cfg.d. curt-hooks creates 50-cloudconfig-maas-reporting.cfg from the cloudconfig section of the Curtin config. finalize is creating 90_datasource.cfg using the debconfig_selections from the Curtin config. 90_datasource.cfg is only needed when CentOS is deployed with old versions of MAAS/Curtin(from Trusty).

This should be documented in finalize.py and if CENTOS_CURTHOOK_SUPPORT is in the Curtin feature list finalize.py should not be run.

Related branches

Lee Trager (ltrager)
summary: - CentOS duplicates MAAS credentials
+ CentOS finalize curthook duplicates MAAS credentials
Lee Trager (ltrager)
Changed in maas-images:
status: New → Fix Released
assignee: nobody → Lee Trager (ltrager)
Revision history for this message
Ryan Harper (raharper) wrote :

FYI, when testing curtin SRU (https://bugs.launchpad.net/ubuntu/+source/curtin/+bug/1795712) on MAAS Bionic/2.4 we found that centos7 images fail to report back to maas and don't have a datasource.

I believe this is due to the change on this branch which detected the curtin CENTOS_CURTHOOK_SUPPORT but didn't confirm that MAAS also sent a storage config (aka MAAS 2.5+) and so finalize fails to write out a 90_datasource.cfg file.

This change needs to also check if cfg includes the 'storage' key before skipping generation of 90_datasource.cfg (like how the check is done in contrib/centos/centos7/curtin/curtin-hooks.py:

 # Run builtin hooks if curtin has the feature and maas sent storage cfg
 if centos_curthooks and cfg.get('storage'):

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.