Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

EM: Add remain RemainAfterExit to metadata service #1404

Merged
merged 1 commit into from
Mar 2, 2021

Conversation

surajssd
Copy link
Member

This commit adds RemainAfterExit=true to metadata service. Other
services of type oneshot already have it.

Fixes: #1371

This commit adds `RemainAfterExit=true` to metadata service. Other
services of type `oneshot` already have it.

Signed-off-by: Suraj Deshmukh <[email protected]>
@surajssd surajssd requested review from iaguis and invidian March 1, 2021 14:52
Copy link
Member

@invidian invidian left a comment

Choose a reason for hiding this comment

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

I wonder if we should have some test around this.

@surajssd
Copy link
Member Author

surajssd commented Mar 1, 2021

I wonder if we should have some test around this.

Do you mean like a e2e? What ideas do you have? I am wondering how to create a erroneous condition?

@invidian
Copy link
Member

invidian commented Mar 1, 2021

Do you mean like a e2e? What ideas do you have? I am wondering how to create a erroneous condition?

We could at least test for systemctl show coreos-metadata | grep RemainAfterExit=yes, so if we refactor Terraform code (e.g. #449), we make sure all properties we need are in place.

If we want to test for side-effects, we would have to create a mock service, restart it and check if coreos-metadata run again, which would be better. We could also block coreos-metadata on IPtables level and ensure that it's restart does not block starting of dependant service.

On the other hand I'm not sure if it's worth the effort. We can implement grepping almost for free with existing tooling.

@iaguis
Copy link
Contributor

iaguis commented Mar 1, 2021

My 2 cents. I would not add a test for this, I'd make sure with some script that all services have the right directives when refactoring.

@invidian
Copy link
Member

invidian commented Mar 1, 2021

My 2 cents. I would not add a test for this, I'd make sure with some script that all services have the right directives when refactoring.

That will be like milion tests to write before doing the actual refactoring. I'm 99% sure this is not going to happen 😄 But fair enough 👍

@surajssd
Copy link
Member Author

surajssd commented Mar 2, 2021

Alright then merging it for now!

@surajssd surajssd merged commit 03b0b6f into master Mar 2, 2021
@surajssd surajssd deleted the surajssd/remain-after-exit branch March 2, 2021 09:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add RemainAfterExit=yes for oneshot services
3 participants