Skip to content

Modified the 'Type=oneshot' to 'Type=simple' in the systemd service file#1453

Closed
1kjnv wants to merge 2 commits into
mattermost:masterfrom
1kjnv:fix/push-notification-service-file
Closed

Modified the 'Type=oneshot' to 'Type=simple' in the systemd service file#1453
1kjnv wants to merge 2 commits into
mattermost:masterfrom
1kjnv:fix/push-notification-service-file

Conversation

@1kjnv

@1kjnv 1kjnv commented May 29, 2025

Copy link
Copy Markdown

Summary

Modified the 'Type=oneshot' to 'Type=simple' in the systemd service file

When the process is started using 'systemctl start' or 'systemctl restart', the status remains stuck at

'activating'

because the oneshot type does not indicate to systemd that the process has started successfully.

Changing the type to simple ensures that systemd recognizes the process as running once it is launched.

…ile.

When the process is started using 'systemctl start' or 'systemctl restart', the status remains stuck at 'activating' because the oneshot type does not indicate to systemd that the process has started successfully.

Changing the type to simple ensures that systemd recognizes the process as running once it is launched.
@mattermost-build

Copy link
Copy Markdown
Contributor

Hello @1kjnv,

Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

Per the Mattermost Contribution Guide, we need to add you to the list of approved contributors for the Mattermost project.

Please help complete the Mattermost contribution license agreement?
Once you have signed the CLA, please comment with /check-cla and confirm that the CLA check is green.

This is a standard procedure for many open source projects.

Please let us know if you have any questions.

We are very happy to have you join our growing community! If you're not yet a member, please consider joining our Contributors community channel to meet other contributors and discuss new opportunities with the core team.

@1kjnv

1kjnv commented May 29, 2025

Copy link
Copy Markdown
Author

/check-cla

@cwarnermm cwarnermm requested review from a team and larkox and removed request for a team May 29, 2025 14:53
@cwarnermm cwarnermm added the 1: Dev Review Requires review by a core commiter label May 29, 2025
@cwarnermm cwarnermm added the preview-environment Allow the preview environment to be generated for Pull Requests coming from fork repositories label May 29, 2025
@github-actions

Copy link
Copy Markdown

Newest code from 1kjnv has been published to preview environment for Git SHA d85ab97

@larkox larkox requested a review from enahum May 30, 2025 08:34

@larkox larkox left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The reasoning looks good to me, but it is completely out of my comfort zone. I asked @enahum review just in case.

@enahum

enahum commented May 30, 2025

Copy link
Copy Markdown
Contributor

I think we want to keep oneshot as we want to wait for the service to have actually started, the option "simple" does not wait even if there was a failure.

Here is a reference that describes the difference between them https://stackoverflow.com/a/39050387

@1kjnv

1kjnv commented Jun 2, 2025

Copy link
Copy Markdown
Author

@enahum I'd like to change 'oneshot' to 'simple' for the following reasons:

  • mattermost-push-proxy is a long-running process that is meant to keep running
  • the system is stuck in the 'activating' state because systemd is expecting the process to exit cleanly(as it should with 'oneshot'), but it doesn't.
  • this can cause issues in automation workflows because 'oneshot' tells systemd to wait until the process exits before marking the service as 'started'. But, with 'oneshot', your service never exits so systemd will wait forever(or until timeout). And, CLI commands like systemctl restart or ansible, shell scripts, etc., that depend on systemctl completing will hang until timeout or manual interruption (CTRL+C)
  • it may also break automated restart and recovery flows

@enahum

enahum commented Jun 2, 2025

Copy link
Copy Markdown
Contributor

@stylianosrigas any input on this?

@1kjnv

1kjnv commented Jun 9, 2025

Copy link
Copy Markdown
Author

@enahum @stylianosrigas reminder!

@1kjnv 1kjnv requested a review from larkox June 16, 2025 05:26
@mattermost-build

Copy link
Copy Markdown
Contributor

This PR has been automatically labelled "stale" because it hasn't had recent activity.
A core team member will check in on the status of the PR to help with questions.
Thank you for your contribution!

@enahum

enahum commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

this has been sitting here for a long while, I'm going to close it now, feel free to re-open if still wanted

@enahum enahum closed this Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1: Dev Review Requires review by a core commiter Contributor Lifecycle/1:stale preview-environment Allow the preview environment to be generated for Pull Requests coming from fork repositories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants