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

Restart Foreman services after package upgrade on Debian #7216

Merged
merged 1 commit into from Nov 3, 2021

Conversation

ehelms
Copy link
Member

@ehelms ehelms commented Nov 1, 2021

This puts Debian on the same footing as RPM where we do not start
services on initial install but we do restart them after package
upgrades.

Opening as a draft so I can get some builds to test.

@ekohl
Copy link
Member

ekohl commented Nov 1, 2021

If this does solve things, I'd appreciate a Redmine issue.

@ehelms
Copy link
Member Author

ehelms commented Nov 1, 2021

Forgot I needed changelog updates to trigger builds, but I am feeling like I will need #7211 and the CI change to really get testable builds.

Edit: and I think the current failure agrees with me

@ehelms
Copy link
Member Author

ehelms commented Nov 2, 2021

[test deb]

This puts Debian on the same footing as RPM where we do not start
services on initial install but we do restart them after package
upgrades.
@ehelms
Copy link
Member Author

ehelms commented Nov 2, 2021

[test deb]

2 similar comments
@ehelms
Copy link
Member Author

ehelms commented Nov 2, 2021

[test deb]

@ehelms
Copy link
Member Author

ehelms commented Nov 2, 2021

[test deb]

@ehelms ehelms marked this pull request as ready for review November 2, 2021 18:02
@ehelms
Copy link
Member Author

ehelms commented Nov 2, 2021

I was able to complete testing of this change and can confirm this resolves the problem. You can see that foreman-service gets updated:

2021-11-02 17:58:33 configure foreman-service:all 9999-3.1.0-buster+scratchbuild+20211102165550 <none>
2021-11-02 17:58:33 status unpacked foreman-service:all 9999-3.1.0-buster+scratchbuild+20211102165550
2021-11-02 17:58:33 status half-configured foreman-service:all 9999-3.1.0-buster+scratchbuild+20211102165550
2021-11-02 17:59:00 status installed foreman-service:all 9999-3.1.0-buster+scratchbuild+20211102165550

And the service gets restarted:

Nov 02 17:58:50 pipe-up-foreman-nightly-debian10 systemd[1]: Stopping Foreman...
Nov 02 17:58:50 pipe-up-foreman-nightly-debian10 foreman[22245]: [22245] === puma shutdown: 2021-11-02 17:58:50 +0000 ===
Nov 02 17:58:50 pipe-up-foreman-nightly-debian10 foreman[22245]: [22245] - Goodbye!
Nov 02 17:58:50 pipe-up-foreman-nightly-debian10 foreman[22245]: [22245] - Gracefully shutting down workers...
Nov 02 17:58:50 pipe-up-foreman-nightly-debian10 foreman[22245]: Exiting
Nov 02 17:58:50 pipe-up-foreman-nightly-debian10 systemd[1]: foreman.service: Main process exited, code=killed, status=15/TERM
Nov 02 17:58:50 pipe-up-foreman-nightly-debian10 systemd[1]: foreman.service: Succeeded.
Nov 02 17:58:50 pipe-up-foreman-nightly-debian10 systemd[1]: Stopped Foreman.
Nov 02 17:58:50 pipe-up-foreman-nightly-debian10 systemd[1]: Starting Foreman...
Nov 02 17:58:52 pipe-up-foreman-nightly-debian10 foreman[22369]: => Booting Puma
Nov 02 17:58:52 pipe-up-foreman-nightly-debian10 foreman[22369]: => Rails 6.0.3.7 application starting in production
Nov 02 17:58:52 pipe-up-foreman-nightly-debian10 foreman[22369]: => Run `rails server --help` for more startup options
Nov 02 17:58:53 pipe-up-foreman-nightly-debian10 foreman[22369]: /usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_puppet-2.0.0.alpha.2/lib/foreman_puppet/register.rb:120: warning: already initialized constant Foreman::Plugin::RbacSupport::AUTO_EXTENDED_ROLES
Nov 02 17:58:53 pipe-up-foreman-nightly-debian10 foreman[22369]: /usr/share/foreman/app/registries/foreman/plugin/rbac_support.rb:5: warning: previous definition of AUTO_EXTENDED_ROLES was here
Nov 02 17:58:59 pipe-up-foreman-nightly-debian10 foreman[22369]: [22369] * Enabling systemd notification integration
Nov 02 17:58:59 pipe-up-foreman-nightly-debian10 foreman[22369]: [22369] Puma starting in cluster mode...
Nov 02 17:58:59 pipe-up-foreman-nightly-debian10 foreman[22369]: [22369] * Puma version: 5.5.2 (ruby 2.5.5-p157) ("Zawgyi")
Nov 02 17:58:59 pipe-up-foreman-nightly-debian10 foreman[22369]: [22369] *  Min threads: 5
Nov 02 17:58:59 pipe-up-foreman-nightly-debian10 foreman[22369]: [22369] *  Max threads: 5
Nov 02 17:58:59 pipe-up-foreman-nightly-debian10 foreman[22369]: [22369] *  Environment: production
Nov 02 17:58:59 pipe-up-foreman-nightly-debian10 foreman[22369]: [22369] *   Master PID: 22369
Nov 02 17:58:59 pipe-up-foreman-nightly-debian10 foreman[22369]: [22369] *      Workers: 2
Nov 02 17:58:59 pipe-up-foreman-nightly-debian10 foreman[22369]: [22369] *     Restarts: (✔) hot (✖) phased
Nov 02 17:58:59 pipe-up-foreman-nightly-debian10 foreman[22369]: [22369] * Preloading application
Nov 02 17:58:59 pipe-up-foreman-nightly-debian10 foreman[22369]: [22369] * Activated unix:///run/foreman.sock
Nov 02 17:58:59 pipe-up-foreman-nightly-debian10 foreman[22369]: [22369] Use Ctrl-C to stop
Nov 02 17:58:59 pipe-up-foreman-nightly-debian10 foreman[22369]: [22369] * Starting control server on unix:///usr/share/foreman/tmp/sockets/pumactl.sock
Nov 02 17:59:00 pipe-up-foreman-nightly-debian10 foreman[22369]: [22369] - Worker 1 (PID: 22405) booted in 0.21s, phase: 0
Nov 02 17:59:00 pipe-up-foreman-nightly-debian10 foreman[22369]: [22369] - Worker 0 (PID: 22400) booted in 0.22s, phase: 0
Nov 02 17:59:00 pipe-up-foreman-nightly-debian10 systemd[1]: Started Foreman.

@evgeni evgeni merged commit dfae404 into theforeman:deb/develop Nov 3, 2021
@evgeni
Copy link
Member

evgeni commented Nov 3, 2021

nice this got actually built as foreman-3.1.0-2, not with nightly versioning.

fix in theforeman/jenkins-jobs#132

@ekohl
Copy link
Member

ekohl commented Nov 3, 2021

Generally we don't keep a changelog for all changes within the release cycle. We do end up with this weird bit where we sort of go back in time.

foreman (3.0.0-1) stable; urgency=low
* 3.0.0 released
-- Patrick Creech <pcreech@redhat.com> Wed, 08 Sep 2021 09:42:36 -0400
foreman (3.0.0~rc2-1) stable; urgency=low
* 3.0.0-rc2 released
-- Patrick Creech <pcreech@redhat.com> Wed, 25 Aug 2021 14:32:40 -0400
foreman (3.0.0~rc1-1) stable; urgency=low
* 3.0.0-rc1 released
-- Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl> Fri, 06 Aug 2021 17:17:44 +0200
foreman (3.0.0-1) stable; urgency=low
* Bump changelog to 3.0.0 to match VERSION
-- Tomer Brisker <tbrisker@gmail.com> Thu, 22 Jul 2021 17:02:34 +0300

I wonder if having this newer version in the changelog can cause problems later on.

@evgeni
Copy link
Member

evgeni commented Nov 3, 2021

Nope, while not nice, nothing in the Debian stack looks at older changelog entries.

@ekohl
Copy link
Member

ekohl commented Nov 3, 2021

I wonder if instead we should "merge" the changelog entries

@evgeni
Copy link
Member

evgeni commented Nov 3, 2021

For sake of cleanup? Maybe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants