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

Have nsupdate add expected quotation to TXT records #43386

Merged
merged 1 commit into from
Aug 23, 2018

Conversation

andreaso
Copy link
Contributor

SUMMARY

This prevents the accidental creation of TXT records where every
single word gets split into its own string, such as TXT record values
in the format of "foo" "bar" "baz". That being an implicit behavior
I have very hard to see anyone purposely relying on.

TXT record values can still explicitly be defined as one or more
strings, without any change in syntax.

Resolves #43380

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

nsupdate

ANSIBLE VERSION
ansible 2.7.0.dev0 (devel 551501f326) last updated 2018/07/28 14:49:34 (GMT +200)
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/andreas/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/andreas/labs/ansible/devel/lib/ansible
  executable location = /home/andreas/labs/ansible/devel/bin/ansible
  python version = 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0]

@ansibot
Copy link
Contributor

ansibot commented Jul 28, 2018

@ansibot ansibot added affects_2.7 This issue/PR affects Ansible v2.7 bug This issue/PR relates to a bug. community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. net_tools Net-tools category support:community This issue/PR relates to code supported by the Ansible community. labels Jul 28, 2018
@ansibot
Copy link
Contributor

ansibot commented Jul 28, 2018

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

lib/ansible/modules/net_tools/nsupdate.py:220:15: ansible-format-automatic-specification Format string contains automatic field numbering specification

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. and removed community_review In order to be merged, this PR must follow the community review workflow. labels Jul 28, 2018
This prevents the accidental creation of TXT records where every
single word gets split into its own string, such as TXT record values
in the format of `"foo" "bar" "baz"`. That being an implicit behavior
I have very hard to see anyone purposely relying on.

TXT record values can still explicitly be defined as one or more
strings, without any change in syntax.

Resolves ansible#43380
@andreaso andreaso force-pushed the nsupdate-helpful-txt-quoting branch from e598596 to 978f85b Compare July 28, 2018 13:22
@ansibot ansibot added community_review In order to be merged, this PR must follow the community 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 Jul 28, 2018
@@ -207,8 +207,18 @@ def __init__(self, module):
else:
self.algorithm = module.params['key_algorithm']

if self.module.params['type'].lower() == 'txt':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This issue also affects SPF records (even though they are deprecated).
Maybe there are other record types aswell that use text values?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is strictly a personal opinion, but I don't really feel inclined to add code to support a deprecated record type.

@ryansb ryansb removed the needs_triage Needs a first human triage before being processed. label Jul 31, 2018
@andreaso
Copy link
Contributor Author

andreaso commented Aug 5, 2018

@nerzhul: Thoughts?

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Aug 13, 2018
@andreaso
Copy link
Contributor Author

One week remaining until the Ansible 2.7 community modules freeze.

@nerzhul: Any opinion either way in regards to this PR?

@nerzhul
Copy link
Contributor

nerzhul commented Aug 23, 2018

shipit

@ansibot ansibot added shipit This PR is ready to be merged by Core automerge This PR was automatically merged by ansibot. and removed community_review In order to be merged, this PR must follow the community review workflow. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Aug 23, 2018
@ansibot ansibot merged commit 4e895c1 into ansible:devel Aug 23, 2018
@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.7 This issue/PR affects Ansible v2.7 automerge This PR was automatically merged by ansibot. bug This issue/PR relates to a bug. module This issue/PR relates to a module. net_tools Net-tools category shipit This PR is ready to be merged by Core support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nsupdate handling record values with spaces
5 participants