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

Proposed by Lee Trager
Status: Superseded
Proposed branch: lp:~ltrager/maas-images/bootloaders_proposed
Merge into: lp:maas-images
Diff against target: 76 lines (+17/-7)
2 files modified
meph2/commands/dpkg.py (+10/-4)
meph2/commands/mimport.py (+7/-3)
To merge this branch: bzr merge lp:~ltrager/maas-images/bootloaders_proposed
Reviewer Review Type Date Requested Status
Scott Moser (community) Approve
Andres Rodriguez (community) Needs Fixing
Review via email: mp+334999@code.launchpad.net

Commit message

Add --proposed to import command for bootloaders.

To post a comment you must log in.
Revision history for this message
Andres Rodriguez (andreserl) wrote :

lgtm!

review: Approve
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Line 19/20 you are changing a set to a list. Revert that back and lets do minimum changes.

review: Needs Fixing
Revision history for this message
Scott Moser (smoser) wrote :

it looks fine.

i'd appreciate a change to kwargs for those function calls.
just easier to read.

386. By Scott Moser

Add zfs module and dependencies to generated initramfs.

In order for curtin to use zfs, it has to have access to the modules.
Add 'zfs' and its dependencies to the initramfs.

Note that the user-space tools (zfsutils-linux) are not currently
a dependency of ubuntu-server and are thus not in the squashfs images.
That means that for curtin to use zfs it has to install the package.
The package handles loading zfs module.

387. By Scott Moser

Stop grub scripts from running when updating an image.

An upgrade that brought a new kernel would cause grub's kernel
hook scripts to run. Those would fail to run and cause build failure
(at least in trusty). This is similar to code that is currently
in the kpack-from-image, but handles putting things back more elegantly.
(kpack-from-image doesn't have to put things back).

I found this when running with '--proposed' and trusty.

388. By Scott Moser

Cleanups around use of --proposed.

The --proposed flag was not getting all the way through to
kpack-from-image. This modification just gets it set all the way through.
It isn't strictly needed, because the image that it runs in will have
proposed enabled already, but passing it through makes it more obvious.

In kpack-from-image, use the same .list file name that is used in
maas-cloudimg2eph and also enable universe and multiverse as are done there.

Also some cleanups:
 - dist_upgrade was set to 'false' by default, but then enabled to either
   'true' or '1'. Just be consistent and set to true to avoid confusion.
 - fix a debug message that reported about ppa when it should have reported
   about proposed.

Revision history for this message
Scott Moser (smoser) wrote :

feel free to pull this in.

review: Approve
389. By Scott Moser

precise: remove reference to non-existing package linux-signed-generic.

Apparently there was no signed generic kernel for precise GA.
Specifically, there is no:
  linux-signed-generic
but there *is*:
  linux-signed-generic-lts-quantal
  linux-signed-generic-lts-raring
  linux-signed-generic-lts-saucy
  linux-signed-generic-lts-trusty

390. By Scott Moser

Always create squashfs image if configured.

For precise in the v3 stream there was no 'squashfs' image created.
This was enabled only if input to the build was '.tar.gz' or 'squashfs'.

As we need a squashfs image for installing precise with maas 2.3+,
we modify the code here to build that image.

Note that this squashfs image is known to not boot with rooturl
as the other squashfs images produced do.

391. By Scott Moser

Do not install cloud-initramfs-dyn-netconf in releases newer than xenial.

The cloud-initramfs-dyn-netconf was being added to the maas image.
It was only absolutely necessary in <xenial, but is left as present
in xenial as images still use the /etc/network/interfaces link.
See change="symlink ENI for cloud-initramfs-dyn-netconf".

It is not needed in or used without ifupdown, and ifupdown is not present
in artful or bionic.

392. By Scott Moser

Re-add cloud-initramfs-dyn-netconf. Needed by maas for BOOTIF in ip=.

The previous commit to trunk dropped cloud-initramfs-dyn-netconf from
the maas image in releases newer than xenial.

That caused errors in MAAS. cloud-initramfs-dyn-netconf does 2 things:
 a.) writes /run/network/dynamic-interfaces
     this is a ENI style file with data retrived from ipconfig
 b.) convert 'BOOTIF' string in the value of IP
   Example:
     ip=::::foobar:BOOTIF BOOTIF=01-00-22-68-10-c1-e6
   will be effectively rendered as:
     ip=::::foobar:eth0

'b' is still required by maas.

Note: in maas v3 images, the squashfs image is re-used pristine
from cloud-images. Because of this, the installation into the image
affects initramfs creation, but does not affect the image. That is
correct in that this package is not needed in the image but only
in the initramfs.

393. By Lee Trager

Add hpilo kernel module to ephemeral initrd

394. By Lee Trager

Add --proposed for bootloaders

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'meph2/commands/dpkg.py'
2--- meph2/commands/dpkg.py 2016-08-24 20:40:23 +0000
3+++ meph2/commands/dpkg.py 2018-04-09 19:54:24 +0000
4@@ -102,7 +102,9 @@
5 return ret == 0
6
7
8-def get_package(archive, pkg_name, architecture, release=None, dest=None):
9+def get_package(
10+ archive, pkg_name, architecture, release=None, dest=None,
11+ proposed=False):
12 """Look through the archives for package metadata. If a dest is given
13 download the package.
14
15@@ -112,7 +114,10 @@
16 release = get_distro_release() if release is None else release
17 package = None
18 # Find the latest version of the package
19- for dist in ('%s-updates' % release, '%s-security' % release, release):
20+ dists = ('%s-updates' % release, '%s-security' % release, release)
21+ if proposed:
22+ dists = ('%s-proposed' % release,) + dists
23+ for dist in dists:
24 base_url = '%s/dists/%s' % (archive, dist)
25 packages = get_packages(base_url, architecture, pkg_name)
26 if pkg_name in packages:
27@@ -218,11 +223,12 @@
28
29 def extract_files_from_packages(
30 archive, packages, architecture, files, release, target, path,
31- grub_format=None, grub_config=None, grub_output=None):
32+ grub_format=None, grub_config=None, grub_output=None, proposed=False):
33 tmp = tempfile.mkdtemp(prefix='maas-images-')
34 src_packages = []
35 for package in packages:
36- package = get_package(archive, package, architecture, release, tmp)
37+ package = get_package(
38+ archive, package, architecture, release, tmp, proposed=proposed)
39 pkg_path = os.path.join(tmp, os.path.basename(package['Filename']))
40 if pkg_path is None:
41 sys.stderr.write('%s not found in archives!' % package)
42
43=== modified file 'meph2/commands/mimport.py'
44--- meph2/commands/mimport.py 2017-05-02 07:31:59 +0000
45+++ meph2/commands/mimport.py 2018-04-09 19:54:24 +0000
46@@ -97,8 +97,9 @@
47 src_packages = {}
48 for package in firmware_platform['packages']:
49 package_info = get_package(
50- firmware_platform['archive'], package,
51- firmware_platform['arch'], firmware_platform['release'])
52+ archive=firmware_platform['archive'], pkg_name=package,
53+ architecture=firmware_platform['arch'],
54+ release=firmware_platform['release'], proposed=args.proposed)
55 # Some source packages include the package version in the source
56 # name. Only take the name, not the version.
57 src_package_name = package_info['Source'].split(' ')[0]
58@@ -167,7 +168,7 @@
59 firmware_platform['arch'], firmware_platform['files'],
60 firmware_platform['release'], args.target, path, grub_format,
61 firmware_platform.get('grub_config'),
62- firmware_platform.get('grub_output'))
63+ firmware_platform.get('grub_output'), args.proposed)
64 product_tree['products'][product_id]['versions'][version] = {
65 'items': items
66 }
67@@ -308,6 +309,9 @@
68 args = [args]
69 parser.add_argument(*args, **kwargs)
70 parser.set_defaults(action=main_import)
71+ parser.add_argument(
72+ '--proposed', help='Pull bootloaders from proposed',
73+ action='store_true', default=False)
74
75 args = parser.parse_args()
76 if not getattr(args, 'action', None):

Subscribers

People subscribed via source and target branches