Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 20 additions & 18 deletions controllers/operator/agents/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,31 @@ type ClientSecret struct {
// happens and all existing MongoDBs are required to get agents upgraded (otherwise the "You need to upgrade the
// automation agent before publishing other changes" error happens for automation config pushes from the Operator)
func UpgradeAllIfNeeded(ctx context.Context, cs ClientSecret, omConnectionFactory om.ConnectionFactory, watchNamespace []string, isMulti bool) {
mux.Lock()
defer mux.Unlock()
/*
mux.Lock()
defer mux.Unlock()

if !time.Now().After(nextScheduledTime) {
return
}
log := zap.S()
log.Info("Performing a regular upgrade of Agents for all the MongoDB resources in the cluster...")
if !time.Now().After(nextScheduledTime) {
return
}
log := zap.S()
log.Info("Performing a regular upgrade of Agents for all the MongoDB resources in the cluster...")

allMDBs, err := readAllMongoDBs(ctx, cs.Client, watchNamespace, isMulti)
if err != nil {
log.Errorf("Failed to read MongoDB resources to ensure Agents have the latest version: %s", err)
return
}
allMDBs, err := readAllMongoDBs(ctx, cs.Client, watchNamespace, isMulti)
if err != nil {
log.Errorf("Failed to read MongoDB resources to ensure Agents have the latest version: %s", err)
return
}

err = doUpgrade(ctx, cs.Client, cs.SecretClient, omConnectionFactory, allMDBs)
if err != nil {
log.Errorf("Failed to perform upgrade of Agents: %s", err)
}
err = doUpgrade(ctx, cs.Client, cs.SecretClient, omConnectionFactory, allMDBs)
if err != nil {
log.Errorf("Failed to perform upgrade of Agents: %s", err)
}

log.Info("The upgrade of Agents for all the MongoDB resources in the cluster is finished.")
log.Info("The upgrade of Agents for all the MongoDB resources in the cluster is finished.")

nextScheduledTime = nextScheduledTime.Add(pause)
nextScheduledTime = nextScheduledTime.Add(pause)
*/
}

// ScheduleUpgrade allows to reset the timer to Now() which makes sure the next MongoDB reconciliation will ensure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ download_agent() {


if [[ -z "${MDB_AGENT_VERSION-}" ]]; then
AGENT_VERSION="latest"
AGENT_VERSION="13.39.0.9731-1"
else
AGENT_VERSION="${MDB_AGENT_VERSION}"
AGENT_VERSION="13.39.0.9731-1"
fi

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

"--location" "--silent" "--retry" "3" "--fail" "-v"
"--output" "automation-agent.tar.gz"
Expand Down
Loading