Merge lp:~ltrager/maas-images/canonical_cloudinit into lp:maas-images

Proposed by Lee Trager
Status: Merged
Merged at revision: 378
Proposed branch: lp:~ltrager/maas-images/canonical_cloudinit
Merge into: lp:maas-images
Prerequisite: lp:~smoser/maas-images/trunk.centos-curtin-passthrough
Diff against target: 74 lines (+33/-7)
2 files modified
bin/maas-qcow2targz (+6/-2)
conf/centos.yaml (+27/-5)
To merge this branch: bzr merge lp:~ltrager/maas-images/canonical_cloudinit
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Review via email: mp+328263@code.launchpad.net

Commit message

Use Canonical's version of cloud-init in the CentOS images.

To post a comment you must log in.
379. By Lee Trager

Use Canonical's version of cloud-init in the CentOS images.

Revision history for this message
Andres Rodriguez (andreserl) :
review: Approve
380. By Lee Trager

Ship with a clean /etc/resolv.conf

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/maas-qcow2targz'
2--- bin/maas-qcow2targz 2017-05-03 11:27:20 +0000
3+++ bin/maas-qcow2targz 2017-08-01 02:15:31 +0000
4@@ -111,7 +111,6 @@
5
6 if [ -n "$packages" ]; then
7 # We need working DNS to pull packages from the repo
8- mv "${root_d}/etc/resolv.conf" "${root_d}/etc/resolv.conf.orig"
9 cp /etc/resolv.conf "${root_d}/etc/resolv.conf"
10 for package in $(echo $packages | sed 's/,/ /g'); do
11 LANG=C unshare-pidns chroot "$root_d" yum -y install $package || {
12@@ -124,7 +123,12 @@
13 error "failed to clear yum cache"
14 exit 1
15 }
16- mv "${root_d}/etc/resolv.conf.orig" "${root_d}/etc/resolv.conf"
17+ # Upstream ships with DNS information in /etc/resolv.conf, ship a
18+ # clean version.
19+ rm "${root_d}/etc/resolv.conf"
20+ touch "${root_d}/etc/resolv.conf"
21+ chown root:root "${root_d}/etc/resolv.conf"
22+ chmod 644 "${root_d}/etc/resolv.conf"
23 fi
24
25 error "Taring up image contents... into $out"
26
27=== modified file 'conf/centos.yaml'
28--- conf/centos.yaml 2017-04-25 01:26:36 +0000
29+++ conf/centos.yaml 2017-08-01 02:15:31 +0000
30@@ -14,11 +14,19 @@
31 release_title: "CentOS 7.0"
32 curtin_files: "{curtin_path}/centos7"
33 packages:
34- # CentOS 7 removed python-oauth which is required for cloud-init to
35- # authenticate with the MAAS metadata service. Until cloud-init from CentOS
36- # supports python-oauth2 python-oauthlib we need to pull python-oauth from
37- # EPEL7-testing
38- - https://kojipkgs.fedoraproject.org/packages/python-oauth/1.0.1/10.el7/noarch/python-oauth-1.0.1-10.el7.noarch.rpm
39+ # cloud-init depends on packages from EPEL
40+ - epel-release
41+ # XXX ltrager 2017-07-28 - COPR doesn't provide a URL to the latest
42+ # package build. Instead it expects you to first add the repo which
43+ # is what is included in this package.
44+ - https://copr-be.cloud.fedoraproject.org/results/%40cloud-init/el-stable/epel-7-x86_64/00581936-cloud-init-el-release/cloud-init-el-release-7-1.noarch.rpm
45+ # The image most likely already has cloud-init, this pulls Canonical's
46+ # version
47+ - cloud-init
48+ # bridge-utils is required by cloud-init to configure networking.
49+ # Without it cloud-init will try to install it which will not work in
50+ # isolated environments.
51+ - bridge-utils
52 - linux-firmware
53 - grub2-efi-modules
54 - efibootmgr
55@@ -26,5 +34,19 @@
56 version: 6.6
57 release_title: "CentOS 6.6"
58 curtin_files: "{curtin_path}/centos6"
59+ packages:
60+ # cloud-init depends on packages from EPEL
61+ - epel-release
62+ # XXX ltrager 2017-07-28 - COPR doesn't provide a URL to the latest
63+ # package build. Instead it expects you to first add the repo which
64+ # is what is included in this package.
65+ - https://copr-be.cloud.fedoraproject.org/results/%40cloud-init/el-stable/epel-6-x86_64/00581936-cloud-init-el-release/cloud-init-el-release-7-1.noarch.rpm
66+ # The image most likely already has cloud-init, this pulls Canonical's
67+ # version
68+ - cloud-init
69+ # bridge-utils is required by cloud-init to configure networking.
70+ # Without it cloud-init will try to install it which will not work in
71+ # isolated environments.
72+ - bridge-utils
73
74 # vi: syntax=yaml nowrap

Subscribers

People subscribed via source and target branches