Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NC | Online Upgrade GPFS fixes + new host but existing system fix #8560

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

romayalon
Copy link
Contributor

@romayalon romayalon commented Nov 27, 2024

Explain the changes

  1. Fixes for upgrade script run on GPFS flow -
  2. config_dir_retructure.prepare_account_upgrade_params() - change the open mode of the dst file to be w*
  3. config_dir_retructure.create_account_access_keys_index_if_missing()Changed tmp_access_keys_path to be a backup dir under the config root.
  4. config_dir_retructure.create_account_access_keys_index_if_missing() - Changed the linkfileat() usage to rename, this is not working as expected on GPFS, hence used the POSIX method that works as expected also on GPFS machine.
  5. safe_link() - changed dir_file to dst_file and src_path to dst_path.

General fixes -

  1. config_dir_retructure.run() - Added util.inspect() for printing failed accounts.
  2. config_fs.init_nc_system() - when system exists but there is a new host - Changed the property new_host_data to be the host_name.
// when a new node rise and it does not exist in system.json it puts its data in "new_host_data" instead of in the top layer
// incorrect - the bug 
sudo cat /etc/noobaa.conf.d/system.json | jq
{
  "host1": {
    "current_version": "5.18.0",
    "upgrade_history": {
      "successful_upgrades": [
        {
          "timestamp": 1733068872760,
          "from_version": "5.17.1",
          "to_version": "5.18.0"
        }
      ]
    }
  },
....,
  "new_host_data": {
    "host-2": {
      "current_version": "5.18.0",
      "upgrade_history": {
        "successful_upgrades": []
      }
    }
  }
}

// correct - after fix - 
sudo cat /etc/noobaa.conf.d/system.json | jq
{
  "host-1": {
    "current_version": "5.18.0",
    "upgrade_history": {
      "successful_upgrades": [
        {
          "timestamp": 1733068872760,
          "from_version": "5.17.1",
          "to_version": "5.18.0"
        }
      ]
    }
  },
  ...., 
  "host-2": {
    "current_version": "5.18.0",
    "upgrade_history": {
      "successful_upgrades": []
    }
  }
}

Issues: Fixed #xxx / Gap #xxx

  1. Issues seen on NooBaa upgrade on GPFS cluster + a small fix found locally.

Testing Instructions:

  1. GPFS flow -
  • Install NooBaa 5.17.z, run nsfs.js or the start the service, stop the service
  • Upgrade NooBaa RPM to NooBaa 5.18.0, start the service.
  • Run - /usr/local/bin/noobaa-cli upgrade start --expected_version 5.18.0 --expected_hosts host1,host2,host3 on a GPFS cluster
  • Check that the upgrade finished successfully and the new structure is as it should be.
  1. hostname bug - run nsfs.js, stop it, manually edit system.json and change the name of the node to something else and then run again nsfs.js, stop it, check system.json.
  • Doc added/updated
  • Tests added

@romayalon romayalon requested a review from dannyzaken November 27, 2024 12:14
@romayalon romayalon force-pushed the romy-online-upgrade-fixes branch from f457594 to cf4140c Compare November 27, 2024 12:30
@romayalon romayalon requested a review from shirady December 1, 2024 08:24
@romayalon romayalon force-pushed the romy-online-upgrade-fixes branch from cf4140c to 39644eb Compare December 1, 2024 08:25
Copy link
Contributor

@shirady shirady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

src/util/native_fs_utils.js Outdated Show resolved Hide resolved
src/sdk/config_fs.js Outdated Show resolved Hide resolved
@romayalon romayalon force-pushed the romy-online-upgrade-fixes branch 5 times, most recently from 58994e0 to be28ab4 Compare December 2, 2024 08:08
@romayalon romayalon force-pushed the romy-online-upgrade-fixes branch from be28ab4 to de66d95 Compare December 2, 2024 08:46
@romayalon romayalon merged commit e480192 into noobaa:master Dec 2, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants