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

ec2_placement_group: Add partition strategy and partition count #872

Conversation

mandar242
Copy link
Contributor

SUMMARY

Add partition as a strategy and an option, partition_count to choose the actual number of partitions for the community.aws.ec2_placement_group module.

Fixes #808

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

ec2_placement_group

ADDITIONAL INFO

Tested locally with

- name: Create a partition placement group with partition count 4.
    ec2_placement_group:
      name: my-cluster
      state: present
      strategy: partition
      partition_count: 4

@softwarefactory-project-zuul
Copy link
Contributor

@softwarefactory-project-zuul
Copy link
Contributor

@alinabuzachis
Copy link
Contributor

recheck

Copy link
Contributor

@alinabuzachis alinabuzachis left a comment

Choose a reason for hiding this comment

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

@mandar242 Thank you for working on this. Could you also add some integration tests for this parameter? Thanks.

plugins/modules/ec2_placement_group.py Show resolved Hide resolved
@softwarefactory-project-zuul

This comment has been minimized.

Copy link
Contributor

@alinabuzachis alinabuzachis left a comment

Choose a reason for hiding this comment

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

@mandar242 This looks great but we'll need some integration tests for this parameter.

plugins/modules/ec2_placement_group.py Outdated Show resolved Hide resolved
@softwarefactory-project-zuul
Copy link
Contributor

Merge Failed.

This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.

@mandar242 mandar242 force-pushed the 808_ec2_placement_group_partition branch from 0342db6 to 1bb84e1 Compare January 27, 2022 23:18
@ansibullbot
Copy link

@ansibullbot ansibullbot added community_review feature This issue/PR relates to a feature request module module needs_triage plugins plugin (any type) labels Jan 27, 2022
@softwarefactory-project-zuul

This comment has been minimized.

@ansibullbot ansibullbot added integration tests/integration tests tests labels Jan 30, 2022
tests/integration/targets/ec2_placement_group/aliases Outdated Show resolved Hide resolved
- pg_2_create is changed
- pg_2_create.placement_group.name == '{{ resource_prefix }}-pg2'
- pg_2_create.placement_group.state == "available"
- '"ec2:CreatePlacementGroup" in pg_2_create.resource_actions'
Copy link
Contributor

Choose a reason for hiding this comment

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

I n my opinion, you can remove all the statements similar to this - '"ec2:CreatePlacementGroup" in pg_2_create.resource_actions'

Copy link
Contributor Author

@mandar242 mandar242 Feb 3, 2022

Choose a reason for hiding this comment

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

@alinabuzachis I think it can be a decent additional check to make sure resource action took place. But if it could cause any unnecessary issues in future that I might be missing, I'd be fine with removing them as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, let's keep then.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (third-party-check pipeline).

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (third-party-check pipeline).

- pg_2_create is changed
- pg_2_create.placement_group.name == '{{ resource_prefix }}-pg2'
- pg_2_create.placement_group.state == "available"
- '"ec2:CreatePlacementGroup" in pg_2_create.resource_actions'
Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, let's keep then.

@alinabuzachis alinabuzachis added backport-3 PR should be backported to the stable-3 branch mergeit Merge the PR (SoftwareFactory) labels Feb 4, 2022
@softwarefactory-project-zuul
Copy link
Contributor

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 716ae77 into ansible-collections:main Feb 4, 2022
@patchback
Copy link

patchback bot commented Feb 4, 2022

Backport to stable-3: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-3/716ae77f71cfa7b6300a057892fea768c81819f9/pr-872

Backported as #928

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Feb 4, 2022
ec2_placement_group: Add partition strategy and partition count

SUMMARY

Add partition as a strategy and an option, partition_count to choose the actual number of partitions for the community.aws.ec2_placement_group module.

Fixes #808
ISSUE TYPE

Feature Pull Request

COMPONENT NAME

ec2_placement_group
ADDITIONAL INFO
Tested locally with
- name: Create a partition placement group with partition count 4.
    ec2_placement_group:
      name: my-cluster
      state: present
      strategy: partition
      partition_count: 4

Reviewed-by: Alina Buzachis <None>
Reviewed-by: Mandar Kulkarni <mandar242@gmail.com>
Reviewed-by: Mark Woolley <mw@marknet15.com>
(cherry picked from commit 716ae77)
@mandar242 mandar242 deleted the 808_ec2_placement_group_partition branch February 4, 2022 20:17
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Feb 7, 2022
#928)

[PR #872/716ae77f backport][stable-3] ec2_placement_group: Add partition strategy and partition count

This is a backport of PR #872 as merged into main (716ae77).
SUMMARY

Add partition as a strategy and an option, partition_count to choose the actual number of partitions for the community.aws.ec2_placement_group module.

Fixes #808
ISSUE TYPE


Feature Pull Request

COMPONENT NAME

ec2_placement_group
ADDITIONAL INFO
Tested locally with
- name: Create a partition placement group with partition count 4.
    ec2_placement_group:
      name: my-cluster
      state: present
      strategy: partition
      partition_count: 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-3 PR should be backported to the stable-3 branch community_review feature This issue/PR relates to a feature request integration tests/integration mergeit Merge the PR (SoftwareFactory) module module needs_triage plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add partition strategy to placement groups module
4 participants