NC | Online Upgrade | Replace failure if system.json contains hosts that do not exist in --expected_hosts with a warning #8612
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
Issues: Fixed #xxx / Gap #xxx
Testing Instructions:
Automatic tests -
sudo jest --testRegex=jest_tests/test_cli_upgrade
Manual tests -
a. sudo mkdir /etc/noobaa.conf.d/
b. checkout to 5.16
c. start noobaa -
sudo node src/cmd/nsfs.js --debug 5
, stop noobaa CTRL+Cd. checkout to 5.18
e. start noobaa -
sudo node src/cmd/nsfs.js --debug 5
, stop noobaa CTRL+Cf. edit system.json and add another hostname object with key that doesn't exist, for example -
vi cat /etc/noobaa.conf.d/system.json
{"existing_hostname":{"current_version":"5.18.0","upgrade_history":{"successful_upgrades":[{"timestamp":1734620619190,"from_version":"5.16.5","to_version":"5.18.0"}]}} + "non_existing_hostname":{"current_version":"5.18.0","upgrade_history":{"successful_upgrades":[{"timestamp":1734620619190,"from_version":"5.16.5","to_version":"5.18.0"}]}} }
g. run config dir upgrade start with expected_hosts having non only the existing_host -
noobaa-cli upgrade start --expected_version 5.18.0 --expected_hosts existing_host_name
and expect a successful upgrade
Inside the logs you can see a warning about it but no failure -
a. sudo mkdir /etc/noobaa.conf.d/
b. checkout to 5.16
c. start noobaa -
sudo node src/cmd/nsfs.js --debug 5
, stop noobaa CTRL+Cd. checkout to 5.18
e. start noobaa -
sudo node src/cmd/nsfs.js --debug 5
, stop noobaa CTRL+Cf. run config dir upgrade start with expected_hosts having non existing host -
noobaa-cli upgrade start --expected_version 5.18.0 --expected_hosts existing_host_name,non_existing_hostname
and expect a failure -