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_instance: ebs_optimized is not sub-option of 'network' #48341

Merged
merged 5 commits into from
Nov 9, 2018

Conversation

Shaps
Copy link
Contributor

@Shaps Shaps commented Nov 8, 2018

SUMMARY

Updated ec2_instance to look for ebs_optimized as top level option instead of sub-option of network.
Fixes #48159

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ec2_instance.py

ANSIBLE VERSION
ansible 2.8.0.dev0 (ec2_instance_ebs_optimized_fix 4f4595fc4b) last updated 2018/11/08 11:05:55 (GMT +100)
  config file = /home/shaps/.ansible.cfg
  configured module search path = [u'/home/shaps/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/shaps/Documents/code/ansible/lib/ansible
  executable location = /home/shaps/Documents/code/ansible/bin/ansible
  python version = 2.7.15 (default, Oct 15 2018, 15:26:09) [GCC 8.2.1 20180801 (Red Hat 8.2.1-2)]

ADDITIONAL INFORMATION

N/A

@Shaps Shaps changed the title ebs_optimized is not sub-option of 'network' ec2_instance: ebs_optimized is not sub-option of 'network' Nov 8, 2018
@ansibot
Copy link
Contributor

ansibot commented Nov 8, 2018

Hi @Shaps, thank you for submitting this pull-request!

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Nov 8, 2018

@Shaps, just so you are aware we have a dedicated Working Group for aws.
You can find other people interested in this in #ansible-aws on Freenode IRC
For more information about communities, meetings and agendas see https://github.com/ansible/community

click here for bot help

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 aws bug This issue/PR relates to a bug. cloud community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module. needs_maintainer Ansibot is unable to identify maintainers for this PR. (Check `author` in docs or BOTMETA.yml) needs_triage Needs a first human triage before being processed. small_patch support:community This issue/PR relates to code supported by the Ansible community. labels Nov 8, 2018
@dennisconrad
Copy link
Contributor

dennisconrad commented Nov 8, 2018

@Shaps Thanks for the PR! May I suggest keeping compatibility with the workaround described in #48159 like this?

    if params.get('ebs_optimized') is not None:
        spec['EbsOptimized'] = params.get('ebs_optimized')
    elif (params.get('network') or {}).get('ebs_optimized') is not None:
        # Keep this for compatibility with workaround described in https://github.com/ansible/ansible/issues/48159
        spec['EbsOptimized'] = params['network'].get('ebs_optimized')

@samdoran samdoran removed the needs_triage Needs a first human triage before being processed. label Nov 8, 2018
@Shaps
Copy link
Contributor Author

Shaps commented Nov 9, 2018

@dennisconrad Yep, good idea. Added the backward compatible check.

@ansibot
Copy link
Contributor

ansibot commented Nov 9, 2018

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/modules/cloud/amazon/ec2_instance.py:1604:12: ansible-deprecated-no-version Display.deprecated call without a version

The test ansible-test sanity --test pep8 [explain] failed with 2 errors:

lib/ansible/modules/cloud/amazon/ec2_instance.py:1605:28: E128 continuation line under-indented for visual indent
lib/ansible/modules/cloud/amazon/ec2_instance.py:1655:11: E111 indentation is not a multiple of four

The test ansible-test sanity --test yamllint [explain] failed with 1 error:

test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/ebs_optimized.yml:40:1: empty-lines too many blank lines (4 > 0)

click here for bot help

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. support:core This issue/PR relates to code supported by the Ansible Engineering Team. and removed community_review In order to be merged, this PR must follow the community review workflow. small_patch labels Nov 9, 2018
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Nov 9, 2018
@gundalow gundalow merged commit b7d9feb into ansible:devel Nov 9, 2018
Shaps added a commit to Shaps/ansible that referenced this pull request Nov 10, 2018
…8341)

* ebs_optimized is not suboption of 'network'

* Add Shaps as ec2_instance maintainer

* Added workaround-backward compatible check for ebs_optimized

* Added ebs_optimized test

* CI fixes, dynamic select of ENA-enabled AMI

(cherry picked from commit b7d9feb)
Shaps added a commit to Shaps/ansible that referenced this pull request Nov 10, 2018
Ghilli3 pushed a commit to Ghilli3/ansible that referenced this pull request Nov 12, 2018
…8341)

* ebs_optimized is not suboption of 'network'

* Add Shaps as ec2_instance maintainer

* Added workaround-backward compatible check for ebs_optimized

* Added ebs_optimized test

* CI fixes, dynamic select of ENA-enabled AMI
abadger pushed a commit that referenced this pull request Nov 13, 2018
)

* ec2_instance: ebs_optimized is not sub-option of 'network' (#48341)

* ebs_optimized is not suboption of 'network'

* Add Shaps as ec2_instance maintainer

* Added workaround-backward compatible check for ebs_optimized

* Added ebs_optimized test

* CI fixes, dynamic select of ENA-enabled AMI

(cherry picked from commit b7d9feb)

* Added changlog fragment for PR #48341

* fixed yaml errors in changelog
mjmayer pushed a commit to mjmayer/ansible that referenced this pull request Nov 30, 2018
…8341)

* ebs_optimized is not suboption of 'network'

* Add Shaps as ec2_instance maintainer

* Added workaround-backward compatible check for ebs_optimized

* Added ebs_optimized test

* CI fixes, dynamic select of ENA-enabled AMI
Tomorrow9 pushed a commit to Tomorrow9/ansible that referenced this pull request Dec 4, 2018
…8341)

* ebs_optimized is not suboption of 'network'

* Add Shaps as ec2_instance maintainer

* Added workaround-backward compatible check for ebs_optimized

* Added ebs_optimized test

* CI fixes, dynamic select of ENA-enabled AMI
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 aws bug This issue/PR relates to a bug. cloud core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. needs_maintainer Ansibot is unable to identify maintainers for this PR. (Check `author` in docs or BOTMETA.yml) support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AWS ec2_instance Module Doesn't Parse ebs_optimized Flag Correctly
5 participants