Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rpm): Delay Naemon restart until posttrans #456

Merged
merged 1 commit into from
Mar 2, 2024

Conversation

imre-sidn
Copy link
Contributor

The posttrans scriptlet executes after the RPM transaction has concluded, i.e. when all packages have been installed or upgraded. Delaying the Naemon restart until posttrans prevents API compatibility issues when naemon-core upgrades before naemon-livestatus. See #454.

Note that it is not possible to infer the RPM operation (install or upgrade) from the posttrans scriptlet argument, since they are the same: https://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets#Syntax This should not cause any problems since the scriptlet only restarts Naemon if it was already running. In other words, it won't cause Naemon to start immediately after installation.

The posttrans scriptlet executes after the RPM transaction has
concluded, i.e. when all packages have been installed or upgraded.
Delaying the Naemon restart until posttrans prevents API compatibility
issues when naemon-core upgrades before naemon-livestatus. See
naemon#454.

Note that it is not possible to infer the RPM operation (install or
upgrade) from the posttrans scriptlet argument, since they are the same:
https://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets#Syntax
This should not cause any problems since the scriptlet only restarts
Naemon if it was already running. In other words, it won't cause Naemon
to start immediately after installation.
@imre-sidn
Copy link
Contributor Author

I've tested this change in a Rocky Linux 8 container, by upgrading from the previous 1.4.1 version. I have also tested RPM installs.

@sni
Copy link
Contributor

sni commented Mar 2, 2024

thanks for digging into and fixing this. This comes just in time, the next release will come
with rebuild neb modules again.

@sni sni merged commit 3e07412 into naemon:master Mar 2, 2024
2 checks passed
@imre-sidn imre-sidn deleted the fix-rpm-restart branch March 4, 2024 06:51
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.

None yet

2 participants