Skip to content

IsSystemdService: make check stricter to avoid false positives#2734

Merged
halter73 merged 1 commit intodotnet:masterfrom
tmds:systemd_check
Dec 4, 2019
Merged

IsSystemdService: make check stricter to avoid false positives#2734
halter73 merged 1 commit intodotnet:masterfrom
tmds:systemd_check

Conversation

@tmds
Copy link
Copy Markdown
Member

@tmds tmds commented Nov 29, 2019

Checking the INVOCATION_ID envvar is causing false positives.
Instead, we now return true only when the direct parent process is 'systemd'.

Fixes #2525

cc @Tragetaschen @anurse @onyxmaster @Tratcher

Checking the INVOCATION_ID envvar is causing false positives.
Instead, we now return true only when the direct parent process is 'systemd'.
@analogrelay
Copy link
Copy Markdown

Technically breaking so we should run this by the API/Breaking Change review group (cc @aspnet/asp-net-api-reviews). I think it's warranted though (and the set of people it would break is pretty small: scenarios where INVOCATION_ID is set, the direct parent is not systemd, and the desired behavior is to act as a systemd service).

Copy link
Copy Markdown

@analogrelay analogrelay left a comment

Choose a reason for hiding this comment

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

LGTM, should be mergable once we get approval for the breaking change.

Copy link
Copy Markdown
Member

@halter73 halter73 left a comment

Choose a reason for hiding this comment

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

LGTM too

@halter73 halter73 merged commit cda7743 into dotnet:master Dec 4, 2019
@halter73
Copy link
Copy Markdown
Member

halter73 commented Dec 4, 2019

Thanks @tmds! @anurse do you think we should backport this?

@analogrelay
Copy link
Copy Markdown

The fact that it is technically a breaking change makes me a little nervous. But it is customer-reported and has no workaround. We also strongly believe there is no intended scenario that would be broken.

Let's take it to Tactics. @halter73 could you open a backport PR? I can fill in the justification details.

@ghost ghost locked as resolved and limited conversation to collaborators May 26, 2023
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.

UseSystemd can detect an interactive shell as running as systemd service

5 participants