-
Notifications
You must be signed in to change notification settings - Fork 398
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
KeyError 'Options' from opensearch module_utils #1907
Comments
Files identified in the description:
If these files are inaccurate, please update the |
ansibullbot
added
bug
This issue/PR relates to a bug
module
module
needs_triage
plugins
plugin (any type)
python3
traceback
labels
Aug 4, 2023
Same result for all examples (https://docs.ansible.com/ansible/latest//collections/community/aws/opensearch_info_module.html#examples)
|
ref #1910 |
softwarefactory-project-zuul bot
pushed a commit
that referenced
this issue
Aug 31, 2023
opensearch: avoid a KeyError during the DomainConfig reading This commit avoids a KeyError exception in get_domain_config(). Some entries from DomainConfig don't have any Options key. For instance, ChangeProgressDetails. See: https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_DomainConfig.html https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_ChangeProgressDetails.html Closes: #1907 Reviewed-by: Markus Bergholz <[email protected]> Reviewed-by: Alina Buzachis
patchback bot
pushed a commit
that referenced
this issue
Aug 31, 2023
opensearch: avoid a KeyError during the DomainConfig reading This commit avoids a KeyError exception in get_domain_config(). Some entries from DomainConfig don't have any Options key. For instance, ChangeProgressDetails. See: https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_DomainConfig.html https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_ChangeProgressDetails.html Closes: #1907 Reviewed-by: Markus Bergholz <[email protected]> Reviewed-by: Alina Buzachis (cherry picked from commit 9a9c8c5)
patchback bot
pushed a commit
that referenced
this issue
Aug 31, 2023
opensearch: avoid a KeyError during the DomainConfig reading This commit avoids a KeyError exception in get_domain_config(). Some entries from DomainConfig don't have any Options key. For instance, ChangeProgressDetails. See: https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_DomainConfig.html https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_ChangeProgressDetails.html Closes: #1907 Reviewed-by: Markus Bergholz <[email protected]> Reviewed-by: Alina Buzachis (cherry picked from commit 9a9c8c5)
softwarefactory-project-zuul bot
pushed a commit
that referenced
this issue
Sep 1, 2023
…1923) [PR #1910/9a9c8c58 backport][stable-6] opensearch: avoid a KeyError during the DomainConfig reading This is a backport of PR #1910 as merged into main (9a9c8c5). This commit avoids a KeyError exception in get_domain_config(). Some entries from DomainConfig don't have any Options key. For instance, ChangeProgressDetails. See: https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_DomainConfig.html https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_ChangeProgressDetails.html Closes: #1907 Reviewed-by: Alina Buzachis
softwarefactory-project-zuul bot
pushed a commit
that referenced
this issue
Sep 1, 2023
…1922) [PR #1910/9a9c8c58 backport][stable-5] opensearch: avoid a KeyError during the DomainConfig reading This is a backport of PR #1910 as merged into main (9a9c8c5). This commit avoids a KeyError exception in get_domain_config(). Some entries from DomainConfig don't have any Options key. For instance, ChangeProgressDetails. See: https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_DomainConfig.html https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_ChangeProgressDetails.html Closes: #1907 Reviewed-by: Alina Buzachis
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
The opensearch module_utils has a function called
get_domain_config
, which performs the AWS API callDescribeDomainConfig
docs here. The function assumes that every property of the response has anOptions
key, but theChangeProgressDetails
section does not. Because of this, using theopensearch_info
modules results in a KeyError.Buggy code is here
Issue Type
Bug Report
Component Name
opensearch_info
get_domain_config in opensearch module_utils
Ansible Version
Not relevent
Collection Versions
4.5.0+
AWS SDK versions
Configuration
n/a
OS / Environment
n/a
Steps to Reproduce
Expected Results
Fetches the domain info
Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: