simple-init/glean missing some requirements (centos-minimal 8)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
diskimage-builder |
New
|
Undecided
|
Unassigned |
Bug Description
Following some tests with -e simple-init and centos-minimal version 8, there are a few things that prevent simple-init / glean, to work:
- glean calls the "hostname" binary but it is not installed. The "hostname" package is missing.
- NetworkManager conf (for example, through NetworkManager-
```
[main]
plugins=ifcfg-rh
```
per glean doc.
- dhcp-all-interfaces is installed, but it should probably not be when simple-init is included
In addition, and I don't know if it's really an issue with glean or the way it is packaged, there are more issues with glean: the network configuration (handled through NetworkManager in centos8) is not refreshed, and glean can fail to find the right config drive (if we run simple-init, with some networkdata attached to a node, and some networkdata already present on a disk, there will be multiple disks labelled config-2, and glean might pick up the wrong one. I personally am happy with a fix like this:
```
--- glean.sh 2021-03-18 13:56:34.635167121 +0000
+++ glean.sh.new 2021-03-18 13:56:49.727167074 +0000
@@ -31,7 +31,14 @@
# Test to see if config-drive exists. If not, skip and assume DHCP networking
# will work because sanity
-if [ -n "$CONFIG_
+if lsblk /dev/sr0 -o LABEL | grep "config-2" ; then
+ mkdir -p /mnt/config
+ sleep $(( $$ % 11 ))
+ mount -t iso9660 -o ro,mode=0700 /dev/sr0 /mnt/config || true
+ [[ -d /mnt/config/
+
+ glean --ssh --skip-network --hostname
+elif [ -n "$CONFIG_
# Mount config drive
mkdir -p /mnt/config
BLOCKDEV=
@@ -47,3 +54,7 @@
fi
glean $@
+rc=$?
+nmcli connection reload
+nmcli networking off ; sleep 2 ; nmcli networking on
+exit $rc
```
)
description: | updated |