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

[PR #1659/26d7243 backport][stable-8] Fix ec2_instance 'state' processing when exact_count is used #2276

Conversation

tremble
Copy link
Contributor

@tremble tremble commented Aug 31, 2024

This is a MANUAL backport of PR #1659 as merged into main (26d7243).

SUMMARY

Fixes (ie adds) 'state' processing for ec2_instance when 'exact_count' is used rather than 'instance_ids'

Note this only has effect when the exact_count is the same as the number of already existing, matching instances.
In other words, it (still) has no effect when instances are either added or terminated as a result of exact_count. This is probably OK, as those other cases already have set target states (ie running or terminated respectively).
But for the cases of managing the state of an existing group of instances, this adds that ability.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ec2_instance

ADDITIONAL INFORMATION

Currently, given an ec2_instance call where exact_count == existing instance count, any specification of 'state' has no effect.

…-collections#1659)

SUMMARY
Fixes (ie adds) 'state' processing for ec2_instance when 'exact_count' is used rather than 'instance_ids'
Note this only has effect when the exact_count is the same as the number of already existing, matching instances.
In other words, it (still) has no effect when instances are either added or terminated as a result of exact_count. This is probably OK, as those other cases already have set target states (ie running or terminated respectively).
But for the cases of managing the state of an existing group of instances, this adds that ability.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
ec2_instance
ADDITIONAL INFORMATION
Currently, given an ec2_instance call where exact_count == existing instance count, any specification of 'state' has no effect.

Reviewed-by: Mark Chappell
Reviewed-by: Alina Buzachis
@tremble tremble added this to the 8.2.0 milestone Aug 31, 2024
Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/2bd38ae5ecf649fca15d5b21d638eb8e

✔️ ansible-galaxy-importer SUCCESS in 5m 11s
✔️ build-ansible-collection SUCCESS in 10m 30s
✔️ ansible-test-splitter SUCCESS in 4m 18s
✔️ integration-amazon.aws-1 SUCCESS in 36m 59s
✔️ integration-amazon.aws-2 SUCCESS in 17m 34s
✔️ integration-amazon.aws-3 SUCCESS in 12m 35s
✔️ integration-amazon.aws-4 SUCCESS in 12m 13s
✔️ integration-amazon.aws-5 SUCCESS in 8m 03s
✔️ integration-amazon.aws-6 SUCCESS in 8m 15s
✔️ integration-amazon.aws-7 SUCCESS in 7m 08s
✔️ integration-amazon.aws-8 SUCCESS in 11m 52s
✔️ integration-amazon.aws-9 SUCCESS in 13m 17s
✔️ integration-amazon.aws-10 SUCCESS in 14m 07s
✔️ integration-amazon.aws-11 SUCCESS in 10m 24s
✔️ integration-amazon.aws-12 SUCCESS in 11m 26s
✔️ integration-amazon.aws-13 SUCCESS in 12m 31s
✔️ integration-amazon.aws-14 SUCCESS in 10m 28s
✔️ integration-amazon.aws-15 SUCCESS in 6m 44s
✔️ integration-amazon.aws-16 SUCCESS in 12m 35s
✔️ integration-amazon.aws-17 SUCCESS in 10m 51s
✔️ integration-amazon.aws-18 SUCCESS in 6m 36s
✔️ integration-amazon.aws-19 SUCCESS in 10m 37s
✔️ integration-amazon.aws-20 SUCCESS in 11m 28s
Skipped 24 jobs

@tremble tremble added the mergeit Merge the PR (SoftwareFactory) label Sep 2, 2024
Copy link
Contributor

Build succeeded (gate pipeline).
https://ansible.softwarefactory-project.io/zuul/buildset/8c7201e5c560458b96f4568fef27e705

✔️ ansible-galaxy-importer SUCCESS in 5m 11s
✔️ build-ansible-collection SUCCESS in 10m 39s
✔️ ansible-test-splitter SUCCESS in 4m 21s
✔️ integration-amazon.aws-1 SUCCESS in 31m 15s
✔️ integration-amazon.aws-2 SUCCESS in 8m 53s
✔️ integration-amazon.aws-3 SUCCESS in 13m 10s
✔️ integration-amazon.aws-4 SUCCESS in 11m 50s
✔️ integration-amazon.aws-5 SUCCESS in 8m 12s
✔️ integration-amazon.aws-6 SUCCESS in 6m 29s
✔️ integration-amazon.aws-7 SUCCESS in 9m 16s
✔️ integration-amazon.aws-8 SUCCESS in 9m 00s
✔️ integration-amazon.aws-9 SUCCESS in 11m 18s
✔️ integration-amazon.aws-10 SUCCESS in 8m 29s
✔️ integration-amazon.aws-11 SUCCESS in 10m 38s
✔️ integration-amazon.aws-12 SUCCESS in 10m 46s
✔️ integration-amazon.aws-13 SUCCESS in 8m 53s
✔️ integration-amazon.aws-14 SUCCESS in 11m 08s
✔️ integration-amazon.aws-15 SUCCESS in 6m 11s
✔️ integration-amazon.aws-16 SUCCESS in 12m 30s
✔️ integration-amazon.aws-17 SUCCESS in 6m 15s
✔️ integration-amazon.aws-18 SUCCESS in 7m 17s
✔️ integration-amazon.aws-19 SUCCESS in 7m 07s
✔️ integration-amazon.aws-20 SUCCESS in 10m 40s
Skipped 24 jobs

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 82db224 into ansible-collections:stable-8 Sep 2, 2024
35 of 37 checks passed
@tremble tremble deleted the backport/stable-8/1659 branch September 2, 2024 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mergeit Merge the PR (SoftwareFactory)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants