Fix GPU lane kernel mismatch and bridge egress
What
Two defects in the GPU lane (up --accelerator), found on a rig.
Kernel mismatch
Cause. startup.sh treated a successful dnf install kernel-devel-matched kernel-headers as proof the headers matched the running kernel. The package can install a newer kernel and its headers while the image still runs the older one. dnf succeeded, the reboot branch never ran, DKMS built for a kernel that was not running, modprobe nvidia failed, and up aborted before the omnibus install.
Fix. The lane takes the reboot path when the install fails, when /usr/src/kernels/$(uname -r) does not exist, or when modprobe nvidia fails. All three share one marker, so the reboot happens at most once; a second trip fails with a message. GCE runs the script again on the boot, and the driver builds for the running kernel. up already polls startup/status, so it follows the boot with no new mechanism; the GPU lane polls for 15 minutes instead of 5, because the update, the boot and the driver build do not fit in 5.
Bridge egress
Cause. GCE ships /etc/sysctl.d/60-gce-network-security.conf with net.ipv4.ip_forward=0. Docker sets it to 1 at start, and the sysctl --system that omnibus reconfigure runs sets it back, so containers on the default bridge lose outbound access.
Fix. The lane writes /etc/sysctl.d/99-docker-forward.conf with net.ipv4.ip_forward=1, which sorts after the GCE file, and applies it.
flowchart TD
A[startup.sh on boot] --> B[write 99-docker-forward.conf and apply]
B --> C{nvidia-smi works?}
C -->|yes| H[Docker and container toolkit]
C -->|no| D[dnf install kernel-devel-matched]
D --> E{dnf ok and headers match uname -r?}
E -->|no| R{marker present?}
E -->|yes| F[dkms build, modprobe nvidia]
F -->|modprobe fails| R
F -->|loads| H
R -->|no| S[install kernel, touch marker, reboot]
R -->|yes| X[signal failed]
S --> A
H --> Z[signal complete, up proceeds]Proof
One accelerator rig, omnibus base, provisioned from this branch with --skip-activation and no pinned zone.
- The mismatch occurred on its own: the image ran 7.2.15 and
kernel-devel-matchedinstalled 7.3.3 headers. The lane rebooted once;startup complete after 640s, which the old 5 minute wait would have timed out on.upreachedready. uname -rand the module'svermagicboth read 7.3.3-100.fc43.x86_64;/usr/src/kernelsholds that one kernel.nvidia-smi -Llists the GPU on the host and inside a--gpus allcontainer.- After
sudo gitlab-ctl reconfigure,net.ipv4.ip_forwardis 1 anddocker run --rm curlimages/curl -sI https://gitlab.comreturnsHTTP/2 301. With the drop-in moved aside andsysctl --systemrun, forwarding is 0 and the same command gets no response. - The engine self-test gains cases for the header check, the single reboot, the second-try failure, the drop-in and its apply, and the poll length. With the two script changes reverted, 11 of them fail.
Notes
scan-accept.ymlcounts are unchanged; one newrm -rfthe scan flagged in the self-test was removed instead of accepted.operations.mdgains one clause and sheds more words elsewhere in the file. Localjust word-budgetreads 46032 onmainwith BSDwc; CI reads 45899. This change nets -5 words.