Skip to content

Conversation

@himani2411
Copy link
Contributor

@himani2411 himani2411 commented May 21, 2024

Description of changes

Changing the PATH order we set for using the cfnbootstrap script we have installed in virtualenv rather than using default scripts

  • Adding Kitchen test

Tests

Locally

./kitchen.ec2.sh environment-install test cfn-bootstrap -c 7

release-3.9 -> #2730

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.

@enrico-usai
Copy link
Contributor

Let's start merging this patch that is using the existing approach but will fix the issue.

Then we can improve this code, as suggested by @nyetsche in this issue: aws/aws-parallelcluster#5390

we could:

  • do a source profile.sh in the user_data.sh, to have it loaded for that specific command.
  • use #{cfn_bootstrap_virtualenv_path} in all other places in the code where we're calling cfn-something

In this way the cfn commands will be correctly loaded by our scripts but without impacting the PATH for all the users.

enrico-usai
enrico-usai previously approved these changes May 21, 2024
@enrico-usai enrico-usai disabled auto-merge May 21, 2024 17:10
@himani2411 himani2411 enabled auto-merge (squash) May 22, 2024 07:51
@himani2411 himani2411 disabled auto-merge May 22, 2024 11:19
@himani2411 himani2411 enabled auto-merge (squash) May 22, 2024 11:20
…ave installed in virtualenv rather than using default scripts

* Adding Kitchen test to verify the PATH  used for cfn-init is the one we have installed using virtualenv
@himani2411 himani2411 merged commit d086657 into aws:develop May 22, 2024
himani2411 pushed a commit to himani2411/aws-parallelcluster-cookbook that referenced this pull request May 27, 2024
…ipt we have installed in virtualenv rather than using default scripts (aws#2729)"

This reverts commit d086657.
himani2411 added a commit that referenced this pull request May 27, 2024
…ipt we have installed in virtualenv rather than using default scripts (#2729)" (#2739)

This reverts commit d086657.

Co-authored-by: Himani Deshpande <[email protected]>
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