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

Don't restart rippled during apt upgrade #3901

Closed
wants to merge 2 commits into from

Conversation

legleux
Copy link
Collaborator

@legleux legleux commented Aug 10, 2021

Keep outgoing version of rippled running during upgrade. Rippled must explicitly be restarted.

Context of Change

The debian packages generated now automatically restart rippled when upgrading. Installing rippled after this change will initiate a restart from 1.7 => 1.8 as a result of the outgoing package's postrm script.
Subsequent upgrades will keep the outgoing version running, requiring intervention to upgrade the running version i.e. systemctl restart rippled or reboot.

Type of Change

I don't know why I picked "refactor" before, I now see how this could break expectations, but not really sure which of these applies.

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Test Plan

What it looks like in practice

Future Tasks

Eventually all this package generation should be handled by native CMake features rather than CMake calling scripts that call CMake that call deb-helper programs.

@legleux legleux changed the title override_dh_systemd_start Don't restart rippled on during apt upgrade Aug 10, 2021
@legleux legleux changed the title Don't restart rippled on during apt upgrade Don't restart rippled during apt upgrade Aug 10, 2021
@legleux legleux marked this pull request as ready for review August 10, 2021 18:25
@thejohnfreeman
Copy link
Collaborator

Great context, thank you for that. Is it true that this will also prevent the service from starting automatically when the machine boots? @manojsdoshi, do you think that will be a problem for anyone?

@legleux
Copy link
Collaborator Author

legleux commented Aug 24, 2021

Great context, thank you for that. Is it true that this will also prevent the service from starting automatically when the machine boots? @manojsdoshi, do you think that will be a problem for anyone?

The rippled.service unit file packaged still dictates that it starts on boot. This is just some in-between uninstall/install magic.

@legleux legleux marked this pull request as draft August 30, 2021 20:26
Copy link
Collaborator

@ximinez ximinez left a comment

Choose a reason for hiding this comment

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

A brief summary of our offline conversation:

  1. A lot of operators are configured to do automatic rippled upgrades. Until they manually intervene to restart rippled, they could have a pretty long downtime, which could be bad for them, and for the network. I would very much prefer if you could find a solution that checks after install for a running rippled, and starts it if not running (which I think we can assume indicates the old version was stopped by the old .deb config).
  2. Please rewrite the commit message to be more informative and link back to the issue. e.g.
Don't restart rippled during apt upgrade:

Resolves #3294

@legleux legleux closed this Sep 4, 2021
@legleux legleux deleted the deb-upgrade-no-restart branch September 4, 2021 01:08
@legleux legleux restored the deb-upgrade-no-restart branch September 4, 2021 01:54
@legleux legleux reopened this Sep 4, 2021
@legleux
Copy link
Collaborator Author

legleux commented Sep 13, 2021

I could have sworn the obvious dh_systemd_start --no-restart-on-upgrade was one of the first things I tried and got an error like --no-restart-on-upgrade parameter unrecognized which led me to think it wasn't available in the set of deb_helper programs on the version of ubuntu we generate pkgs with.
Apparently I was wrong and this seems to work and is much cleaner than my implementation of this behavior.

@legleux legleux marked this pull request as ready for review September 14, 2021 19:37
Copy link
Contributor

@manojsdoshi manojsdoshi left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@ximinez ximinez left a comment

Choose a reason for hiding this comment

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

Looks good

This was referenced Oct 6, 2021
@manojsdoshi
Copy link
Contributor

"Merged as part of #3948"

@manojsdoshi manojsdoshi closed this Oct 7, 2021
@legleux legleux deleted the deb-upgrade-no-restart branch January 17, 2024 07:50
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.

4 participants