Upgrade utils | change variables, errors and log prints to be general to both Containerized and NC environments #8696
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explain the changes
Container
/Server
terms usage from upgrade_utils.js should_upgrade() and load_required_scripts() and instead usedcurrent_version
andexisting_version
since it's being used by both Containerized and NC environments andContainer
can't be used in NC env.Issues: Fixed #xxx / Gap #xxx
Testing Instructions:
Manual tests -
Nothing to upgrade -
a. Run
sudo node noobaa-core/src/cmd/nsfs.js --debug 5
, CTRL + Cb. Run
noobaa-cli upgrade start --expected_version 5.18.0 --expected_hosts hostname1
Check the logs and see that container term was removed -
Jan-16 11:11:04.197 [/13595] [L0] core.upgrade.upgrade_utils:: the versions of the new_version and the current_version match. no need to upgrade
Upgrade is needed -
a. git checkout 5.17, Run
sudo node noobaa-core/src/cmd/nsfs.js --debug 5
, CTRL + Cb. git checkout 5.18.0, Run
sudo node noobaa-core/src/cmd/nsfs.js --debug 5
, CTRL + Cc. Run
noobaa-cli upgrade start --expected_version 5.18.0 --expected_hosts hostname1
Check the logs and see that container term was removed -
Jan-16 11:15:28.699 [/15525] [L0] core.upgrade.upgrade_utils:: new_version is 1.0.0 and current server version is 0.0.0. will upgrade
Downgrade (artificial because 5.17 does not contain these changes) -
a. change package.json version to 5.19, Run
sudo node noobaa-core/src/cmd/nsfs.js --debug 5
, CTRL + Cb. git checkout 5.18.0, Run
sudo node noobaa-core/src/cmd/nsfs.js --debug 5
, CTRL + CCheck the logs and see that container term was removed -