Commit Graph

23 Commits

Author SHA1 Message Date
Ying Xie
9583a74b47 [swss service] flush fast-reboot enabled flag upon swss stopping (#3908)
If we need to stop swss during fast-reboot procedure on the boot up path,
it means that something went wrong, like syncd/orchagent crashed already,
we are stopping and restarting swss/syncd to re-initialize. In this case,
we should proceed as if it is a cold reboot.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2019-12-16 16:04:10 +00:00
Ying Xie
ba88f9c0ae Revert "[swss.sh] When starting, call 'systemctl restart' on dependents, not (#3807)" (#3835)
This reverts commit 351410ea8c.
2019-12-02 23:56:04 +00:00
Joe LeVeque
3920ac2368 [services] Remove explicit dependencies from dhcp_relay service file, control in swss.sh (#3823) 2019-11-27 02:21:00 +00:00
Joe LeVeque
8e86a157ff [swss.sh] When starting, call 'systemctl restart' on dependents, not (#3807)
'systemctl start'
2019-11-24 03:26:03 +00:00
Ying Xie
d821cb84b8 [radv service] radv service should be a cold only dependent of swss (#3348)
radv should be left alone during warm restart of swss. Otherwise it will
announce departure and cause hosts to lose default gateway.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2019-08-16 19:46:37 +00:00
Ying Xie
a41d9a5d3f [service dependent] describe non-warm-reboot dependency outside systemd (#3311)
* [service dependent] describe non-warm-reboot dependency outside systemctl

When dependency was described with systemctl, it will kick in all the time,
including under warm reboot/restart scenarios. This is not what we always
want. For components that are capable of warm reboot/start, they need to
describe dependency in service files.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* [service] teamd service should not require swss service

Adding require swss will cause teamd to be killed by systemctl when swss
stops. This is not what we want in warm reboot.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* refactoring code

* rename functions to match other functions in the file
2019-08-08 22:46:06 +00:00
Stepan Blyshchak
4b5abd048b [swss.sh]: Cleanup LAG entries in STATE DB (#3114)
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
2019-07-10 23:04:33 +00:00
Stepan Blyshchak
fae35536c3 [swss.sh] flush FDB table during cold start (#2933)
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
2019-05-29 00:51:09 +00:00
Joe LeVeque
ecec579933 [services] Services which start containers now use 'docker wait' instead of 'docker attach' (#2661) 2019-03-19 03:05:37 +00:00
Ying Xie
deab95cff6 [swss/syncd] cold start syncd service in swss in attach method (#2639)
start() is called by service startPre method, which is blocking. Starting
syncd service here is causing deadlock.

attach() is called by service start method, which is non-blocking.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2019-03-07 03:30:34 +00:00
Joe LeVeque
c6ccb80803 [services] Ensure swss and syncd services start before dependent services (#2634)
* [services] Ensure swss and syncd services start before dependent services

* Add 'attach' functions to scripts which get installed to /usr/local/bin so that services only reference the one script each

* Add 'After=swss.service' to syncd.service
2019-03-07 03:23:13 +00:00
lguohan
c5b0c59b78 [swss]: flush asic db in swss.sh for non warm-boot (#2582)
need to flush asic db in swss.sh instead of syncd.sh

orchagent might already started in swss.sh and put commands
into asic db before asic db is flushed in syncd.sh. This
causes race condition such as INIT_VIEW not passing to syncd.

Signed-off-by: Guohan Lu <gulv@microsoft.com>
2019-02-21 18:23:58 +00:00
Ying Xie
4faa5f2f92
[warm boot] cherry-pick PR #2538 and advance related sub-modules (#2569)
PR#2538 cannot merge due to master branch status. It has been tested
against 201811 branch.

Submodule src/sonic-sairedis 21f4a49..d57222a:
  > Add more specific logic for ingress ACL and buffer profile (#421)
  > Move warm_restart enable/disable config to stateDB WARM_RESTART_ENABLE_TABLE (#418)
  > Add support for vlan tagged frames in virtual switch (#417)

Submodule src/sonic-swss 1590030..584490c:
  > Move warm_restart enable/disable config to stateDB WARM_RESTART_ENABLE_TABLE (#786)
  > [vstest]: Potential fix for timing issue in warm_reboot's routing UT (#788)

Submodule src/sonic-swss-common 594f4e8..286ef34:
  > Move warm_restart enable/disable config to stateDB WARM_RESTART_ENABLE_TABLE (#260)

Submodule src/sonic-utilities c6666e2..b44b462:
  > Move warm_restart enable/disable config to stateDB WARM_RESTART_ENABL… (#458)
  > [aclshow] output only counters per table/rule (#442)

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

[PR 2538] Move warm_restart enable/disable config to stateDB WARM_RESTART_ENABLE_TABLE

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
2019-02-14 12:12:55 -08:00
Ying Xie
24bce77def [swss/syncd] log swss/syncd service script activities (#2545)
Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2019-02-14 17:04:21 +00:00
Prince Sunny
e9125b944a [swss]: Change VrfMgrd startup order, cleanup VRF_TABLE from state DB (#2510) 2019-02-02 19:39:42 +00:00
stepanblyschak
ff526dd103 [mellanox|ffb] use system level warm reboot for Mellanox fastfast boot (#2374)
* [mellanox|ffb] use system level warm reboot for Mellanox fastfast boot

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>

* [mellanox|ffb] add comments for mellanox start/stop drivers section

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
2019-01-10 14:09:03 -08:00
Volodymyr Samotiy
75b41233d2 [Mellanox|FFB]: Add support for Mellanox fast-fast boot (#2294)
* [mlnx|ffb] Add support for mellanox fast-fast boot

Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>

* [mlnx|ffb]: Add support of "config end" event for mlnx fast-fast boot

Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>

* [Mellanox|FFB]: Fix review comments

* Change naming convention from "fast-fast" to "fastfast"

Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
2018-12-04 10:11:24 -08:00
Ying Xie
5c8650aaaa [swss service] don't clear WARM_RESTART table (#2256)
Clear WARM_RESTART table could cause component level warm restart to
fail due to missing WARM_RESTART state.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
2018-11-15 22:04:53 -08:00
Shuotian Cheng
110355201b [swss]: Update swss.sh script to clean up specific db when start (#2223)
This script shall not flush all the entries in the state database
when it starts up, since there are entries maintained and written
by other processes outside this docker.

The issue we noticed was that the portchannel states are cleaned
up after teamsyncd writes the entries into the database, which
causes the IPs failed to be configured because intfmgrd considers
the portchannels are not ready yet.

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
2018-11-03 12:32:46 -07:00
Jipan Yang
dedd5624a0 Adapt to the new WARM_RESTART_TABLE table schema: change from restart… (#2083)
* Adapt to the new WARM_RESTART_TABLE table schema: change from restart_count to restore_count

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Update variable and function name to match restore_count name change

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>

* Update swss submodule for warm restart schema change

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
2018-10-02 06:08:26 -07:00
Ying Xie
cfe01f19e4
Separate syncd service from swss service (#2051)
* [swss.sh] refactor ssh service script code

- Move checks and waits to helper functions.
- Remove early returns from code stream

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* [swss.sh] Add debug log for service state changes

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* [syncd] Separate out syncd service from swss service

Still make them start/stop/restart synchronously so existing scripts
continue working.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* Remove extra 'After' in swss service and remove syncd docker warm boot code

Syncd warm boot needs more thinking, we can put it back once the work
flow has been defined and ready for coding/testing.

* [syncd] syncd start/stop/restart shouldn't affect swss state

Semi-detach syncd service state change from swss:

- swss state change still chase syncd service to follow except warm boot
- syncd state change will only affect itself.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>

* add missing '{'
2018-09-24 16:35:01 -07:00
Jipan Yang
3f37b96de6 [swss]: Add support for swss docker warm restart (#1982)
Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
2018-08-25 01:39:09 -07:00
lguohan
80c6453731
[swss]: simplify swss systemd service file (#1965)
move the swss service start/stop logic into /usr/local/bin/swss.sh

Signed-off-by: Guohan Lu <gulv@microsoft.com>
2018-08-22 13:02:32 -07:00