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 #2133/fa31438d backport][stable-8] fix(ec2_vol): output volume informations when volume exists in check mode #2437

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Jan 8, 2025

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

…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)
Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/72f5896fdea6474eb1d3cc445d43e3d1

⚠️ ansible-galaxy-importer SKIPPED Skipped due to failed job build-ansible-collection
build-ansible-collection NODE_FAILURE Node request 200-0007721936 failed in 0s
ansible-test-splitter NODE_FAILURE Node request 200-0007721937 failed in 0s
⚠️ integration-amazon.aws-1 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-amazon.aws-2 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-amazon.aws-3 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-amazon.aws-4 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-amazon.aws-5 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-amazon.aws-6 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-amazon.aws-7 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-amazon.aws-8 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-amazon.aws-9 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-amazon.aws-10 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-amazon.aws-11 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-amazon.aws-12 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-amazon.aws-13 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-amazon.aws-14 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-amazon.aws-15 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-amazon.aws-16 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-amazon.aws-17 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-amazon.aws-18 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-amazon.aws-19 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-amazon.aws-20 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-amazon.aws-21 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-amazon.aws-22 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-1 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-2 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-3 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-4 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-5 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-6 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-7 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-8 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-9 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-10 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-11 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-12 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-13 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-14 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-15 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-16 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-17 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-18 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-19 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-20 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-21 SKIPPED Skipped due to failed job ansible-test-splitter
⚠️ integration-community.aws-22 SKIPPED Skipped due to failed job ansible-test-splitter

@hakbailey
Copy link
Contributor

recheck

Copy link
Contributor

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

✔️ ansible-galaxy-importer SUCCESS in 3m 57s
✔️ build-ansible-collection SUCCESS in 11m 09s
✔️ ansible-test-splitter SUCCESS in 4m 28s
✔️ integration-amazon.aws-1 SUCCESS in 14m 12s
Skipped 43 jobs

@hakbailey hakbailey added the mergeit Merge the PR (SoftwareFactory) label Jan 8, 2025
Copy link
Contributor

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

✔️ ansible-galaxy-importer SUCCESS in 4m 34s
✔️ build-ansible-collection SUCCESS in 11m 34s
✔️ ansible-test-splitter SUCCESS in 4m 20s
✔️ integration-amazon.aws-1 SUCCESS in 13m 02s
Skipped 43 jobs

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 81bc32e into stable-8 Jan 8, 2025
45 checks passed
@softwarefactory-project-zuul softwarefactory-project-zuul bot deleted the patchback/backports/stable-8/fa31438dad0e6255dbe7c66170eddffc315903e2/pr-2133 branch January 8, 2025 20:21
Copy link

github-actions bot commented Jan 8, 2025

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

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.

4 participants