Skip to content

Add support for Zabbix 7.2+ path and APT structure - #1040

Open
Safranil wants to merge 2 commits into
voxpupuli:masterfrom
capsi-informatique:support-8.0-structure
Open

Safranil wants to merge 2 commits into
voxpupuli:masterfrom
capsi-informatique:support-8.0-structure

Conversation

@Safranil

Copy link
Copy Markdown
Contributor

Pull Request (PR) description

Zabbix 7.2 was published some day ago and some structural change was made by Zabbix Team:

This PR add support for this new structure for the upcoming Zabbix 8.0 LTS release.

This Pull Request (PR) fixes the following issues

Replace PR #981.

This is linked to #995 and #1029, even though the issues refer to a non-LTS version of Zabbix.

@Safranil Safranil mentioned this pull request Sep 14, 2026
@Safranil

Copy link
Copy Markdown
Contributor Author

The CI fail on 8.0 repository because it doesn't exist yet, Zabbix 8.0 will be released this month as indicated in the Zabbix roadmap.

@d1nuc0m

d1nuc0m commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Seems good at first glance, we'll run again the pipelines when there'll be a stable release (and see what happens, hopefully meanwhile we'll do a proper test review). Ping me again when there is a stable release (and thanks for the PR!)

@d1nuc0m d1nuc0m self-assigned this Sep 14, 2026
@d1nuc0m d1nuc0m added the enhancement New feature or request label Sep 14, 2026
@jaarsmactnet

Copy link
Copy Markdown

Stable has been released!

@d1nuc0m

d1nuc0m commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

@Safranil can you rebase and push again?

@Safranil
Safranil force-pushed the support-8.0-structure branch from 0be5b83 to f124f29 Compare November 12, 2026 11:35
@Safranil

Copy link
Copy Markdown
Contributor Author

@Safranil can you rebase and push again?

Done. Unfortunately, I can't test the 8.0 code on a real infrastructure anytime soon...

@Safranil
Safranil force-pushed the support-8.0-structure branch 2 times, most recently from 5cf5558 to 21f78ad Compare November 12, 2026 11:42

@smortex smortex 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.

7.0 is fine but later version do not seem to work. If I read correctly, this PR only fix 8.0, but 7.2 and 7.4 are also affected.

Comment thread manifests/repo.pp Resolved
Comment thread manifests/repo.pp Resolved
@Safranil

Copy link
Copy Markdown
Contributor Author

7.0 is fine but later version do not seem to work. If I read correctly, this PR only fix 8.0, but 7.2 and 7.4 are also affected.

Indeed, this PR break on 7.2 and 7.4. This was discussed in #981 where @Valantin told me this module should only support Zabbix LTS.

So I'm confused by your proposed change, should I support Zabbix 7.2 and 7.4 or only LTS releases ?

@smortex

smortex commented Nov 28, 2026

Copy link
Copy Markdown
Member

@Safranil I am not aware of the Zabbix release cycle (I hit this by accident 😄). I understand that there is LTS and non-LTS releases, and reading #981 I feel like the comments of @Valantin are mostly about the tests: testing all releases is maybe overkill and we can only run tests against LTS versions as the module currently does. But the module's code may still work regardless of the LTS status of the release?

Since Zabbix 7.2, the APT repository has changed to
repo.zabbix.com/zabbix/7.2/release and packages content moved to a
/usr/share/zabbix/ subdirectory.
@Safranil
Safranil force-pushed the support-8.0-structure branch from 21f78ad to 6b6606a Compare November 28, 2026 09:45
@Safranil

Copy link
Copy Markdown
Contributor Author

@Safranil I am not aware of the Zabbix release cycle (I hit this by accident 😄). I understand that there is LTS and non-LTS releases, and reading #981 I feel like the comments of @Valantin are mostly about the tests: testing all releases is maybe overkill and we can only run tests against LTS versions as the module currently does. But the module's code may still work regardless of the LTS status of the release?

My bad, I misunderstood that on the other PR. I rebased my work on top of master and accepted your changes. I also adapted two spec that check the Zabbix version.

@smortex smortex 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.

Looks good, just a typo to fix and CI should be happy!

Comment thread spec/classes/repo_spec.rb Resolved
Co-authored-by: Romain Tartière <romain@blogreen.org>
@smortex smortex changed the title Support for Zabbix 8.0 path and APT structure Support for Zabbix 7.2+ path and APT structure Nov 28, 2026
@smortex smortex changed the title Support for Zabbix 7.2+ path and APT structure Add support for Zabbix 7.2+ path and APT structure Nov 28, 2026

@smortex smortex 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.

Not at $WORK today to fully test it, but LGTM!

Comment thread manifests/repo.pp
# Version older than 7.2
-1 => "http://repo.zabbix.com/zabbix/${zabbix_version}/${operatingsystem}/",
# Version 7.2 and newer
default => "http://repo.zabbix.com/zabbix/${zabbix_version}/stable/${operatingsystem}/",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

$operatingsystem is debian-arm64 or ubuntu-arm64 on arm64 hosts (set a few lines above), so this branch produces …/7.2/stable/debian-arm64/ and …/8.0/stable/debian-arm64/, and both return 404. Starting with 7.2 the arm64 packages are in the main dist: the stable/debian and stable/ubuntu Release files list arm64, and main/binary-arm64/Packages.gz is present. The separate debian-arm64 tree only exists up to 7.0, so drop the suffix in the 7.2+ branch only.

Suggested change
default => "http://repo.zabbix.com/zabbix/${zabbix_version}/stable/${operatingsystem}/",
default => "http://repo.zabbix.com/zabbix/${zabbix_version}/stable/${regsubst($operatingsystem, '-arm64$', '')}/",

Comment thread manifests/web.pp
# Version older than 7.2
-1 => '/usr/share/zabbix',
# Version 7.2 and newer
default => '/usr/share/zabbix/ui',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

New docroot has no test. spec/classes/web_spec.rb never asserts docroot or the directory paths, and the acceptance tests do not request the UI over HTTP, so the 7.2+/8.0 layout is only checked by reading the code. Please add a unit case with zabbix_version: '8.0' and manage_vhost: true that asserts contain_apache__vhost('zabbix.example.com').with_docroot('/usr/share/zabbix/ui'), and keep an assertion for /usr/share/zabbix on 7.0.

Comment thread spec/classes/repo_spec.rb
}
end

it { is_expected.to contain_yumrepo('zabbix').with_baseurl("https://repo.zabbix.com/zabbix/8.0/stable/rhel/#{major}/$basearch/") }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Only the RHEL URL is covered. The Debian branch in manifests/repo.pp also switches to /stable/, but no test asserts the resulting apt::source('zabbix') location, so a wrong URL there would only show up in the acceptance job. Please add a Debian case asserting the new location.

This branch has not been deployed

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants