Skip to content

Commit

Permalink
restore - ensure shutdown of logserver after restore
Browse files Browse the repository at this point in the history
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
  • Loading branch information
morucci committed Sep 4, 2024
1 parent c8a6d71 commit 9d430c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cli/cmd/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions doc/reference/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9d430c3

Please sign in to comment.