Gentoo Archives: gentoo-dev

From: Erik Mackdanz <erikmack@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] openstack image update
Date: Fri, 03 Jul 2015 17:06:29
Message-Id: 87a8vd2msw.fsf@msi.mackdanz.net
In Reply to: [gentoo-dev] openstack image update by Matthew Thode
1 Matthew Thode <prometheanfire@g.o> writes:
2
3 > I've updated the openstack images to make them smaller, make them work
4 > with dynamic ethernet interface add/delete, and make the disk resize on
5 > first boot. I've also made nomultilib and hardened images.
6
7 Good work on these images, prometheanfire. I've launched a few
8 instances and they work nicely.
9
10 I have some feedback:
11
12 - root can log in at the console with no password. This may have been
13 intentional but it's unusual in the industry. Consider a 'passwd -l
14 root' to lock the account from any access (until a sudo'ed 'gentoo'
15 user decides to set one).
16
17 - I noticed there is a reboot during the first launch. I assume this is
18 because of the disk resize. Consider these two other mechanisms for
19 accomplishing the resize (I've implemented both at my job, but in
20 other distros).
21
22 1) The initramfs has additional code that grows the / partition before
23 it is mounted. Probably genkernel doesn't support this today, but
24 it could.
25
26 2) / is on a small LVM logical volume. At early boot, an 'lvextend'
27 grows the lv to use the full disk without requiring the kernel to
28 re-read the partition table. This is the approach most distros
29 take.
30
31 Eliminating the reboot would shave some time off the launch. Also
32 cloud-init would be able to execute its new-instance code on the
33 system's final state (larger disk) instead of the intermediate
34 (pre-reboot, small-disk) state.
35
36 - I see the kernel sources are deleted (and a dangling symlink remains).
37 What Rackspace has done with its Gentoo images (and I've appreciated
38 it) is leave the kernel sources there. If I need some obscure module,
39 I can quickly build the single module and modprobe it.
40
41 I was able to make kernel adjustments by using /proc/config.gz,
42 re-installing the sources, building, and rebooting. It just took longer.
43
44 - The root disk is 5GB, and can grow from there. If it could fit into
45 1G, then m1.tiny's could be launched. This is probably a low-value
46 activity since 1G is hard to achieve (no portage tree!) and m1.tiny's
47 aren't useful generally.
48
49 Thanks for considering these enhancements for future builds. I'd love
50 to hear feedback on any of these suggestions.
51
52 --
53 Erik Mackdanz