Bug 2222428
| Summary: | Check mode fails when creating new firewall service | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Rich Megginson <rmeggins> | |
| Component: | rhel-system-roles | Assignee: | Rich Megginson <rmeggins> | |
| Status: | VERIFIED --- | QA Contact: | Jakub Haruda <jharuda> | |
| Severity: | unspecified | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 9.3 | CC: | djez, jharuda, spetrosi, vdanek | |
| Target Milestone: | rc | Keywords: | Triaged | |
| Target Release: | 9.3 | Flags: | rmeggins:
needinfo?
(djez) rmeggins: needinfo? (vdanek) |
|
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | role:firewall | |||
| Fixed In Version: | rhel-system-roles-1.22.0-0.16.el9 | Doc Type: | Bug Fix | |
| Doc Text: |
Enhancement:
- firewall_lib.py - check if service exists before running firewalld methods that would cause failure
- fails if service does not exist and in diff mode, warns if in check mode and service does not exist
- README.md - reflects changes and explains interaction with check mode
- tests/tests_service.yml - add integration test case for adding non-existent services in check mode
- tests/unit/test_firewall_lib.py - Mock necessary output from fw.config().getServiceNames()
Reason:
Better compliance with Ansible best practices for check mode (not failing in check mode, especially where they would not fail in diff mode)
Reason for this particular solution - We cannot track changes from previous check modes without overhauling how check mode is handled throughout the entire system role.
Result:
Undefined services being enabled or disabled will not result in failure while in check mode, but a warning will be displayed intended to prompt the user to confirm that the service is defined in a previous play, since the same action could result in failure when run in diff mode.
Issue Tracker Tickets (Jira or BZ if any):
- Addresses GitHub Issue #146
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 2222433 (view as bug list) | Environment: | ||
| Last Closed: | Type: | --- | ||
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 2222433 | |||
|
Description
Rich Megginson
2023-07-12 17:42:53 UTC
|