Bug 2222428 - Check mode fails when creating new firewall service [NEEDINFO]
Summary: Check mode fails when creating new firewall service
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: rhel-system-roles
Version: 9.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 9.3
Assignee: Rich Megginson
QA Contact: Jakub Haruda
URL:
Whiteboard: role:firewall
Depends On:
Blocks: 2222433
TreeView+ depends on / blocked
 
Reported: 2023-07-12 17:42 UTC by Rich Megginson
Modified: 2023-08-10 13:38 UTC (History)
4 users (show)

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
Clone Of:
: 2222433 (view as bug list)
Environment:
Last Closed:
Type: ---
Target Upstream Version:
Embargoed:
rmeggins: needinfo? (djez)
rmeggins: needinfo? (vdanek)


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github linux-system-roles firewall pull 153 0 None Merged fix: make enabling/disabling non-existent services not fail in check mode 2023-07-12 17:51:55 UTC
Red Hat Issue Tracker RHELPLAN-162177 0 None None None 2023-07-12 17:45:16 UTC

Description Rich Megginson 2023-07-12 17:42:53 UTC
When creating and enabling a service, using check mode will fail since the service does not exist - should issue a warning that the service does not exist - see https://github.com/linux-system-roles/firewall/issues/146


Note You need to log in before you can comment on or make changes to this bug.