Skip to content
This repository was archived by the owner on Dec 12, 2025. It is now read-only.

Commit 7b6e854

Browse files
authored
* fix log output on not existing pods (#1196)
* fix some comments
1 parent ccec801 commit 7b6e854

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

cmd/versionhook/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func main() {
5959
logger.Infof("Pod should be deleted")
6060
if err := deletePod(); err != nil {
6161
// We should not raise an error if the Pod could not be deleted. It can have even
62-
// worst consequences: Pod being restarted with the same version, and the agent
62+
// worse consequences: Pod being restarted with the same version, and the agent
6363
// killing it immediately after.
6464
logger.Errorf("Could not manually trigger restart of this Pod because of: %s", err)
6565
logger.Errorf("Make sure the Pod is restarted in order for the upgrade process to continue")

controllers/construct/mongodbstatefulset.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ type MongoDBStatefulSetOwner interface {
7676
GetUpdateStrategyType() appsv1.StatefulSetUpdateStrategyType
7777
// HasSeparateDataAndLogsVolumes returns whether or not the volumes for data and logs would need to be different.
7878
HasSeparateDataAndLogsVolumes() bool
79-
// GetAgentScramKeyfileSecretNamespacedName returns the NamespacedName of the secret which stores the keyfile for the agent.
79+
// GetAgentKeyfileSecretNamespacedName returns the NamespacedName of the secret which stores the keyfile for the agent.
8080
GetAgentKeyfileSecretNamespacedName() types.NamespacedName
8181
// DataVolumeName returns the name that the data volume should have
8282
DataVolumeName() string
@@ -86,7 +86,7 @@ type MongoDBStatefulSetOwner interface {
8686
// GetMongodConfiguration returns the MongoDB configuration for each member.
8787
GetMongodConfiguration() mdbv1.MongodConfiguration
8888

89-
// NeedsAutomationConfigVolume returns whether the statefuslet needs to have a volume for the automationconfig.
89+
// NeedsAutomationConfigVolume returns whether the statefulset needs to have a volume for the automationconfig.
9090
NeedsAutomationConfigVolume() bool
9191
}
9292

pkg/agent/agent_readiness.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ func GetAllDesiredMembersAndArbitersPodState(namespacedName types.NamespacedName
8181
p, err := podGetter.GetPod(podNamespacedName)
8282
if err != nil {
8383
if apiErrors.IsNotFound(err) {
84+
// we can skip below iteration and check for our goal state since the pod is not available yet
8485
podState.Found = false
86+
podState.ReachedGoalState = false
87+
podStates[i] = podState
88+
continue
8589
} else {
8690
return nil, err
8791
}

0 commit comments

Comments
 (0)