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

[Bug]: Debian Package - no service restart after apt upgrade #4515

Closed
wieso-itzi opened this issue Mar 8, 2024 · 2 comments
Closed

[Bug]: Debian Package - no service restart after apt upgrade #4515

wieso-itzi opened this issue Mar 8, 2024 · 2 comments
Labels
bug Something isn't working untriaged Issues that have not yet been triaged

Comments

@wieso-itzi
Copy link
Contributor

Describe the bug

I didn't know if Bug or Feature Request was the right category for this, since I don't know if the behaviour is intentional or not.

The problem at hand is that after upgrading opensearch and opensearch-dashboards from Version 2.11.1 to 2.12.0 via apt upgrade, the systemd service of these 2 packages didn't automatically restart (even though the units are enabled and were active when starting the update). The packages were installed from the official OpenSearch Apt-Repo (https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/apt).

To reproduce

Add https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/apt or https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/2.x/apt to your sources.list
Install opensearch or opensearch-dashboards in Version 2.11.1
Start and enable the systemd unit
Perform an upgrade to Version 2.12.0 via apt upgrade

Expected behavior

This behaviour is really unusual for systemd units that are distributed via Debian package. A user upgrading the package would expect the service to be restarted automatically after the upgrade (especially if the systemd unit was enabled).
If this really is the intended behaviour for your Debian packages I would advise you to specify in the documentation that it's recommended to hold the packages back via "apt mark hold" (similar to how it's described in the kubeadm documentation for their debian packages), since any kind of automatic upgrade process that's in place would stop the service (or at least force the user to implement some sort of hook in their automatic upgrade process that starts the service afterwards).
If it's not intended and it would be ok for you to be changed then I could gladly help out with a PR. I've implemented this before, both with postinst-Scripts and debhelper, it's not that complicated.

Screenshots

If applicable, add screenshots to help explain your problem.

Host / Environment

The problem occured on a Debian 12 (bookworm) host but I would be expect it to behave the same on all systemd-based Hosts that upgrade the Debian package

Additional context

No response

Relevant log output

No response

@wieso-itzi wieso-itzi added bug Something isn't working untriaged Issues that have not yet been triaged labels Mar 8, 2024
@peterzhuamazon
Copy link
Member

peterzhuamazon commented Mar 11, 2024

Hi, @wieso-itzi,

This is duplicate with an older issue:

We would be greatly appreciate if you can help with a PR or some comments on how to resolve this.
And I would be happy to review the code with you.

If you dont mind can you close this issue and continue the conversation in the old one I posted, so that context is not lost in the process?

Thanks!

@wieso-itzi
Copy link
Contributor Author

Thanks for tagging me on the other issue. I'll close this issue and start work on implementing it into your existing packaging as soon as I get home.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged Issues that have not yet been triaged
Projects
None yet
Development

No branches or pull requests

2 participants