Skip to content

Commit 4adbcdc

Browse files
authored
Merge branch 'main' into os-use-fix
2 parents 79f7c3b + aedeb29 commit 4adbcdc

File tree

16 files changed

+207
-27
lines changed

16 files changed

+207
-27
lines changed

onboarding-manager/.trivyignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@ AVD-KSV-0014
1212
# We should be safe to ignore CVE-2020-8559 as long as we use kube-api server that doesn't respond with redirects.
1313
CVE-2020-8559
1414

15-
# FIXME Upgrade of golang to 1.24.6 to be taken up post 3.1 release
16-
CVE-2025-47907
1715

1816
# FIXME Upgrade of golang to 1.24.9/1.25.3
1917
CVE-2025-58187
18+
CVE-2025-47912
19+
CVE-2025-58183
20+
CVE-2025-58186
21+
CVE-2025-58188
22+
CVE-2025-61724
2023

2124
# PostgreSQL CVEs
2225
CVE-2023-45853
@@ -151,5 +154,3 @@ CVE-2023-45287
151154
CVE-2023-45288
152155
CVE-2024-37370
153156

154-
# Upgrade of golang to 1.24.6 to be taken up post 3.1 release
155-
CVE-2025-47907

onboarding-manager/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-FileCopyrightText: (C) 2025 Intel Corporation
22
# SPDX-License-Identifier: Apache-2.0
33

4-
FROM golang:1.24.8-bookworm as builder
4+
FROM golang:1.24.6-bookworm as builder
55

66
ENV GO111MODULE=on
77
ARG MAKE_TARGET=go-build

onboarding-manager/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.38.10
1+
1.38.12

onboarding-manager/internal/handlers/controller/reconcilers/instance.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,8 @@ func (ir *InstanceReconciler) tryProvisionInstance(ctx context.Context, instance
463463

464464
// Check status of Prod Workflow and initiate if it's not running.
465465
if err := onboarding.CheckStatusOrRunProdWorkflow(ctx, deviceInfo, instance); err != nil {
466-
zlogInst.InfraSec().Err(err).Msgf("Failed CheckStatusOrRunProdWorkflow - Instance %s with Host UUID %s",
467-
instance.GetResourceId(), instance.GetHost().GetUuid())
466+
zlogInst.InfraSec().Err(err).Msgf("Failed CheckStatusOrRunProdWorkflow - Instance %s with Host UUID %s and Error is %s",
467+
instance.GetResourceId(), instance.GetHost().GetUuid(), err.Error())
468468
return err
469469
}
470470

onboarding-manager/internal/onboarding/types/types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,7 @@ type (
5959
IsStandaloneNode bool
6060
// LVMSize is the size of LVM to be created on the host
6161
UserLVMSize uint64
62+
// TLS CA Certificate for HTTPS downloads from custom servers (e.g., nginx file server)
63+
OSTLSCACert string
6264
}
6365
)

onboarding-manager/internal/onboarding/workflow.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,20 @@ func CheckStatusOrRunProdWorkflow(ctx context.Context,
8282
// 2) we already finished & removed workflow for Instance -> in this case we should never get here
8383
runErr := runProdWorkflow(ctx, kubeClient, deviceInfo, instance)
8484
if runErr != nil {
85+
zlog.Error().Err(runErr).Msgf("Failed to run Prod workflow for host %s and Error is %s",
86+
deviceInfo.GUID, runErr.Error())
8587
return runErr
8688
}
8789

88-
// runProdWorkflow returned no error, but we return an error here so that the upper layer can handle it appropriately
90+
// runProdWorkflow returned no error, but we return an error here so that the
91+
// upper layer can handle it appropriately
8992
// and reconcile until the workflow is finished.
9093
return inv_errors.Errorfr(inv_errors.Reason_OPERATION_IN_PROGRESS, "Prod workflow started, waiting for it to complete")
9194
}
9295

9396
if err != nil {
9497
// some unexpected error, we fail to get workflow status
98+
zlog.Error().Err(err).Msgf("Failed to run Prod workflow for host %s and Error is %s", deviceInfo.GUID, err.Error())
9599
return err
96100
}
97101

@@ -116,6 +120,7 @@ func runProdWorkflow(
116120
deviceInfo.AuthClientID = clientID
117121
deviceInfo.AuthClientSecret = clientSecret
118122
deviceInfo.TenantID = instance.GetTenantId()
123+
deviceInfo.OSTLSCACert = instance.GetOs().GetTlsCaCert()
119124

120125
if instance.GetLocalaccount() != nil {
121126
deviceInfo.LocalAccountUserName = instance.GetLocalaccount().Username
@@ -165,7 +170,7 @@ func getWorkflow(ctx context.Context, k8sCli client.Client, workflowName, hostRe
165170
}
166171

167172
if clientErr != nil {
168-
zlog.InfraSec().InfraErr(clientErr).Msgf("")
173+
zlog.InfraSec().InfraErr(clientErr).Msgf("Failed to get workflow %s status. Error is %s", workflowName, clientErr.Error())
169174
// some other error that may need retry
170175
return nil, inv_errors.Errorf("Failed to get workflow %s status.", workflowName)
171176
}

onboarding-manager/internal/tinkerbell/template_data.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ func tinkActionCexecImage(tinkerImageVersion string) string {
229229
func tinkActionDiskImage(tinkerImageVersion string) string {
230230
iv := getTinkerImageVersion(tinkerImageVersion)
231231
if v := os.Getenv(envTinkActionDiskImage); v != "" {
232-
return fmt.Sprintf("%s:%s", v, iv)
232+
return v
233233
}
234234
return fmt.Sprintf("%s:%s", defaultTinkActionDiskImage, iv)
235235
}
@@ -261,7 +261,7 @@ func tinkActionKernelupgradeImage(tinkerImageVersion string) string {
261261
func tinkActionQemuNbdImage2DiskImage(tinkerImageVersion string) string {
262262
iv := getTinkerImageVersion(tinkerImageVersion)
263263
if v := os.Getenv(envTinkActionQemuNbdImage2DiskImage); v != "" {
264-
return fmt.Sprintf("%s:%s", v, iv)
264+
return v
265265
}
266266
return fmt.Sprintf("%s:%s", defaultTinkActionQemuNbdImage2DiskImage, iv)
267267
}
@@ -335,6 +335,8 @@ func GenerateWorkflowInputs(ctx context.Context, deviceInfo onboarding_types.Dev
335335
ENProxyNoProxy: infraConfig.ENProxyNoProxy,
336336
}
337337

338+
inputs.DeviceInfo.OSTLSCACert = deviceInfo.OSTLSCACert
339+
338340
return structToMapStringString(inputs), nil
339341
}
340342

onboarding-manager/internal/tinkerbell/templates/microvisor.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ tasks:
2929
environment:
3030
IMG_URL: {{ .DeviceInfoOSImageURL }}
3131
SHA256: {{ .DeviceInfoOsImageSHA256 }}
32+
TLS_CA_CERT: "{{ .DeviceInfoOSTLSCACert }}"
3233
COMPRESSED: true
3334
HTTP_PROXY: {{ .EnvENProxyHTTP }}
3435
HTTPS_PROXY: {{ .EnvENProxyHTTPS }}

onboarding-manager/internal/tinkerbell/templates/ubuntu.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ tasks:
3434
environment:
3535
IMG_URL: {{ .DeviceInfoOSImageURL }}
3636
SHA256: {{ .DeviceInfoOsImageSHA256 }}
37+
TLS_CA_CERT: "{{ .DeviceInfoOSTLSCACert }}"
3738
HTTP_PROXY: {{ .EnvENProxyHTTP }}
3839
HTTPS_PROXY: {{ .EnvENProxyHTTPS }}
3940
NO_PROXY: {{ .EnvENProxyNoProxy }}

onboarding-manager/pkg/platformbundle/ubuntu-22.04/Installer

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ install_dependencies() {
197197
rm -f /etc/apt/sources.list.d/edge-node.list
198198
apt-get update
199199
echo -e "\e[32m[install git python3-pip]\e[0m"
200-
sudo apt-get install -y curl wget unzip apparmor iptables lvm2 cryptsetup lxc mosquitto tpm2-abrmd tpm2-tools software-properties-common python3-venv git jq libpq5 python3-pip ca-certificates gnupg dmidecode libace-dev cmake python3 libglib2.0-dev libcurl4-openssl-dev libxerces-c-dev libnl-3-dev libnl-route-3-dev libxml2-dev libidn2-0-dev xsltproc docbook-xsl devscripts
200+
sudo apt-get install -y curl wget unzip apparmor iptables lvm2 cryptsetup lxc tpm2-abrmd tpm2-tools software-properties-common python3-venv git jq libpq5 python3-pip ca-certificates gnupg dmidecode libace-dev cmake python3 libglib2.0-dev libcurl4-openssl-dev libxerces-c-dev libnl-3-dev libnl-route-3-dev libxml2-dev libidn2-0-dev xsltproc docbook-xsl devscripts
201201

202202
# IMPORTANT: These hardcoded uid/gid must be aligned to that in Edge Microvisor Toolkit specified in cluster-agent.conf.
203203
# If additional new users or groups need to be created by DKAM, they MUST be added after the users and group created below to

0 commit comments

Comments
 (0)