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

firewalld - announce breaking changes #249

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Akasurde
Copy link
Member

SUMMARY
  • masquerade and icmp_block_inversion will be changed from str to bool

Signed-off-by: Abhijeet Kasurde [email protected]

ISSUE TYPE
  • Docs Pull Request
COMPONENT NAME

changelogs/fragments/firewalld_breaking_change.yml

* ``masquerade`` and ``icmp_block_inversion`` will be changed from ``str`` to ``bool``

Signed-off-by: Abhijeet Kasurde <[email protected]>
@Akasurde
Copy link
Member Author

@vrindle @justjais Could you please review this? Thanks in advance.

@Andersson007
Copy link
Contributor

I think the sanity failures relate to ansible-collections/overview#45 (comment)

ERROR: Found 4 pylint issue(s) which need to be resolved:
ERROR: plugins/modules/synchronize.py:365:25: disallowed-name: Disallowed name "_"
ERROR: plugins/modules/synchronize.py:369:29: disallowed-name: Disallowed name "_"
ERROR: tests/sanity/ignore-2.12.txt:1:1: ansible-test: Ignoring 'blacklisted-name' on 'plugins/modules/synchronize.py' is unnecessary
ERROR: tests/unit/mock/loader.py:49:4: arguments-renamed: Parameter 'file_name' has been renamed to 'path' in overridden 'DictDataLoader._get_file_contents' method

Copy link
Contributor

@Andersson007 Andersson007 left a comment

Choose a reason for hiding this comment

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

Can we put a warning in the code when, say, the string doesn't look like a boolean, print the warning? The collection is supported and many users don't read changelogs.

@Akasurde
Copy link
Member Author

Can we put a warning in the code when, say, the string doesn't look like a boolean, print the warning? The collection is supported and many users don't read changelogs.

OK.

@Akasurde
Copy link
Member Author

Sanity fixes via #250

Copy link
Collaborator

@saito-hideki saito-hideki left a comment

Choose a reason for hiding this comment

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

Can we put a warning in the code when, say, the string doesn't look like a boolean, print the warning? The collection is supported and many users don't read changelogs.

OK.

@Akasurde @Andersson007 May I try to fix this? if you guys are not working on it yet :)

@Akasurde
Copy link
Member Author

@saito-hideki Yes sure.

@vrindle
Copy link

vrindle commented Aug 16, 2021

@Akasurde @saito-hideki I think we are going to be replacing the Ansible Posix Firewalld module with the current module in the Firewalld system role in the new release. This is because the system role already has icmp-block-inversion and masquerade as booleans instead of strings. It also has the ability to do multiple transactions. So making this change in the code base isn't paramount because eventually those who want the breaking changes will be switching over to the new release which uses the Firewalld system role module and people who want to keep the functionality as is can use the current version of Ansible Posix Firewalld. If we want it so that minimal damage happens, we keep the code base as is and just put all the changes into the new release (which will use the Firewalld system role). However if you are fine with breaking changes, you can make the change in the existing code base as it will ease the transition into the new release easier.

@richm
Copy link
Contributor

richm commented Aug 16, 2021

I guess it depends on how many users are using the masquerade and icmp_block_inversion parameters with a value other than "yes" or "true" (or any boolean YAML value). If that number is very, very small, then this change is pretty safe. And this change will help make the transition to the new firewalld module easier.

@vrindle
Copy link

vrindle commented Aug 16, 2021

I guess it depends on how many users are using the masquerade and icmp_block_inversion parameters with a value other than "yes" or "true" (or any boolean YAML value). If that number is very, very small, then this change is pretty safe. And this change will help make the transition to the new firewalld module easier.

Yes this is accurate, however there isn't any way to gauge how many customers are using other values so maybe it might be a better idea to keep it as is. We could ask customers or check source code on github to double check if workflows don't break as a result of these changes.

@saito-hideki
Copy link
Collaborator

Hi @Akasurde @vrindle @richm At this time, what about keeping the "str" type and just showing a warning message that it will change to a Boolean value in a future release of firewalld module if masquerade or icmp_block_inversion is specified like @Andersson007 pointed out.

@vrindle
Copy link

vrindle commented Aug 17, 2021

@saito-hideki That would be a good idea. I am fine with that.

@ansible-zuul ansible-zuul bot closed this in #254 Sep 6, 2021
ansible-zuul bot added a commit that referenced this pull request Sep 6, 2021
Display warning message for masquerade and icmp-block-inversion

SUMMARY
Display warning message if the wrong parameter set to masquerade or icmp-block-inversion

Fixes #249

It is a part of #249. Currently, the variable type of the above two parameters is str, but will be changed to bool in the future. As a starting point, this fix displays a warning message if a non-boolean value is specified.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

ansible.posix.firewalld

ADDITIONAL INFORMATION
None

Reviewed-by: Andrew Klychkov <[email protected]>
Reviewed-by: Hideki Saito <[email protected]>
Reviewed-by: Abhijeet Kasurde <None>
Reviewed-by: None <None>
@Andersson007 Andersson007 reopened this Sep 6, 2021
@Andersson007
Copy link
Contributor

The bot closed it (as there was "Fixes .." statement in the warning PR). Reopened.

@Andersson007
Copy link
Contributor

@Akasurde @saito-hideki as we discussed today in the Warning PR, we can merge this PR too

Copy link
Contributor

@Andersson007 Andersson007 left a comment

Choose a reason for hiding this comment

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

LGTM

@maxamillion
Copy link
Collaborator

@Andersson007 revisiting, does this still need to be merged?

@maxamillion
Copy link
Collaborator

cc @Akasurde

@maxamillion maxamillion added the waiting_on_contributor Needs help. Feel free to engage to get things unblocked label Dec 7, 2023
@Andersson007
Copy link
Contributor

@maxamillion i don't know, I hasn't been a maintainer of this repo:) Thanks for bringing attention to this PR!
@saito-hideki would you like to merge this?

@maxamillion
Copy link
Collaborator

Closing and reopening to kick CI.

@maxamillion maxamillion closed this Jan 9, 2024
@maxamillion maxamillion reopened this Jan 9, 2024
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting_on_contributor Needs help. Feel free to engage to get things unblocked
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants