mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-20 17:32:15 +00:00
fix(xcat-core): Genesis OpenEmbedded asks for DHCPv6 on every nic
The OpenEmbedded Genesis image runs DHCPv6 on every nic of a node under one DUID, so a node with several nics on the provisioning network holds its reserved address on whichever nic asked first. When that is not the boot nic, xcatd receives the node's report from a pool address and cannot name the node. xcat-genesis-bootnic.service runs genesis-bootnic before NetworkManager starts, on the same condition and ordering as xcat-genesis-duid.service. The recipe installs both the script and the unit, and enables the unit. A secondary nic is put on link-local rather than disabled, so the node still reports that nic to xcatd for its nic data and only stops asking for an address the reservation holds. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=Keep the xCAT Genesis DHCPv6 reservation on the boot nic
|
||||
ConditionKernelCommandLine=xcatd
|
||||
After=systemd-udev-trigger.service
|
||||
Before=NetworkManager.service xcat-genesis-network-state.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/libexec/xcat/genesis-bootnic
|
||||
TimeoutStartSec=30
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
+9
-1
@@ -5,6 +5,8 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/EPL-1.0;md5=57f8d5e2b3e98ac6e08
|
||||
SRC_URI = "file://10-xcat-genesis.conf \
|
||||
file://genesis-duid \
|
||||
file://xcat-genesis-duid.service \
|
||||
file://genesis-bootnic \
|
||||
file://xcat-genesis-bootnic.service \
|
||||
"
|
||||
S = "${UNPACKDIR}"
|
||||
|
||||
@@ -12,7 +14,7 @@ inherit systemd
|
||||
|
||||
RDEPENDS:${PN} = "bash coreutils networkmanager-daemon networkmanager-nmcli util-linux-logger"
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "xcat-genesis-duid.service"
|
||||
SYSTEMD_SERVICE:${PN} = "xcat-genesis-duid.service xcat-genesis-bootnic.service"
|
||||
SYSTEMD_AUTO_ENABLE = "enable"
|
||||
|
||||
do_install() {
|
||||
@@ -23,13 +25,19 @@ do_install() {
|
||||
install -d ${D}${libexecdir}/xcat
|
||||
install -m 0755 ${UNPACKDIR}/genesis-duid \
|
||||
${D}${libexecdir}/xcat/genesis-duid
|
||||
install -m 0755 ${UNPACKDIR}/genesis-bootnic \
|
||||
${D}${libexecdir}/xcat/genesis-bootnic
|
||||
|
||||
install -d ${D}${systemd_system_unitdir}
|
||||
install -m 0644 ${UNPACKDIR}/xcat-genesis-duid.service \
|
||||
${D}${systemd_system_unitdir}/xcat-genesis-duid.service
|
||||
install -m 0644 ${UNPACKDIR}/xcat-genesis-bootnic.service \
|
||||
${D}${systemd_system_unitdir}/xcat-genesis-bootnic.service
|
||||
}
|
||||
|
||||
FILES:${PN} = "${sysconfdir}/NetworkManager/conf.d/10-xcat-genesis.conf \
|
||||
${libexecdir}/xcat/genesis-duid \
|
||||
${libexecdir}/xcat/genesis-bootnic \
|
||||
${systemd_system_unitdir}/xcat-genesis-duid.service \
|
||||
${systemd_system_unitdir}/xcat-genesis-bootnic.service \
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user