LP: #1810445 - Make sure python-oauthlib is installed on CentOS images.
Upstream updated their version of cloud-init to a newer version than what is
currently available in Canonical's COPR repostiory. They removed the depedency
on python-oauthlib as it is only required for MAAS.
0adc898 modified lp:maas-images to use a consistent mirror as defined by the
default repo configuration files. While the mirror is consistent upstream uses
redirects to balance the load. This breaks in locked down environments.
Specific mirrors may now be specified in centos.yaml to ensure the mirror
really is consistent.
kpack-from-image: Correct architecture evaluation in config_addl_modules.
Scott Moser reported that we were evaluating the architecture
at the time that the 'kpack_extra' initramfs hook was written.
The intent was to evaluate at initramfs creation time.
The fix here delays the evaluation until the time when the file is
utilized rather than when it was written.
Cleanup: be more specific about what should be created.
This puts more information in the config files on what output is expected.
Previously we were relying on the input type format in some cases to
determine what output to create.
The desire to do this was really to safely add '--no-gzip'
to the maas-cloudimg2eph2 if we were going to throw away the root-image.gz.
The gzip of root-image.gz would typically take > 2 minutes and then
the output would be promptly thrown away.
Now, in the configs we have:
meph-v2.yaml:
squashfs: False
root_image: True
enable_di: True
There is one inconsitency there that we've addressed with an 'if release'
section in the code. meph-v3.yaml will build a root image for trusty.
Also added here is information about 'known_callers' and the start of
a shell test suite. At very least it allowed me to manually verify the
output of a before and after run.
Ideally we'd have tests that assert files created and contents look good.
CentOS uses a mirrorlist system which works by downloading a list of mirrors
and using an algorithm in yum to determine the fastest. The build system lp:maas-images runs on only has white listed Internet access. Disable using
mirrorlist during build and consistently use mirrors.centos.org so we don't
have to keep updating the whitelist.
Recent versions of Curtin have full internal support for CentOS. If storage
information is included in the Curtin config the internal hooks are used,
otherwise the in image hooksare used if available. MAAS credentials, which are
used by cloud-init to finalize deployment, are sent by MAAS in the Curtin
config in both the cloudconfig and debconf_selections sections.
LP:1791189 prevents finalize from writing 90_datasource.cfg if Curtin has
internal support for CentOS as the credentials are already included in the
cloudconfig. This works when using the internal Curtin hooks or old versions of
Curtin that do not support CentOS at all. When a new version of Curtin is used
and no storage information is sent the in-image hooks are run for backwards
compatibility. bff4eaa introduced a bug which caused cloudconfig data written
by the internal hooks to be stored in the wrong location. This fixes that
location so they are always written to the correct location and credentials are
accessible in all scenarios. finalize is only needed for MAAS 1.9 as it does
not ship cloudconfig.
To publish this fix CentOS 7 has been locked to the latest CentOS image from
upstream.