From 9d430c34daf584b00651df8b7714fe6b4954c2aa Mon Sep 17 00:00:00 2001 From: Fabien Boucher Date: Wed, 4 Sep 2024 09:06:14 +0200 Subject: [PATCH] restore - ensure shutdown of logserver after restore The logserver-ssd container part of the logserver pod requires the "zuul-ssh-key" secret to initialize the authorized key capable of pushing on the logserver. After a restore the logserver-sshd must be restarted to update the key passed as an ENV var. Thus the restore command must stop the logserver to force the reconcile loop of the operator to re-create the pod definition and start it. Change-Id: I376d1fc3fd96317fd5800de0fa79cd0406275d3e --- cli/cmd/restore.go | 6 ++++-- doc/reference/CHANGELOG.md | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cli/cmd/restore.go b/cli/cmd/restore.go index a07aac12..69eb9b4d 100644 --- a/cli/cmd/restore.go +++ b/cli/cmd/restore.go @@ -129,9 +129,11 @@ func restoreZuul(backupDir string, kubeContext string, env cliutils.ENV) { } func clearComponents(env cliutils.ENV) { - ctrl.Log.Info("Removing components requirering a complete restart ...") + ctrl.Log.Info("Removing components requiering a complete restart ...") - for _, stsName := range []string{"zuul-scheduler", "zuul-executor", "zuul-merger", "nodepool-builder", "zookeeper"} { + for _, stsName := range []string{ + "zuul-scheduler", "zuul-executor", "zuul-merger", + "nodepool-builder", "zookeeper", "logserver"} { cliutils.DeleteOrDie(&env, &appsv1.StatefulSet{ ObjectMeta: metav1.ObjectMeta{ Name: stsName, diff --git a/doc/reference/CHANGELOG.md b/doc/reference/CHANGELOG.md index 65175057..2ee55f99 100644 --- a/doc/reference/CHANGELOG.md +++ b/doc/reference/CHANGELOG.md @@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file. ### Fixed - Restrict trigger rules for main branches for gitlab and gerrit +- restore - logserver-sshd container not using the restored key for the authorized key ### Security