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

rds_instance error with PerformanceInsightsEnabled #50081

Closed
vrcs opened this issue Dec 18, 2018 · 7 comments
Closed

rds_instance error with PerformanceInsightsEnabled #50081

vrcs opened this issue Dec 18, 2018 · 7 comments
Labels
affects_2.7 This issue/PR affects Ansible v2.7 aws bug This issue/PR relates to a bug. cloud module This issue/PR relates to a module. performance support:community This issue/PR relates to code supported by the Ansible community. traceback This issue/PR includes a traceback.

Comments

@vrcs
Copy link

vrcs commented Dec 18, 2018

SUMMARY

<Already launched old aws RDS instances doesn't return the performance_insights_enabled in rds_instance_facts and when trying to convert the play book to use rds_instance it throws an error. >

ISSUE TYPE
  • Bug Report
COMPONENT NAME

rds_instance, rds_instance_facts

ANSIBLE VERSION
ansible 2.7.5
  config file = /home/test_user/ansible-branches/rds_ansible_convert/ansible.cfg
  configured module search path = [u'/home/test_user/ansible-branches/rds_ansible_convert/library']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /bin/ansible
  python version = 2.7.5 (default, Jul 13 2018, 13:06:57) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]

CONFIGURATION

OS / ENVIRONMENT

CentOS Linux release 7.5.1804 (Core)

STEPS TO REPRODUCE


  - name: Create stage rds instance
    tags:
      - db_create
    rds_instance:
      allocated_storage: "{{ item.value.rds_instance_size }}"
      allow_major_version_upgrade: No
      apply_immediately: No
      auto_minor_version_upgrade: Yes
      backup_retention_period: "{{ item.value.rds_instance_backup_retention }}"
      copy_tags_to_snapshot: Yes
      db_instance_class: "{{ item.value.rds_instance_class }}"
      db_instance_identifier: "{{ item.value.rds_instance_name }}"
      db_name: "{{ item.value.schema  | default(omit) }}"
      db_parameter_group_name:  "{{ item.value.parameter_group }}"
      db_subnet_group_name: "{{ item.value.subnet_group }}"
      #enable_cloudwatch_logs_exports: "{{ item.value.cloudwatch_logs_exports }}"
      engine: "mysql"
      engine_version: '{{ item.value.rds_engine_version }}'
      master_user_password: "{{ db_root_pw }}"
      master_username: "{{ db_root_user }}"
      license_model: "general-public-license"
      option_group_name: "default:mysql-5-6"
      port: "{{ item.value.db_port }}"
      preferred_backup_window: "{{ item.value.rds_preferred_backup_window }}"
      preferred_maintenance_window: "{{ item.value.rds_preferred_maintenance_window }}"
      publicly_accessible: No
      region: "{{ item.value.rds_instance_az }}"
      state: present
      storage_type: "{{ item.value.rds_instance_storage }}"
      enable_performance_insights: false 
      tags:
        env: mysql_test
        Service: mysql_rds
      vpc_security_group_ids: "{{ var_ec2_group_facts.security_groups[0].group_id }}"
      wait: Yes
    register: result
    with_dict: "{{ databases }}"

  - name: Get RDS facts
    tags: db_facts
    become: no
    delegate_to: localhost
    rds_instance_facts:
     db_instance_identifier: "{{ item.value.rds_instance_name }}"
     region: "{{ vpc_region }}"
    register: rds_facts
    with_dict: "{{ databases }}"

  - name: List RDS facts
    tags: db_facts
    debug:
      var: rds_facts
    with_dict: "{{ databases }}"

EXPECTED RESULTS
ACTUAL RESULTS
The full traceback is:
Traceback (most recent call last):
  File "<stdin>", line 113, in <module>
  File "<stdin>", line 105, in _ansiballz_main
  File "<stdin>", line 48, in invoke_module
  File "/tmp/ansible_rds_instance_payload_krhBqh/__main__.py", line 1157, in <module>
  File "/tmp/ansible_rds_instance_payload_krhBqh/__main__.py", line 1122, in main
  File "/tmp/ansible_rds_instance_payload_krhBqh/__main__.py", line 780, in get_parameters
  File "/tmp/ansible_rds_instance_payload_krhBqh/__main__.py", line 803, in get_options_with_changing_values
  File "/tmp/ansible_rds_instance_payload_krhBqh/__main__.py", line 854, in get_changing_options_with_inconsistent_keys
  File "/tmp/ansible_rds_instance_payload_krhBqh/__main__.py", line 845, in get_current_attributes_with_inconsistent_keys
KeyError: 'PerformanceInsightsEnabled'

  "module_stderr": "Traceback (most recent call last):\n  File \"<stdin>\", line 113, in <module>\n  File \"<stdin>\", line 105, in _ansiballz_main\n  File \"<stdin>\", line 48, in invoke_module\n  File \"/tmp/ansible_rds_instance_payload_krhBqh/__main__.py\", line 1157, in <module>\n  File \"/tmp/ansible_rds_instance_payload_krhBqh/__main__.py\", line 1122, in main\n  File \"/tmp/ansible_rds_instance_payload_krhBqh/__main__.py\", line 780, in get_parameters\n  File \"/tmp/ansible_rds_instance_payload_krhBqh/__main__.py\", line 803, in get_options_with_changing_values\n  File \"/tmp/ansible_rds_instance_payload_krhBqh/__main__.py\", line 854, in get_changing_options_with_inconsistent_keys\n  File \"/tmp/ansible_rds_instance_payload_krhBqh/__main__.py\", line 845, in get_current_attributes_with_inconsistent_keys\nKeyError: 'PerformanceInsightsEnabled'\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}

@ansibot
Copy link
Contributor

ansibot commented Dec 18, 2018

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Dec 18, 2018

@ansibot
Copy link
Contributor

ansibot commented Dec 18, 2018

@vrcs, 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.7 This issue/PR affects Ansible v2.7 aws bug This issue/PR relates to a bug. cloud module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. performance support:community This issue/PR relates to code supported by the Ansible community. traceback This issue/PR includes a traceback. labels Dec 18, 2018
@ansibot
Copy link
Contributor

ansibot commented Dec 19, 2018

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Dec 19, 2018

@ansibot
Copy link
Contributor

ansibot commented Jun 13, 2019

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@s-hertel
Copy link
Contributor

This has been fixed in 8c631cb

@s-hertel s-hertel removed the needs_triage Needs a first human triage before being processed. label Jun 13, 2019
@ansible ansible locked and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.7 This issue/PR affects Ansible v2.7 aws bug This issue/PR relates to a bug. cloud module This issue/PR relates to a module. performance support:community This issue/PR relates to code supported by the Ansible community. traceback This issue/PR includes a traceback.
Projects
None yet
Development

No branches or pull requests

3 participants