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

[services] BGP service depends on SwSS service #3078

Closed
wants to merge 1 commit into from
Closed

[services] BGP service depends on SwSS service #3078

wants to merge 1 commit into from

Conversation

jleveque
Copy link
Contributor

- What I did/How I did it

Make BGP service dependent upon SwSS service. BGP service should never run unless SwSS is running and healthy, otherwise the switch could blackhole traffic. By adding SwSS to the Requires= and After= options, the BGP service will now start only after SwSS successfully starts.

Also, with the addition of #2845, I also added SwSS to the WantedBy= option, which will ensure the BGP service gets stopped if SwSS ever stops, and it will also get restarted if SwSS gets restarted.

- How to verify it

  • At boot, ensure bgp.service starts after swss.service
  • Kill a critical process in the SwSS container (e.g., pkill -11 orchagent). This will cause the SwSS service to stop and restart. Ensure that the BGP service stops shortly after the SwSS service stops. Wait until SwSS automatically restarts, then ensure the BGP service also gets restarted afterward.

@lguohan
Copy link
Collaborator

lguohan commented Jun 25, 2019

if we restart swss service, does it restart bgp service?

@jleveque
Copy link
Contributor Author

if we restart swss service, does it restart bgp service?

Yes.

Copy link
Collaborator

@nikos-github nikos-github left a comment

Choose a reason for hiding this comment

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

@jleveque @lguohan Since GR is negotiated by default, this change doesn't achieve anything when swss restarts (traffic will be blackholed anyway since we have GR). In fact, a second restart of swss, will kill GR and that's undesirable. This isn't the right thing to do. In general, such dependency shouldn't exist between the routing application and swss.

@lguohan
Copy link
Collaborator

lguohan commented Jun 26, 2019

if swss goes down (crashes), then we need to stop bgp since the asic is not synced with the bgp fib and we are going to or is dropping packets. In this case, we would like to bring down the bgp service.

Meanwhile, if we restart the swss (in warm reboot), we should not restart bgp. So, I think we need more sophiscated mechansim to differentiate these two cases.

@nikos-github
Copy link
Collaborator

nikos-github commented Jun 26, 2019

if swss goes down (crashes), then we need to stop bgp since the asic is not synced with the bgp fib and we are going to or is dropping packets. In this case, we would like to bring down the bgp service.

Meanwhile, if we restart the swss (in warm reboot), we should not restart bgp. So, I think we need more sophiscated mechansim to differentiate these two cases.

@lguohan The first assumption is not right. Other services running on the device will still need the bgp routes in the kernel. Bringing down bgp can isolate the device completely from the network and make it unreachable (that precludes us from running bgp over the mgmt port or have bgp install routes). If the behavior you are describing is needed, it needs to be configurable and can't be the default.

@nikos-github
Copy link
Collaborator

nikos-github commented Jul 22, 2019

@xinliu-seattle This PR needs to be closed and must not be committed. As I pointed out already, it will break existing functionality.

mssonicbld added a commit that referenced this pull request Mar 23, 2024
…lly (#18451)

#### Why I did it
src/sonic-swss
```
* f1aad1f0 - (HEAD -> 202311, origin/202311) [acl] Add IN_PORTS qualifier for L3 table (#3078) (10 hours ago) [Neetha John]
* 3b953ae7 - [Mellanox] Fix inconsistence in the shared headroom pool initialization (#3057) (22 hours ago) [Stephen Sun]
```
#### How I did it
#### How to verify it
#### Description for the changelog
mssonicbld added a commit that referenced this pull request Mar 23, 2024
…lly (#18448)

#### Why I did it
src/sonic-swss
```
* d33b854e - (HEAD -> 202305, origin/202305) [acl] Add IN_PORTS qualifier for L3 table (#3078) (4 hours ago) [Neetha John]
```
#### How I did it
#### How to verify it
#### Description for the changelog
mssonicbld added a commit that referenced this pull request Apr 4, 2024
…lly (#18560)

#### Why I did it
src/sonic-swss
```
* 9ee794f4 - (HEAD -> 202305, origin/202305) Revert "[acl] Add IN_PORTS qualifier for L3 table (#3078)" (#3092) (#3098) (16 hours ago) [mssonicbld]
```
#### How I did it
#### How to verify it
#### Description for the changelog
dgsudharsan added a commit to dgsudharsan/sonic-buildimage that referenced this pull request Apr 5, 2024
…commits

* c96a2f84 - Revert "[acl] Add IN_PORTS qualifier for L3 table (sonic-net#3078)" (sonic-net#3092) (6 days ago) [Neetha John]
* 80e0b57d - [Copp]Refactor coppmgr tests (sonic-net#3093) (8 days ago) [Sudharsan Dhamal Gopalarathnam]
* a4647299 - [portsorch] process only updated APP_DB fields when port is already   created (sonic-net#3025) (10 days ago) [Stepan Blyshchak]
* 91bacca5 - [buffermgrd] Move switch-statement outside of if-statement in BufferMgr::doTask (sonic-net#3055) (2 weeks ago) [Amir]
* 04912ad0 - [bulker] add support for neighbor bulking (sonic-net#2768) (2 weeks ago) [Nikola Dancejic]
* 9d4a3add - [acl] Add IN_PORTS qualifier for L3 table (sonic-net#3078) (2 weeks ago) [Neetha John]
* a13e081f - [Mellanox] Fix inconsistence in the shared headroom pool initialization (sonic-net#3057) (3 weeks ago) [Stephen Sun]
* ff2b2b85 - Add basic fabric link monitoring counters and states handling. (sonic-net#2988) (3 weeks ago) [jfeng-arista]
* 0c620910 - Add port flap count and last flap timestamp to APPL_DB (sonic-net#3052) (3 weeks ago) [Prince George]
* e9931f31 - [EVPN] Skip EVPN routes with invalid VNI or router mac field (sonic-net#3073) (3 weeks ago) [Lior Avramov]
* 600d5e80 - Set HOST_TX_READY_NOTIFY attribute only after query capabilities(sonic-net#3070) (3 weeks ago) [noaOrMlnx]
liat-grozovik pushed a commit that referenced this pull request Apr 7, 2024
…commits (#18576)

* c96a2f84 - Revert "[acl] Add IN_PORTS qualifier for L3 table (#3078)" (#3092) (6 days ago) [Neetha John]
* 80e0b57d - [Copp]Refactor coppmgr tests (#3093) (8 days ago) [Sudharsan Dhamal Gopalarathnam]
* a4647299 - [portsorch] process only updated APP_DB fields when port is already   created (#3025) (10 days ago) [Stepan Blyshchak]
* 91bacca5 - [buffermgrd] Move switch-statement outside of if-statement in BufferMgr::doTask (#3055) (2 weeks ago) [Amir]
* 04912ad0 - [bulker] add support for neighbor bulking (#2768) (2 weeks ago) [Nikola Dancejic]
* 9d4a3add - [acl] Add IN_PORTS qualifier for L3 table (#3078) (2 weeks ago) [Neetha John]
* a13e081f - [Mellanox] Fix inconsistence in the shared headroom pool initialization (#3057) (3 weeks ago) [Stephen Sun]
* ff2b2b85 - Add basic fabric link monitoring counters and states handling. (#2988) (3 weeks ago) [jfeng-arista]
* 0c620910 - Add port flap count and last flap timestamp to APPL_DB (#3052) (3 weeks ago) [Prince George]
* e9931f31 - [EVPN] Skip EVPN routes with invalid VNI or router mac field (#3073) (3 weeks ago) [Lior Avramov]
* 600d5e80 - Set HOST_TX_READY_NOTIFY attribute only after query capabilities(#3070) (3 weeks ago) [noaOrMlnx]
mssonicbld added a commit that referenced this pull request Apr 9, 2024
…lly (#18603)

#### Why I did it
src/sonic-swss
```
* 344b28f3 - (HEAD -> 202311, origin/202311) Revert "[acl] Add IN_PORTS qualifier for L3 table (#3078)" (#3092) (16 hours ago) [Neetha John]
```
#### How I did it
#### How to verify it
#### Description for the changelog
This pull request was closed.
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.

4 participants