Differential D6883 Diff 24973 site-modules/profile/templates/swh/deploy/loader_opam/opam-manage-shared-state.service.erb
Changeset View
Changeset View
Standalone View
Standalone View
site-modules/profile/templates/swh/deploy/loader_opam/opam-manage-shared-state.service.erb
# Opam manage shared state unit file | # Opam manage shared state unit file | ||||
# Managed by puppet class profile::swh::deploy::worker::loader_opam | # Managed by puppet class profile::swh::deploy::worker::loader_opam | ||||
# Changes will be overwritten | # Changes will be overwritten | ||||
[Unit] | [Unit] | ||||
Description=Software Heritage Manage OPAM shared state (<%= @instance %>) | Description=Software Heritage Manage OPAM shared state | ||||
Requires=network.target | Requires=network.target | ||||
After=network.target | After=network.target | ||||
[Service] | [Service] | ||||
User=<%= @user %> | User=<%= @user %> | ||||
Group=<%= @group %> | Group=<%= @group %> | ||||
Type=simple | Type=simple | ||||
ExecStart=/usr/local/bin/opam-manage-shared-state.sh <%= @instance %> <%= @instance_url %> | ExecStart=<%= @opam_manage_state_script %> | ||||
[Install] | [Install] | ||||
WantedBy=multi-user.target | WantedBy=multi-user.target | ||||
olasd: These changes should make sure that the shared state is properly initialized before the opam… | |||||
Not Done Inline ActionsHmm, RemainAfterExit=yes will prevent the timer from activating the unit again (because the unit will remain active forever), so we should not add that. Now we should check if the WantedBy/Before are enough to make sure the swh-worker@ units are happy to start, even if the unit ends up inactive (which will happen once the script ends). I'm also not sure this unit should be WantedBy=multi-user.target at all (which will activate the unit on boot, rather than only when required by other services). olasd: Hmm, `RemainAfterExit=yes` will prevent the timer from activating the unit again (because the… |
These changes should make sure that the shared state is properly initialized before the opam lister and loader run. Maybe we should do that in a separate commit.