cloud/agent: default to detected NetworkConfig installing OS
The agent should pick the detected NetworkConfig if the OSInstallRequest
does not contain a NetworkConfig
Change-Id: I27f75735907b7c993dcd7002a863cd8fe00699fa
Reviewed-on: https://review.monogon.dev/c/monogon/+/1602
Tested-by: Jenkins CI
Reviewed-by: Serge Bazanski <serge@monogon.tech>
diff --git a/cloud/agent/agent.go b/cloud/agent/agent.go
index a339794..ca2bd0c 100644
--- a/cloud/agent/agent.go
+++ b/cloud/agent/agent.go
@@ -156,7 +156,7 @@
installationReport = &bpb.OSInstallationReport{
Generation: res.InstallationRequest.Generation,
}
- if err := install(res.InstallationRequest, l, isEFIBoot); err != nil {
+ if err := install(res.InstallationRequest, agentInit.NetworkConfig, l, isEFIBoot); err != nil {
l.Errorf("Installation failed: %v", err)
installationReport.Result = &bpb.OSInstallationReport_Error_{
Error: &bpb.OSInstallationReport_Error{