Skip to content

test/base-host-check.sh: fix disabled firewall services check - #1471

Merged
achilleas-k merged 1 commit into
osbuild:mainfrom
croissanne:images-test-fix
Apr 28, 2025
Merged

achilleas-k merged 1 commit into
osbuild:mainfrom
croissanne:images-test-fix

Conversation

@croissanne

@croissanne croissanne commented Apr 28, 2025 •

Copy link
Copy Markdown
Member

firewall-cmd returns 1 if the service is disabled, use the same
pattern as in check_services_disabled to ignore the status code.

achilleas-k
achilleas-k previously approved these changes Apr 28, 2025

@achilleas-k achilleas-k left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the quick fix.

@achilleas-k

achilleas-k commented Apr 28, 2025 •

Copy link
Copy Markdown
Member

Maybe we should check if the exit code is actually exactly 1 instead of just non-zero.
The manpage says

       [--permanent] [--zone=zone] [--permanent] [--policy=policy] --query-service=service
           Return whether service has been added. Returns 0 if true, 1 otherwise.

but there are a bunch of other exit codes (2 - 254) that report other types of failures that we would probably want to catch (and fail).

thozza
thozza previously approved these changes Apr 28, 2025

@thozza thozza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@croissanne

Copy link
Copy Markdown
Member Author

Maybe we should check if the exit code is actually exactly 1 instead of just non-zero. The manpage says

       [--permanent] [--zone=zone] [--permanent] [--policy=policy] --query-service=service
           Return whether service has been added. Returns 0 if true, 1 otherwise.

but there are a bunch of other exit codes (2 - 254) that report other types of failures that we would probably want to catch (and fail).

good point

@croissanne
croissanne dismissed stale reviews from thozza and achilleas-k via 8daa18e April 28, 2025 11:01
`firewall-cmd` returns 1 if the service is disabled, use the same
pattern as in `check_services_disabled` to ignore the status code.
@achilleas-k
achilleas-k added this pull request to the merge queue Apr 28, 2025
Merged via the queue into osbuild:main with commit 1b511b9 Apr 28, 2025
achilleas-k added a commit to achilleas-k/osbuild-composer that referenced this pull request Apr 29, 2025
tag v0.140.0
Tagger: imagebuilder-bot <[email protected]>

Changes with 0.140.0

----------------
  * Loader part override followups (osbuild/image-builder#1466)
    * Author: Michael Vogt, Reviewers: Tomáš Hozza
  * RHEL-10/gce: install cloud-utils-growpart by default (osbuild/image-builder#1463)
    * Author: Tomáš Hozza, Reviewers: Michael Vogt, Simon de Vlieger
  * base-host-check: expand to cover more (COMPOSER-2498) (osbuild/image-builder#1432)
    * Author: Simon de Vlieger, Reviewers: Tomáš Hozza
  * rhel8,9: move partitioning into YAML (osbuild/image-builder#1390)
    * Author: Michael Vogt, Reviewers: Tomáš Hozza

— Somewhere on the Internet, 2025-04-28

---

tag v0.141.0
Tagger: imagebuilder-bot <[email protected]>

Changes with 0.141.0

----------------
  * Shrink the current installer images a bit (osbuild/image-builder#1423)
    * Author: Brian C. Lane, Reviewers: Achilleas Koutsou, Simon de Vlieger, Tomáš Hozza
  * Update EL10 Azure images with changes made in RHEL 9.6 (osbuild/image-builder#1472)
    * Author: Achilleas Koutsou, Reviewers: Michael Vogt, Tomáš Hozza
  * distro: add DNFSetReleaseVerVar to ImageConfig (osbuild/image-builder#1465)
    * Author: Michael Vogt, Reviewers: Achilleas Koutsou, Tomáš Hozza
  * test/base-host-check.sh: fix disabled firewall services check (osbuild/image-builder#1471)
    * Author: Sanne Raymaekers, Reviewers: Achilleas Koutsou, Tomáš Hozza

— Somewhere on the Internet, 2025-04-29

---
thozza pushed a commit to osbuild/osbuild-composer that referenced this pull request Apr 29, 2025
tag v0.140.0
Tagger: imagebuilder-bot <[email protected]>

Changes with 0.140.0

----------------
  * Loader part override followups (osbuild/image-builder#1466)
    * Author: Michael Vogt, Reviewers: Tomáš Hozza
  * RHEL-10/gce: install cloud-utils-growpart by default (osbuild/image-builder#1463)
    * Author: Tomáš Hozza, Reviewers: Michael Vogt, Simon de Vlieger
  * base-host-check: expand to cover more (COMPOSER-2498) (osbuild/image-builder#1432)
    * Author: Simon de Vlieger, Reviewers: Tomáš Hozza
  * rhel8,9: move partitioning into YAML (osbuild/image-builder#1390)
    * Author: Michael Vogt, Reviewers: Tomáš Hozza

— Somewhere on the Internet, 2025-04-28

---

tag v0.141.0
Tagger: imagebuilder-bot <[email protected]>

Changes with 0.141.0

----------------
  * Shrink the current installer images a bit (osbuild/image-builder#1423)
    * Author: Brian C. Lane, Reviewers: Achilleas Koutsou, Simon de Vlieger, Tomáš Hozza
  * Update EL10 Azure images with changes made in RHEL 9.6 (osbuild/image-builder#1472)
    * Author: Achilleas Koutsou, Reviewers: Michael Vogt, Tomáš Hozza
  * distro: add DNFSetReleaseVerVar to ImageConfig (osbuild/image-builder#1465)
    * Author: Michael Vogt, Reviewers: Achilleas Koutsou, Tomáš Hozza
  * test/base-host-check.sh: fix disabled firewall services check (osbuild/image-builder#1471)
    * Author: Sanne Raymaekers, Reviewers: Achilleas Koutsou, Tomáš Hozza

— Somewhere on the Internet, 2025-04-29

---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants