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

[hostcfgd] differentiate between UnitFileState and UnitFilePreset #8169

Merged

Conversation

stepanblyschak
Copy link
Collaborator

It can be that service is not enabled but UnitFilePreset=enabled (case
for Application Extension):

    Loaded: loaded (/lib/systemd/system/cpu-report.service; disabled; vendor preset: enabled)

This makes existing logic skip enabling the service.

Signed-off-by: Stepan Blyschak [email protected]

Why I did it

To fix an issue when a 3rd party package cannot be started by hostcfgd.

How I did it

Check explicitely for UnitFileState.

How to verify it

Ran UT & ran it on the switch.
Installed 3rd party package and enabled it in config db, verified feature can start.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

It can be that service is not enabled but UnitFilePreset=enabled (case
for Application Extension):

```
    Loaded: loaded (/lib/systemd/system/cpu-report.service; disabled; vendor preset: enabled)
```

This makes existing logic skip enabling the service.

Signed-off-by: Stepan Blyschak <[email protected]>
Signed-off-by: Stepan Blyschak <[email protected]>
@liat-grozovik
Copy link
Collaborator

@yxieca could you please help to review? note that this is a degradation noticed in both master and 202012 thus the urgency.
@stepanblyschak can you please check the failures on CI and see if relevant or what is failing.

@stepanblyschak
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lguohan lguohan merged commit e362cab into sonic-net:master Jul 19, 2021
@qiluo-msft
Copy link
Collaborator

This PR could not be cleanly cherry-pick to 202012. Please submit another PR.

stepanblyschak added a commit to stepanblyschak/sonic-buildimage that referenced this pull request Jul 20, 2021
…nic-net#8169)

It can be that service is not enabled but UnitFilePreset=enabled (case
for Application Extension):

```
    Loaded: loaded (/lib/systemd/system/cpu-report.service; disabled; vendor preset: enabled)
```

This makes existing logic skip enabling the service.

Signed-off-by: Stepan Blyschak <[email protected]>
@stepanblyschak
Copy link
Collaborator Author

@qiluo-msft #8228

lguohan pushed a commit that referenced this pull request Jul 21, 2021
) (#8228)

It can be that service is not enabled but UnitFilePreset=enabled (case
for Application Extension):

```
    Loaded: loaded (/lib/systemd/system/cpu-report.service; disabled; vendor preset: enabled)
```

This makes existing logic skip enabling the service.

Signed-off-by: Stepan Blyschak <[email protected]>
judyjoseph pushed a commit that referenced this pull request Aug 7, 2021
)

It can be that service is not enabled but UnitFilePreset=enabled (case
for Application Extension):

```
    Loaded: loaded (/lib/systemd/system/cpu-report.service; disabled; vendor preset: enabled)
```

This makes existing logic skip enabling the service.

Signed-off-by: Stepan Blyschak <[email protected]>
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
…nic-net#8169)

It can be that service is not enabled but UnitFilePreset=enabled (case
for Application Extension):

```
    Loaded: loaded (/lib/systemd/system/cpu-report.service; disabled; vendor preset: enabled)
```

This makes existing logic skip enabling the service.

Signed-off-by: Stepan Blyschak <[email protected]>
@stepanblyschak stepanblyschak deleted the fix-hostcfgd-not-starting-services branch September 23, 2022 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants