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

fix(ec2_vol): output volume informations when volume exists in check mode #2133

Merged

Conversation

theredcat
Copy link
Contributor

@theredcat theredcat commented Jun 11, 2024

SUMMARY

When using ec2_vol in check mode if the volume already exists and is attached, the module don't output the volume informations.

This is problematic when used with a "register" directive when writing idempotent playbooks

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ec2_vol

ADDITIONAL INFORMATION

Before :

    changed: false
    failed: false
    msg: 'IN CHECK MODE - volume already attached to instance: i-xxxxxxxxxxxxxxxxxxx.'

After :

     attachments:
    - attach_time: '2024-05-17T15:14:49+00:00'
      delete_on_termination: false
      device: /dev/sdf
      instance_id: i-xxxxxxxxxxxxxxxxxxx
      state: attached
      volume_id: vol-xxxxxxxxxxxxxx
    availability_zone: eu-west-1a
    changed: false
    create_time: '2024-05-17T15:14:33.776000+00:00'
    encrypted: false
    failed: false
    iops: 3000
    msg: 'IN CHECK MODE - volume already attached to instance: i-xxxxxxxxxxxxxxx.'
    multi_attach_enabled: false
    size: 30
    snapshot_id: ''
    state: in-use
    tags:
    - key: Name
      value: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    throughput: 125
    volume_id: vol-xxxxxxxxxxxxxx
    volume_type: gp3

@GomathiselviS
Copy link
Contributor

Hi @theredcat Thank you for working on this PR. Could you please rebase the branch and add a changelog to describe the changes made?

@tremble tremble added this to the 9.0.0 milestone Oct 25, 2024
@alinabuzachis alinabuzachis force-pushed the patch-1 branch 5 times, most recently from 8f1ca4d to 975541a Compare October 25, 2024 14:20
Copy link
Contributor

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

✔️ ansible-galaxy-importer SUCCESS in 5m 29s
✔️ build-ansible-collection SUCCESS in 10m 25s
✔️ ansible-test-splitter SUCCESS in 4m 02s
✔️ integration-amazon.aws-1 SUCCESS in 16m 15s
Skipped 43 jobs

@alinabuzachis alinabuzachis added the mergeit Merge the PR (SoftwareFactory) label Oct 25, 2024
Copy link
Contributor

Build failed (gate pipeline). For information on how to proceed, see
http://docs.openstack.org/infra/manual/developers.html#automated-testing

https://ansible.softwarefactory-project.io/zuul/buildset/fac760c4758f4985b7804d4fb2d79ff6

✔️ ansible-galaxy-importer SUCCESS in 4m 40s
✔️ build-ansible-collection SUCCESS in 10m 26s
✔️ ansible-test-splitter SUCCESS in 4m 01s
integration-amazon.aws-1 FAILURE in 19m 19s
Skipped 43 jobs

Copy link
Contributor

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

✔️ ansible-galaxy-importer SUCCESS in 5m 21s
✔️ build-ansible-collection SUCCESS in 17m 10s
✔️ ansible-test-splitter SUCCESS in 3m 52s
✔️ integration-amazon.aws-1 SUCCESS in 17m 02s
Skipped 43 jobs

Copy link
Contributor

Build failed (gate pipeline). For information on how to proceed, see
http://docs.openstack.org/infra/manual/developers.html#automated-testing

https://ansible.softwarefactory-project.io/zuul/buildset/72faf69add5d478fb2c7666a8254f029

✔️ ansible-galaxy-importer SUCCESS in 5m 52s
✔️ build-ansible-collection SUCCESS in 10m 09s
✔️ ansible-test-splitter SUCCESS in 4m 21s
integration-amazon.aws-1 FAILURE in 15m 25s
Skipped 43 jobs

@alinabuzachis
Copy link
Collaborator

regate

Copy link
Contributor

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

✔️ ansible-galaxy-importer SUCCESS in 3m 46s
✔️ build-ansible-collection SUCCESS in 10m 14s
✔️ ansible-test-splitter SUCCESS in 4m 00s
✔️ integration-amazon.aws-1 SUCCESS in 16m 54s
Skipped 43 jobs

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit fa31438 into ansible-collections:main Oct 25, 2024
36 checks passed
@abikouo abikouo added the backport-8 PR should be backported to the stable-8 branch label Jan 8, 2025
Copy link

patchback bot commented Jan 8, 2025

Backport to stable-8: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-8/fa31438dad0e6255dbe7c66170eddffc315903e2/pr-2133

Backported as #2437

🤖 @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 Jan 8, 2025
…mode (#2133)

SUMMARY
When using ec2_vol in check mode if the volume already exists and is attached, the module don't output the volume informations.
This is problematic when used with a "register" directive when writing idempotent playbooks
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
ec2_vol
ADDITIONAL INFORMATION
Before :
    changed: false
    failed: false
    msg: 'IN CHECK MODE - volume already attached to instance: i-xxxxxxxxxxxxxxxxxxx.'

After :
     attachments:
    - attach_time: '2024-05-17T15:14:49+00:00'
      delete_on_termination: false
      device: /dev/sdf
      instance_id: i-xxxxxxxxxxxxxxxxxxx
      state: attached
      volume_id: vol-xxxxxxxxxxxxxx
    availability_zone: eu-west-1a
    changed: false
    create_time: '2024-05-17T15:14:33.776000+00:00'
    encrypted: false
    failed: false
    iops: 3000
    msg: 'IN CHECK MODE - volume already attached to instance: i-xxxxxxxxxxxxxxx.'
    multi_attach_enabled: false
    size: 30
    snapshot_id: ''
    state: in-use
    tags:
    - key: Name
      value: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    throughput: 125
    volume_id: vol-xxxxxxxxxxxxxx
    volume_type: gp3

Reviewed-by: Alina Buzachis
(cherry picked from commit fa31438)
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Jan 8, 2025
…mode (#2133) (#2437)

This is a backport of PR #2133 as merged into main (fa31438).
SUMMARY
When using ec2_vol in check mode if the volume already exists and is attached, the module don't output the volume informations.
This is problematic when used with a "register" directive when writing idempotent playbooks
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
ec2_vol
ADDITIONAL INFORMATION
Before :
    changed: false
    failed: false
    msg: 'IN CHECK MODE - volume already attached to instance: i-xxxxxxxxxxxxxxxxxxx.'

After :
     attachments:
    - attach_time: '2024-05-17T15:14:49+00:00'
      delete_on_termination: false
      device: /dev/sdf
      instance_id: i-xxxxxxxxxxxxxxxxxxx
      state: attached
      volume_id: vol-xxxxxxxxxxxxxx
    availability_zone: eu-west-1a
    changed: false
    create_time: '2024-05-17T15:14:33.776000+00:00'
    encrypted: false
    failed: false
    iops: 3000
    msg: 'IN CHECK MODE - volume already attached to instance: i-xxxxxxxxxxxxxxx.'
    multi_attach_enabled: false
    size: 30
    snapshot_id: ''
    state: in-use
    tags:
    - key: Name
      value: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    throughput: 125
    volume_id: vol-xxxxxxxxxxxxxx
    volume_type: gp3

Reviewed-by: Helen Bailey <[email protected]>
Reviewed-by: Bikouo Aubin
Reviewed-by: GomathiselviS <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8 PR should be backported to the stable-8 branch mergeit Merge the PR (SoftwareFactory)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants