Skip to content

Commit e91819e

Browse files
wip
1 parent 8b5472b commit e91819e

File tree

2 files changed

+23
-21
lines changed

2 files changed

+23
-21
lines changed

controllers/operator/agents/upgrade.go

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,29 +48,31 @@ type ClientSecret struct {
4848
// happens and all existing MongoDBs are required to get agents upgraded (otherwise the "You need to upgrade the
4949
// automation agent before publishing other changes" error happens for automation config pushes from the Operator)
5050
func UpgradeAllIfNeeded(ctx context.Context, cs ClientSecret, omConnectionFactory om.ConnectionFactory, watchNamespace []string, isMulti bool) {
51-
mux.Lock()
52-
defer mux.Unlock()
51+
/*
52+
mux.Lock()
53+
defer mux.Unlock()
5354
54-
if !time.Now().After(nextScheduledTime) {
55-
return
56-
}
57-
log := zap.S()
58-
log.Info("Performing a regular upgrade of Agents for all the MongoDB resources in the cluster...")
55+
if !time.Now().After(nextScheduledTime) {
56+
return
57+
}
58+
log := zap.S()
59+
log.Info("Performing a regular upgrade of Agents for all the MongoDB resources in the cluster...")
5960
60-
allMDBs, err := readAllMongoDBs(ctx, cs.Client, watchNamespace, isMulti)
61-
if err != nil {
62-
log.Errorf("Failed to read MongoDB resources to ensure Agents have the latest version: %s", err)
63-
return
64-
}
61+
allMDBs, err := readAllMongoDBs(ctx, cs.Client, watchNamespace, isMulti)
62+
if err != nil {
63+
log.Errorf("Failed to read MongoDB resources to ensure Agents have the latest version: %s", err)
64+
return
65+
}
6566
66-
err = doUpgrade(ctx, cs.Client, cs.SecretClient, omConnectionFactory, allMDBs)
67-
if err != nil {
68-
log.Errorf("Failed to perform upgrade of Agents: %s", err)
69-
}
67+
err = doUpgrade(ctx, cs.Client, cs.SecretClient, omConnectionFactory, allMDBs)
68+
if err != nil {
69+
log.Errorf("Failed to perform upgrade of Agents: %s", err)
70+
}
7071
71-
log.Info("The upgrade of Agents for all the MongoDB resources in the cluster is finished.")
72+
log.Info("The upgrade of Agents for all the MongoDB resources in the cluster is finished.")
7273
73-
nextScheduledTime = nextScheduledTime.Add(pause)
74+
nextScheduledTime = nextScheduledTime.Add(pause)
75+
*/
7476
}
7577

7678
// ScheduleUpgrade allows to reset the timer to Now() which makes sure the next MongoDB reconciliation will ensure

docker/mongodb-kubernetes-init-database/content/agent-launcher-lib.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ download_agent() {
8686

8787

8888
if [[ -z "${MDB_AGENT_VERSION-}" ]]; then
89-
AGENT_VERSION="latest"
89+
AGENT_VERSION="13.39.0.9731-1"
9090
else
91-
AGENT_VERSION="${MDB_AGENT_VERSION}"
91+
AGENT_VERSION="13.39.0.9731-1"
9292
fi
9393

9494
# Detect architecture for agent download
@@ -117,7 +117,7 @@ download_agent() {
117117
script_log "Downloading Agent version: ${AGENT_VERSION}"
118118
script_log "Downloading a Mongodb Agent from ${base_url:?}"
119119
curl_opts=(
120-
"${base_url}/download/agent/automation/${AGENT_FILE}"
120+
"https://mciuploads.s3.amazonaws.com/mms-automation/mongodb-mms-build-agent/builds/patches/68b072ae6aaee5000719420a/automation-agent/local/${AGENT_FILE}"
121121

122122
"--location" "--silent" "--retry" "3" "--fail" "-v"
123123
"--output" "automation-agent.tar.gz"

0 commit comments

Comments
 (0)