cli icon indicating copy to clipboard operation
cli copied to clipboard

Change MAS CLI dialog for environments with MongoDBv4 for `mas update` command

Open mudspringhiker opened this issue 1 year ago • 2 comments

Feature and motivation

When using the latest MAS CLI (v11.2.1 as of this writing) and running the mas update command in an environment where the existing MongoDB version is 4.4.21, the CLI detects the version and asks user to "Confirm update from MongoDb 4.4.21 to 6.0.12".

Screenshot 2024-10-03 at 2 16 56 PM

The resulting pipeline eventually fails with the following error:

TASK [ibm.mas_devops.mongodb : Assert Mongo upgrade compatibility: 6.0.12 must be in ['5.0.21', '5.0.23']] ***
fatal: [localhost]: FAILED! => changed=false 
  assertion: target_mongodb_version in mongo_compatible_target_version[existing_mongo_version]
  evaluated_to: false
  msg:
  - You have an existing Mongo database instance that is running on version 4.4.21, which cannot be directly upgraded to version 6.0.12.
  - 'In order to upgrade your current instance to 6.0.12, you must first upgrade your Mongo instance version to one of the compatible options: [''5.0.21'', ''5.0.23''].'

Is it better to halt mas update and direct users to update MongoDB first to v5 then do the mas update when MongoDB v4 is detected?

Usage example

It will avoid user from hitting the error on mongodb update.

mudspringhiker avatar Oct 03 '24 19:10 mudspringhiker

Same here,

We are on version 5, new catalog wants us to version 7. Any idea how to manually update to 6, so mas update can bring us to 7?

JesperAP avatar Mar 12 '25 10:03 JesperAP

@JesperAP, please refer to doc here: https://www.ibm.com/support/pages/node/7172122, specifically, step 4.

mudspringhiker avatar Mar 17 '25 23:03 mudspringhiker