summaryrefslogtreecommitdiff
path: root/meta-google/recipes-google
diff options
context:
space:
mode:
authorYuxiao Zhang <yuxiaozhang@google.com>2024-06-15 01:17:45 +0300
committerYuxiao Zhang <yuxiaozhang@google.com>2024-07-24 23:02:59 +0300
commit32b568131cb5696db1d57b5d331b5f1a7f9245ed (patch)
tree77d45c63b387dce0c20b8d01d4da60d4e1441431 /meta-google/recipes-google
parent112eefd4622709d57fd3db071560afb91ea21a66 (diff)
downloadopenbmc-32b568131cb5696db1d57b5d331b5f1a7f9245ed.tar.xz
google-misc: srcrev bump 177e7270dc..1e76060a37
Yuxiao Zhang (1): meta-google: dhcp-done: Adding status report Do the srcbump and add other status report changes (otherwise the build will be broken). Tested: try bmc upgrade with old/new bmc versions, all passed and status is correctly reported. Change-Id: Iafdb611ef80f1e4790f1512a7b8b48b8b9baa535 Signed-off-by: Yuxiao Zhang <yuxiaozhang@google.com>
Diffstat (limited to 'meta-google/recipes-google')
-rw-r--r--meta-google/recipes-google/google-misc/google-misc.inc2
-rw-r--r--meta-google/recipes-google/networking/dhcp-done_git.bb5
-rw-r--r--meta-google/recipes-google/networking/gbmc-bridge/50-gbmc-psu-hardreset.sh2
-rw-r--r--meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.service5
-rw-r--r--meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.sh15
-rw-r--r--meta-google/recipes-google/networking/gbmc-bridge/gbmc-start-dhcp.sh4
6 files changed, 20 insertions, 13 deletions
diff --git a/meta-google/recipes-google/google-misc/google-misc.inc b/meta-google/recipes-google/google-misc/google-misc.inc
index a630a60109..3b09e2e1ee 100644
--- a/meta-google/recipes-google/google-misc/google-misc.inc
+++ b/meta-google/recipes-google/google-misc/google-misc.inc
@@ -6,7 +6,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://../../LICENSE;md5=34400b68072d710fecd0a2940a0d1658"
SRC_URI += "git://github.com/openbmc/google-misc;branch=master;protocol=https"
-SRCREV = "177e7270dc45490ed9410c6f66363e4163278495"
+SRCREV = "1e76060a37b960851faa2ea469ce2472f9741bfe"
S = "${WORKDIR}/git/subprojects/${GOOGLE_MISC_PROJ}"
inherit meson pkgconfig
diff --git a/meta-google/recipes-google/networking/dhcp-done_git.bb b/meta-google/recipes-google/networking/dhcp-done_git.bb
index 12e3903837..2cc9b95c88 100644
--- a/meta-google/recipes-google/networking/dhcp-done_git.bb
+++ b/meta-google/recipes-google/networking/dhcp-done_git.bb
@@ -4,9 +4,12 @@ GOOGLE_MISC_PROJ = "dhcp-done"
require ../google-misc/google-misc.inc
+EXTRA_OEMESON = " \
+ -Dtests=disabled \
+ "
inherit systemd
-SYSTEMD_SERVICE:${PN} += "dhcp-done@.service"
+SYSTEMD_SERVICE:${PN} += "dhcp-done.service"
DEPENDS += " \
sdeventplus \
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/50-gbmc-psu-hardreset.sh b/meta-google/recipes-google/networking/gbmc-bridge/50-gbmc-psu-hardreset.sh
index c0974a00d1..ace4ac5598 100644
--- a/meta-google/recipes-google/networking/gbmc-bridge/50-gbmc-psu-hardreset.sh
+++ b/meta-google/recipes-google/networking/gbmc-bridge/50-gbmc-psu-hardreset.sh
@@ -25,7 +25,7 @@ gbmc_psu_hardreset_hook() {
fi
echo "Powercycling" >&2
- systemctl start gbmc-psu-hardreset.target || return
+ update-dhcp-status 'POWERCYCLE' "netboot powercycle"
# Ensure that we don't continue the DHCP process while waiting for the
# powercycle.
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.service b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.service
index 60ea0fb9ea..c361181452 100644
--- a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.service
+++ b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.service
@@ -1,13 +1,14 @@
[Unit]
Description=gBMC DHCP Client
-After=network.target
+After=network.target dhcp-done.service
+Wants=dhcp-done.service
StartLimitIntervalSec=10
StartLimitBurst=3
[Service]
Restart=on-failure
RestartSec=5
-ExecCondition=/bin/bash -c "! /bin/systemctl is-active -q dhcp-done@*"
+ExecStartPre=/usr/bin/update-dhcp-status 'ONGOING' 'Starting dhcp process'
ExecStart=/usr/bin/udhcpc6 -f -q -O fqdn -O bootfile_url -O bootfile_param -i gbmcbr -s /usr/libexec/gbmc-br-dhcp.sh
[Install]
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.sh b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.sh
index 4360e11277..c31090b656 100644
--- a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.sh
+++ b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-br-dhcp.sh
@@ -42,21 +42,26 @@ if [ "$1" = bound ]; then
# shellcheck disable=SC2154
echo "DHCPv6(gbmcbr): $ipv6/128" >&2
+ update-dhcp-status 'ONGOING' "Received dhcp response ${ipv6}"
pfx_bytes=()
ip_to_bytes pfx_bytes "$ipv6"
# Ensure we are a BMC and have a suffix nibble, the 0th index is reserved
if (( pfx_bytes[8] != 0xfd || (pfx_bytes[9] & 0xf) == 0 )); then
- echo "Invalid address" >&2
+ echo "Invalid address prefix ${ipv6}" >&2
+ update-dhcp-status 'ONGOING' "Invalid address prefix ${ipv6}"
exit 1
fi
# Ensure we don't have more than a /80 address
for (( i = 10; i < 16; ++i )); do
if (( pfx_bytes[i] != 0 )); then
- echo "Invalid address" >&2
+ echo "Invalid address ${ipv6}" >&2
+ update-dhcp-status 'ONGOING' "Invalid address ${ipv6}"
exit 1
fi
done
+ update-dhcp-status 'ONGOING' "Setting hostname ${fqdn} and ip ${ipv6}"
+
pfx="$(ip_bytes_to_str pfx_bytes)"
gbmc_br_set_ip "$pfx" || exit
@@ -70,11 +75,13 @@ if [ "$1" = bound ]; then
# If any of our hooks had expectations we should fail here
if [ "${#GBMC_BR_DHCP_OUTSTANDING[@]}" -gt 0 ]; then
echo "Not done with DHCP process: ${!GBMC_BR_DHCP_OUTSTANDING[*]}" >&2
+ update-dhcp-status 'ONGOING' "Outstanding DHCP hooks ${!GBMC_BR_DHCP_OUTSTANDING[*]}"
exit 1
fi
# Ensure that the installer knows we have completed processing DHCP by
# running a service that reports completion
- echo 'Start DHCP Done' >&2
- systemctl start dhcp-done@DONE --no-block
+ echo 'Signaling dhcp done' >&2
+ update-dhcp-status 'DONE' "Netboot finished"
+
fi
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-start-dhcp.sh b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-start-dhcp.sh
index c6fddbb9cf..b968573daf 100644
--- a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-start-dhcp.sh
+++ b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-start-dhcp.sh
@@ -15,10 +15,6 @@
systemctl stop gbmc-br-dhcp
-# in some cases dhcp-done might be run already, in this case we want
-# a powercycle for a clean install
-systemctl is-active -q dhcp-done@* && exit 1
-
# stop dhcp term service to prevent race condition
systemctl is-active --quiet gbmc-br-dhcp-term && systemctl stop gbmc-br-dhcp-term