Skip to content

Conversation

@himani2411
Copy link
Contributor

@himani2411 himani2411 commented Mar 5, 2024

Description of changes

[DFSM]Using .login_nodes_keys_sync_file to be used during Init and Update phase of the clusters

Bug:
Introduced in #2671 and #2672

The file we create /opt/parallelcluster/shared_login_nodes/.login_nodes_keys_sync_file as part of sync during cluster never gets updated when we Stop-Start the Cluster.
This file needs to be updated or any new Login Nodes which are launched after update of the Cluster, goes through the Init phase and wait for the content to be the latest.

Tests

  • Unit Tests
  • test_create_disable_sudo_access_for_default_user and test_dynamic_file_systems_update [ONGOING]

develop #2677

References

  • Link to impacted open issues.
  • Link to related PRs in other packages (i.e. cookbook, node).
  • Link to documentation useful to understand the changes.

Checklist

  • Make sure you are pointing to the right branch.
  • If you're creating a patch for a branch other than develop add the branch name as prefix in the PR title (e.g. [release-3.6]).
  • Check all commits' messages are clear, describing what and why vs how.
  • Make sure to have added unit tests or integration tests to cover the new/modified code.
  • Check if documentation is impacted by this change.

Please review the guidelines for contributing and Pull Request Instructions.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov
Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.48%. Comparing base (4f649ee) to head (27a0e47).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2678   +/-   ##
========================================
  Coverage    76.48%   76.48%           
========================================
  Files           22       22           
  Lines         2220     2220           
========================================
  Hits          1698     1698           
  Misses         522      522           
Flag Coverage Δ
unittests 76.48% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@himani2411 himani2411 changed the title [release-3.9][DFSM]Using .login_nodes_keys_sync_file to be used during Init and Update phase of the clusters [DFSM]Using .login_nodes_keys_sync_file to be used during Init and Update phase of the clusters Mar 5, 2024
default['cluster']['shared_dir_compute'] = node['cluster']['shared_dir']
default['cluster']['shared_dir_head'] = node['cluster']['shared_dir']
default['cluster']['shared_dir_login'] = node['cluster']['shared_dir_login_nodes']
default['cluster']['shared_login_nodes_keys_sync_file'] = "#{node['cluster']['shared_dir_login_nodes']}/.login_nodes_keys_sync_file"
Copy link
Contributor

Choose a reason for hiding this comment

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

thank yo for adding this attribute!

::FileUtils.cp_r(node['cluster']['shared_storages_mapping_path'], node['cluster']['previous_shared_storages_mapping_path'], remove_destination: true)

Chef::Log.info("Updating #{login_node_keys_sync_file} during #{node['cluster']['node_type']} update")
write_sync_file(login_node_keys_sync_file)
Copy link
Contributor

Choose a reason for hiding this comment

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

This fix would address the issue, but we should do something easier: in this sync file we should not even check the cluster config version at all because it's enough for it to be there to signal that the head node already created the keys. In the offending PRs we included the check of the cluster config version to replicate an approach that was equivalent to the sync file used by the head node to signal changes in the config file. In this case though, the check of the cluster config version is redudant and can be avoided.

@himani2411 himani2411 force-pushed the wip/develop branch 3 times, most recently from 41bbcfa to 167f3b5 Compare March 5, 2024 15:28
@himani2411 himani2411 merged commit 06eb10a into aws:develop Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants