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

Prevent conflicting mender services from running simultaneously. #796

Merged
merged 1 commit into from
Jun 14, 2021

Conversation

kacf
Copy link
Member

@kacf kacf commented Jun 10, 2021

Changelog: Fix: mender-client.service and the old mender.service
services can no longer run at the same time. If anyone has both, then
mender.service should be removed from the system.

Signed-off-by: Kristian Amlie kristian.amlie@northern.tech

Changelog: Fix: `mender-client.service` and the old `mender.service`
services can no longer run at the same time. If anyone has both, then
`mender.service` should be removed from the system.

Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
@mender-test-bot
Copy link

@kacf, Let me know if you want to start the integration pipeline by mentioning me and the command "start pipeline".

@kacf
Copy link
Member Author

kacf commented Jun 10, 2021

@lluiscampos: This was inspired by this post. However, it may not be quite that simple, because older client releases are still using the old name, and may need to patch this out of the file. However, this caused quite severe breakage, so I reckon it's still worth it. What do you think?

Let's never rename the client again...

@kacf
Copy link
Member Author

kacf commented Jun 10, 2021

@mender-test-bot start pipeline

@mender-test-bot
Copy link

Hello 😸 I created a pipeline for you here: Pipeline-318210389

Build Configuration Matrix

Key Value
AUDITLOGS_REV origin/master
BUILD_BEAGLEBONEBLACK true
BUILD_CLIENT true
BUILD_QEMUX86_64_BIOS_GRUB true
BUILD_QEMUX86_64_BIOS_GRUB_GPT true
BUILD_QEMUX86_64_UEFI_GRUB true
BUILD_VEXPRESS_QEMU true
BUILD_VEXPRESS_QEMU_FLASH true
BUILD_VEXPRESS_QEMU_UBOOT_UEFI_GRUB true
CREATE_ARTIFACT_WORKER_REV origin/master
DEPLOYMENTS_ENTERPRISE_REV origin/master
DEPLOYMENTS_REV origin/master
DEVICEAUTH_REV origin/master
DEVICECONFIG_REV origin/master
DEVICECONNECT_REV origin/master
GUI_REV origin/master
INTEGRATION_REV master
INVENTORY_ENTERPRISE_REV origin/master
INVENTORY_REV origin/master
MENDER_ARTIFACT_REV origin/master
MENDER_CLI_REV origin/master
MENDER_CONNECT_REV origin/master
MENDER_REV pull/796/head
MTLS_AMBASSADOR_REV origin/master
RUN_INTEGRATION_TESTS true
TENANTADM_REV origin/master
TEST_QEMUX86_64_BIOS_GRUB true
TEST_QEMUX86_64_BIOS_GRUB_GPT true
TEST_QEMUX86_64_UEFI_GRUB true
TEST_VEXPRESS_QEMU true
TEST_VEXPRESS_QEMU_FLASH true
TEST_VEXPRESS_QEMU_UBOOT_UEFI_GRUB true
USERADM_ENTERPRISE_REV origin/master
USERADM_REV origin/master
WORKFLOWS_ENTERPRISE_REV origin/master
WORKFLOWS_REV origin/master

@lluiscampos
Copy link
Contributor

@lluiscampos: This was inspired by this post. However, it may not be quite that simple, because older client releases are still using the old name, and may need to patch this out of the file. However, this caused quite severe breakage, so I reckon it's still worth it. What do you think?

While the change you submit here is good, I don't really understand how this prevents another user to end up in the same situation. All that it will do is to block mender-client service, but the mender one will still be running right? So to my eyes "hides" the problem that the service file still will be wrong.

Let's never rename the client again...

Roger that!

@kacf
Copy link
Member Author

kacf commented Jun 14, 2021

While the change you submit here is good, I don't really understand how this prevents another user to end up in the same situation. All that it will do is to block mender-client service, but the mender one will still be running right? So to my eyes "hides" the problem that the service file still will be wrong.

What it does it prevent them from running at the same time. Either one can run in isolation. However, if both are enabled at boot, then both will fail to start, and it counts as an error from systemd's side. So this is the only thing that this patch changes, you cannot run them at the same time anymore. It does not fix the fact that there may be an old service file in the system, but that was the case before this patch as well.

I can see what you mean with "hiding" the issue, but the original issue was quite hidden as well, and the effect was much more severe than it will be after this patch. So we should still be on the lookout for the problem, but at least we have some protection from the worst effects.

@lluiscampos
Copy link
Contributor

Okey, let's merge it then. Thanks for the discussion.

@kacf
Copy link
Member Author

kacf commented Jun 14, 2021

Thanks!

@kacf kacf merged commit f3d8be5 into mendersoftware:master Jun 14, 2021
@kacf kacf deleted the service_conflicts branch June 14, 2021 08:59
@mender-test-bot
Copy link

Hello 😸 This PR contains changelog entries. Please, verify the need of backporting it to the following release branches:
2.6.x (release 2.7.x)
2.5.x (release 2.6.x)
2.3.x (release 2.4.x)

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.

3 participants