saltstack / saltstack/salt

[IMPROVEMENT] reported state changes on new/added zone are confusing

Open
#66,682 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-triage
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description
The changes reported when a new zone is created/added are confusing because the new key is simply set to the new zone's name instead of the existing zones with the new zone's name added to it (see code reference below). This way one gets the impression that the new zone replaced the existing ones (as in zone-pruning).

Setup
Version: Salt: 3006.7

Relevant line of code: here

Steps to Reproduce the behavior
Create a new zone using firewalld.present with (say, two) other zones already existing.

Expected behavior

     Changes:
              new-zone:
                  ----------
                  new:
                      - existing-zone1
                      - existing-zone2
                      - new-zone
                  old:
                      - existing-zone1
                      - existing-zone2

Actual behavior

     Changes:
              new-zone:
                  ----------
                  new:
                      - new-zone
                  old:
                      - existing-zone1
                      - existing-zone2

Thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at salt/states/firewalld.py around line 419 and reproduce the behavior with firewalld.present while two existing zones are present. Compare the reported new and old zone lists with the expected output; done means the new list includes the existing zones plus the newly added zone.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devops, infrastructure
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.