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

Grouping delayed services under a target for config reload checks #7846

Merged
merged 2 commits into from
Jun 21, 2021

Conversation

dgsudharsan
Copy link
Collaborator

Why I did it

Create a target for delayed service timers. Few services in sonic have delayed to speed up the bring up of the system and essential services. However there is no way to track when they start. This will be a problem when executing config reload as config reload expects all services to be up. Hence grouped all the timers that trigger the delayed services under one target so that they could be tracked in 'config reload' command

How I did it

Created delay.target service and add created dependency on the delayed targets.

How to verify it

This is verified using config reload command. The command should not execute after boot, until all the delayed services are up. Introduced sonic-mgmt test cases to cover the logic.

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

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

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

@dgsudharsan
Copy link
Collaborator Author

@jleveque Can you please review this as part of the config reload changes?

@jleveque
Copy link
Contributor

Looks good to me. Please wait for other reviewers.

@jleveque jleveque requested a review from qiluo-msft June 17, 2021 15:48
@qiluo-msft
Copy link
Collaborator

Where is "sonic-mgmt test cases to cover the logic"?

@dgsudharsan
Copy link
Collaborator Author

Where is "sonic-mgmt test cases to cover the logic"?

sonic-net/sonic-mgmt#3657

@jleveque jleveque merged commit c88c3c7 into sonic-net:master Jun 21, 2021
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
…nic-net#7846)

#### Why I did it
Create a target for delayed service timers. Few services in sonic have delayed to speed up the bring up of the system and essential services. However there is no way to track when they start. This will be a problem when executing config reload as config reload expects all services to be up. Hence grouped all the timers that trigger the delayed services under one target so that they could be tracked in 'config reload' command

#### How I did it
Created delay.target service and add created dependency on the delayed targets.
qiluo-msft pushed a commit that referenced this pull request Aug 16, 2021
)

#### Why I did it
Create a target for delayed service timers. Few services in sonic have delayed to speed up the bring up of the system and essential services. However there is no way to track when they start. This will be a problem when executing config reload as config reload expects all services to be up. Hence grouped all the timers that trigger the delayed services under one target so that they could be tracked in 'config reload' command

#### How I did it
Created delay.target service and add created dependency on the delayed targets.
qiluo-msft pushed a commit to sonic-net/sonic-utilities that referenced this pull request Aug 26, 2021
…ramework services (#1773)

#### What I did

When issue `config reload -y` or `config load_minigraph -y` command, most of the sonic services will be reset by command `systemctl reset-failed <service_name>`. The purpose is to avoid services reach to its start retry limit and cannot be started. However, `systemctl reset-failed` only resets those services belong to sonic.target, snmp, telemetry and mgmt-framework are not part of them. So if we run `config reload -y` or `config load_minigraph -y` continues, snmp, telemetry and mgmt-framework services might enter into failed state. This PR is to fix the issue.

I would like to cherry-pick this fix to 202012 branch, but this fix also depends on PR sonic-net/sonic-buildimage#7846. So if we decide to cherry-pick this PR to 202012, we need cherry-pick sonic-net/sonic-buildimage#7846 first.

#### How I did it

Also call `systemctl reset-failed` for services like snmp, telemetry and mgmt-framework. 

#### How to verify it

Manual test.
judyjoseph pushed a commit to sonic-net/sonic-utilities that referenced this pull request Aug 26, 2021
…ramework services (#1773)

#### What I did

When issue `config reload -y` or `config load_minigraph -y` command, most of the sonic services will be reset by command `systemctl reset-failed <service_name>`. The purpose is to avoid services reach to its start retry limit and cannot be started. However, `systemctl reset-failed` only resets those services belong to sonic.target, snmp, telemetry and mgmt-framework are not part of them. So if we run `config reload -y` or `config load_minigraph -y` continues, snmp, telemetry and mgmt-framework services might enter into failed state. This PR is to fix the issue.

I would like to cherry-pick this fix to 202012 branch, but this fix also depends on PR sonic-net/sonic-buildimage#7846. So if we decide to cherry-pick this PR to 202012, we need cherry-pick sonic-net/sonic-buildimage#7846 first.

#### How I did it

Also call `systemctl reset-failed` for services like snmp, telemetry and mgmt-framework. 

#### How to verify it

Manual test.
Junchao-Mellanox added a commit to Junchao-Mellanox/sonic-utilities that referenced this pull request Aug 27, 2021
…ramework services (sonic-net#1773)

When issue `config reload -y` or `config load_minigraph -y` command, most of the sonic services will be reset by command `systemctl reset-failed <service_name>`. The purpose is to avoid services reach to its start retry limit and cannot be started. However, `systemctl reset-failed` only resets those services belong to sonic.target, snmp, telemetry and mgmt-framework are not part of them. So if we run `config reload -y` or `config load_minigraph -y` continues, snmp, telemetry and mgmt-framework services might enter into failed state. This PR is to fix the issue.

I would like to cherry-pick this fix to 202012 branch, but this fix also depends on PR sonic-net/sonic-buildimage#7846. So if we decide to cherry-pick this PR to 202012, we need cherry-pick sonic-net/sonic-buildimage#7846 first.

Also call `systemctl reset-failed` for services like snmp, telemetry and mgmt-framework.

Manual test.
+
liat-grozovik pushed a commit to sonic-net/sonic-utilities that referenced this pull request May 19, 2022
…or (#2176)

- What I did
Add sonic-delayed.target to sonic-application-extension .timer file generator
This change will complete sonic-net/sonic-buildimage#7846 of sonic-delayed.target addition.

- How I did it
N/A

- How to verify it
Make sure your App Ext is part of "WantedBy" sonic-delayed.target
judyjoseph pushed a commit to sonic-net/sonic-utilities that referenced this pull request May 25, 2022
…or (#2176)

- What I did
Add sonic-delayed.target to sonic-application-extension .timer file generator
This change will complete sonic-net/sonic-buildimage#7846 of sonic-delayed.target addition.

- How I did it
N/A

- How to verify it
Make sure your App Ext is part of "WantedBy" sonic-delayed.target
yxieca pushed a commit to sonic-net/sonic-utilities that referenced this pull request Jan 4, 2023
…or (#2176)

- What I did
Add sonic-delayed.target to sonic-application-extension .timer file generator
This change will complete sonic-net/sonic-buildimage#7846 of sonic-delayed.target addition.

- How I did it
N/A

- How to verify it
Make sure your App Ext is part of "WantedBy" sonic-delayed.target
@dgsudharsan dgsudharsan deleted the config_reload_fix branch March 9, 2023 01:46
malletvapid23 added a commit to malletvapid23/Sonic-Utility that referenced this pull request Aug 3, 2023
…ramework services (#1773)

#### What I did

When issue `config reload -y` or `config load_minigraph -y` command, most of the sonic services will be reset by command `systemctl reset-failed <service_name>`. The purpose is to avoid services reach to its start retry limit and cannot be started. However, `systemctl reset-failed` only resets those services belong to sonic.target, snmp, telemetry and mgmt-framework are not part of them. So if we run `config reload -y` or `config load_minigraph -y` continues, snmp, telemetry and mgmt-framework services might enter into failed state. This PR is to fix the issue.

I would like to cherry-pick this fix to 202012 branch, but this fix also depends on PR sonic-net/sonic-buildimage#7846. So if we decide to cherry-pick this PR to 202012, we need cherry-pick sonic-net/sonic-buildimage#7846 first.

#### How I did it

Also call `systemctl reset-failed` for services like snmp, telemetry and mgmt-framework. 

#### How to verify it

Manual test.
malletvapid23 added a commit to malletvapid23/Sonic-Utility that referenced this pull request Aug 3, 2023
…or (#2176)

- What I did
Add sonic-delayed.target to sonic-application-extension .timer file generator
This change will complete sonic-net/sonic-buildimage#7846 of sonic-delayed.target addition.

- How I did it
N/A

- How to verify it
Make sure your App Ext is part of "WantedBy" sonic-delayed.target
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.

5 participants