From cec7b0296165bb0579742e8fe50a017901a5c3fc Mon Sep 17 00:00:00 2001 From: Jagatguru Prasad Mishra Date: Mon, 5 Feb 2024 04:47:13 -0500 Subject: [PATCH] Avoid copy of encryption-provider from drbd location As we are using secure luks file system which is replicated as well between controllers. We don't need to copy it from drbd config location in controllerconfig service. This change avoids copy of encryption-provider.yaml from '/opt/platform/config//kubernetes' to '/etc/kubernetes'. This fixes the issue observed during platform upgrade. Test Plan: PASS: build-pkgs -c -p controllerconfig PASS: build-image PASS: SX upgrade: system should be upgraded to the latest version without any issues. Story: 2010873 Task: 49376 Change-Id: Id0656df6878eed0bd7df2c1e9d5739cf2d536aa2 Signed-off-by: Jagatguru Prasad Mishra --- .../scripts/controller_config | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/controllerconfig/controllerconfig/scripts/controller_config b/controllerconfig/controllerconfig/scripts/controller_config index 8fc5270e2f..17d99e9c28 100755 --- a/controllerconfig/controllerconfig/scripts/controller_config +++ b/controllerconfig/controllerconfig/scripts/controller_config @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2013-2023 Wind River Systems, Inc. +# Copyright (c) 2013-2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -487,13 +487,16 @@ start() FILES=`ls $CONFIG_DIR/kubernetes/*.yaml` for FILE in $FILES do - cp -P $FILE /etc/kubernetes/ - if [ $? -ne 0 ] - then - fatal_error "Unable to copy kube-apiserver config file: $FILE" - else - FILENAME=`basename $FILE` - chmod 600 /etc/kubernetes/$FILENAME + # Exclude encryption-provider.yaml + if [ "$FILE" != "$CONFIG_DIR/kubernetes/encryption-provider.yaml" ]; then + cp -P $FILE /etc/kubernetes/ + if [ $? -ne 0 ] + then + fatal_error "Unable to copy kube-apiserver config file: $FILE" + else + FILENAME=`basename $FILE` + chmod 600 /etc/kubernetes/$FILENAME + fi fi done fi