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

[boot] Start ntp-config service after all Docker containers are started #2303

Merged
merged 1 commit into from
Nov 28, 2018
Merged

[boot] Start ntp-config service after all Docker containers are started #2303

merged 1 commit into from
Nov 28, 2018

Conversation

jleveque
Copy link
Contributor

Docker containers in SONiC rely on supervisord to manage running processes. However, supervisord currently has the following issue: If the system clock rolls backwards (e.g., due to NTP correcting system time) after supervisor has marked a process as being in the STARTING state but before it has entered the RUNNING state, when supervisor goes to change the process' state to RUNNING, supervisor will crash if the current system time precedes the timestamp when it marked the process as STARTING.

Until supervisor is made to work nicely when the system clock rolls backward, this PR will wait to configure and restart the NTP service until after all services which start Docker containers have started.

@nikos-github
Copy link
Collaborator

Why does supervisord care about what the clock is doing because of ntp? Is it not using a monotonic clock?

If it's not using a monotonic clock, I don't see how we can keep using supervisord. What if the clock shifts again and supervisord crashes later on or gives some undesirable side effects?

Starting ntp in the system after all the containers are started and correcting the clock afterwards, is creating a dependency that isn't acceptable.

@jleveque
Copy link
Contributor Author

Why does supervisord care about what the clock is doing because of ntp? Is it not using a monotonic clock?

No. Supervisor currently does not use a monotonic clock. I have asked about moving to monotonic time here. The author has reservations due to the varying availability of monotonic time in different versions of Python that Supervisor supports.

@nikos-github
Copy link
Collaborator

nikos-github commented Nov 27, 2018

No. Supervisor currently does not use a monotonic clock. I have asked about moving to monotonic time here. The author has reservations due to the varying availability of monotonic time in different versions of Python that Supervisor supports.

Thanks for the pointer to the thread. This makes supervisord quite unstable in my opinion. Seems to me we should consider pushing forward for the suggestion in Supervisor/supervisor#468 (comment) to be implemented if supporting older than Python 3 versions is important and an absolute must. Python 3 has been around for 10 years now.

I am also concerned about supervisord's progress in addressing critical issues such as this one. It appears this has been known for 5+ yrs now yet hasn't been addressed. Perfectly fine for a home network but not good enough for something such as sonic.

@lguohan lguohan merged commit d1c9b0c into sonic-net:master Nov 28, 2018
@lguohan
Copy link
Collaborator

lguohan commented Nov 28, 2018

@nikos-github , after is different than required. it is just ordering dependency. it does not matter whether service fail to start or start.

@lguohan
Copy link
Collaborator

lguohan commented Nov 28, 2018

@jleveque , I actually think we should add before= in all other services. In such case, we can manage the ordering between ntp and individual service separately. Especially, when we later introduce new service, we just need to add before in the new service unit file.

@jleveque jleveque deleted the delay_ntp branch December 3, 2018 23:27
dprital added a commit to dprital/sonic-buildimage that referenced this pull request Aug 12, 2022
Update sonic-utilities submodule pointer to include the following:
* Fix test failure in dump table test in 202205 ([sonic-net#2307](sonic-net/sonic-utilities#2307))
* Convert IPv6 addresses to lowercase in apply-patch ([sonic-net#2299](sonic-net/sonic-utilities#2299))
* [config][muxcable] add support to enable/disable ycable telemetry ([sonic-net#2297](sonic-net/sonic-utilities#2297))
* Fix GCU bug when backend service modifying config ([sonic-net#2295](sonic-net/sonic-utilities#2295))
* [intfutil] Check whether the FEC mode is supported on the platform before configuring it to CONFIG_DB ([sonic-net#2223](sonic-net/sonic-utilities#2223))
* Improve the way to check port type of RJ45 port ([sonic-net#2249](sonic-net/sonic-utilities#2249))
* sonic-utils: initial support for link-training ([sonic-net#2071](sonic-net/sonic-utilities#2071))
* Support to enable fips for the command sonic_installer (sonic-net#2154) ([sonic-net#2303](sonic-net/sonic-utilities#2303))

Signed-off-by: dprital <drorp@nvidia.com>
yxieca added a commit to yxieca/sonic-buildimage that referenced this pull request Aug 12, 2022
…submodule head

Kernel:
* 86c4b66 2022-07-28 | [Mellanox] Add new kernel patches from HW-MGMT package V.7.0020.3005 (sonic-net#287) (HEAD -> 202205) [Kebo Liu]
* 3a8416a 2022-07-05 | [patch] mlxsw: i2c: Prevent transaction execution for special chip (sonic-net#279) [Stepan Blyshchak]

swss:
* 3f69944 2022-08-10 | Set internal class state to reflect the actual state (sonic-net#2410) (HEAD -> 202205, tag: foo) [Prince Sunny]
* 87e98eb 2022-08-09 | [portsorch] Expose supported FEC modes to STABE_DB and check whether FEC mode is supported before setting it (sonic-net#2400) [Stephen Sun]
* e71ab99 2022-07-29 | portsorch: initial support for link-training (sonic-net#2359) [Dante (Kuo-Jung) Su]
* ed5e5be 2022-07-08 | Port configuration incremental update support (sonic-net#2305) [Junchao-Mellanox]

utilities:
* 0df3ba8 2022-08-12 | Revert "Improve the way to check port type of RJ45 port (sonic-net#2249)" (HEAD -> 202205) [Ying Xie]
* 9b21903 2022-08-12 | Fix test failure in dump table test in 202205 (sonic-net#2307) (HEAD -> 202205, github/202205) [Stephen Sun]
* 750d1db 2022-08-11 | Convert IPv6 addresses to lowercase in apply-patch (sonic-net#2299) (HEAD -> 202205) [dbarashinvd]
* 555947e 2022-08-09 | [config][muxcable] add support to enable/disable ycable telemetry (sonic-net#2297) [vdahiya12]
* 978f416 2022-08-09 | Fix GCU bug when backend service modifying config (sonic-net#2295) [jingwenxie]
* 8fed381 2022-08-02 | [intfutil] Check whether the FEC mode is supported on the platform before configuring it to CONFIG_DB (sonic-net#2223) (github/202205) [Stephen Sun]
* a1a09e4 2022-07-29 | Improve the way to check port type of RJ45 port (sonic-net#2249) [Stephen Sun]
* 9bdbfb8 2022-05-19 | sonic-utils: initial support for link-training (sonic-net#2071) [Dante (Kuo-Jung) Su]
* c088ec4 2022-08-10 | Support to enable fips for the command sonic_installer (sonic-net#2154) (sonic-net#2303) [xumia]

platform-daemon:
* 767cfb6 2022-08-09 | [ycabled] add capability to enable/disable telemetry (sonic-net#279) (HEAD -> 202205) [vdahiya12]

linkmgrd:
* cf1ba2b 2022-08-12 | wait for handler to be completed (sonic-net#114) (HEAD -> 202205, github/202205) [Jing Zhang]
* e99026c 2022-08-11 | [lgtm]: add uuid-dev to lgtm prepare (sonic-net#112) (HEAD -> 202205) [Jing Zhang]
* bd1b7f0 2022-08-11 | Adjust `DbInterfaceRaceConditionCheck` to Wait Longer for Handlers to be executed (sonic-net#111) (HEAD -> 202205, github/202205) [Jing Zhang]
* e9dc6b2 2022-08-11 | Backoff mux probing for server down scenario (sonic-net#106) [Jing Zhang]
* 0d61171 2022-08-09 | Fix race condition caused by strand `wrap` method (sonic-net#104) [Jing Zhang]
* e9ede7d 2022-07-02 | Enforce switch after config mux to active (sonic-net#95) [Longxiang Lyu]
* 15dbc30 2022-06-30 | Add unittest to verify mux toggle active (sonic-net#94) [Longxiang Lyu]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
yxieca added a commit that referenced this pull request Aug 13, 2022
…submodule head (#11705)

Kernel:
* 86c4b66 2022-07-28 | [Mellanox] Add new kernel patches from HW-MGMT package V.7.0020.3005 (#287) (HEAD -> 202205) [Kebo Liu]
* 3a8416a 2022-07-05 | [patch] mlxsw: i2c: Prevent transaction execution for special chip (#279) [Stepan Blyshchak]

swss:
* 3f69944 2022-08-10 | Set internal class state to reflect the actual state (#2410) (HEAD -> 202205, tag: foo) [Prince Sunny]
* 87e98eb 2022-08-09 | [portsorch] Expose supported FEC modes to STABE_DB and check whether FEC mode is supported before setting it (#2400) [Stephen Sun]
* e71ab99 2022-07-29 | portsorch: initial support for link-training (#2359) [Dante (Kuo-Jung) Su]
* ed5e5be 2022-07-08 | Port configuration incremental update support (#2305) [Junchao-Mellanox]

utilities:
* 0df3ba8 2022-08-12 | Revert "Improve the way to check port type of RJ45 port (#2249)" (HEAD -> 202205) [Ying Xie]
* 9b21903 2022-08-12 | Fix test failure in dump table test in 202205 (#2307) (HEAD -> 202205, github/202205) [Stephen Sun]
* 750d1db 2022-08-11 | Convert IPv6 addresses to lowercase in apply-patch (#2299) (HEAD -> 202205) [dbarashinvd]
* 555947e 2022-08-09 | [config][muxcable] add support to enable/disable ycable telemetry (#2297) [vdahiya12]
* 978f416 2022-08-09 | Fix GCU bug when backend service modifying config (#2295) [jingwenxie]
* 8fed381 2022-08-02 | [intfutil] Check whether the FEC mode is supported on the platform before configuring it to CONFIG_DB (#2223) (github/202205) [Stephen Sun]
* a1a09e4 2022-07-29 | Improve the way to check port type of RJ45 port (#2249) [Stephen Sun]
* 9bdbfb8 2022-05-19 | sonic-utils: initial support for link-training (#2071) [Dante (Kuo-Jung) Su]
* c088ec4 2022-08-10 | Support to enable fips for the command sonic_installer (#2154) (#2303) [xumia]

platform-daemon:
* 767cfb6 2022-08-09 | [ycabled] add capability to enable/disable telemetry (#279) (HEAD -> 202205) [vdahiya12]

linkmgrd:
* cf1ba2b 2022-08-12 | wait for handler to be completed (#114) (HEAD -> 202205, github/202205) [Jing Zhang]
* e99026c 2022-08-11 | [lgtm]: add uuid-dev to lgtm prepare (#112) (HEAD -> 202205) [Jing Zhang]
* bd1b7f0 2022-08-11 | Adjust `DbInterfaceRaceConditionCheck` to Wait Longer for Handlers to be executed (#111) (HEAD -> 202205, github/202205) [Jing Zhang]
* e9dc6b2 2022-08-11 | Backoff mux probing for server down scenario (#106) [Jing Zhang]
* 0d61171 2022-08-09 | Fix race condition caused by strand `wrap` method (#104) [Jing Zhang]
* e9ede7d 2022-07-02 | Enforce switch after config mux to active (#95) [Longxiang Lyu]
* 15dbc30 2022-06-30 | Add unittest to verify mux toggle active (#94) [Longxiang Lyu]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
skbarista pushed a commit to skbarista/sonic-buildimage that referenced this pull request Aug 17, 2022
…submodule head (sonic-net#11705)

Kernel:
* 86c4b66 2022-07-28 | [Mellanox] Add new kernel patches from HW-MGMT package V.7.0020.3005 (sonic-net#287) (HEAD -> 202205) [Kebo Liu]
* 3a8416a 2022-07-05 | [patch] mlxsw: i2c: Prevent transaction execution for special chip (sonic-net#279) [Stepan Blyshchak]

swss:
* 3f69944 2022-08-10 | Set internal class state to reflect the actual state (sonic-net#2410) (HEAD -> 202205, tag: foo) [Prince Sunny]
* 87e98eb 2022-08-09 | [portsorch] Expose supported FEC modes to STABE_DB and check whether FEC mode is supported before setting it (sonic-net#2400) [Stephen Sun]
* e71ab99 2022-07-29 | portsorch: initial support for link-training (sonic-net#2359) [Dante (Kuo-Jung) Su]
* ed5e5be 2022-07-08 | Port configuration incremental update support (sonic-net#2305) [Junchao-Mellanox]

utilities:
* 0df3ba8 2022-08-12 | Revert "Improve the way to check port type of RJ45 port (sonic-net#2249)" (HEAD -> 202205) [Ying Xie]
* 9b21903 2022-08-12 | Fix test failure in dump table test in 202205 (sonic-net#2307) (HEAD -> 202205, github/202205) [Stephen Sun]
* 750d1db 2022-08-11 | Convert IPv6 addresses to lowercase in apply-patch (sonic-net#2299) (HEAD -> 202205) [dbarashinvd]
* 555947e 2022-08-09 | [config][muxcable] add support to enable/disable ycable telemetry (sonic-net#2297) [vdahiya12]
* 978f416 2022-08-09 | Fix GCU bug when backend service modifying config (sonic-net#2295) [jingwenxie]
* 8fed381 2022-08-02 | [intfutil] Check whether the FEC mode is supported on the platform before configuring it to CONFIG_DB (sonic-net#2223) (github/202205) [Stephen Sun]
* a1a09e4 2022-07-29 | Improve the way to check port type of RJ45 port (sonic-net#2249) [Stephen Sun]
* 9bdbfb8 2022-05-19 | sonic-utils: initial support for link-training (sonic-net#2071) [Dante (Kuo-Jung) Su]
* c088ec4 2022-08-10 | Support to enable fips for the command sonic_installer (sonic-net#2154) (sonic-net#2303) [xumia]

platform-daemon:
* 767cfb6 2022-08-09 | [ycabled] add capability to enable/disable telemetry (sonic-net#279) (HEAD -> 202205) [vdahiya12]

linkmgrd:
* cf1ba2b 2022-08-12 | wait for handler to be completed (sonic-net#114) (HEAD -> 202205, github/202205) [Jing Zhang]
* e99026c 2022-08-11 | [lgtm]: add uuid-dev to lgtm prepare (sonic-net#112) (HEAD -> 202205) [Jing Zhang]
* bd1b7f0 2022-08-11 | Adjust `DbInterfaceRaceConditionCheck` to Wait Longer for Handlers to be executed (sonic-net#111) (HEAD -> 202205, github/202205) [Jing Zhang]
* e9dc6b2 2022-08-11 | Backoff mux probing for server down scenario (sonic-net#106) [Jing Zhang]
* 0d61171 2022-08-09 | Fix race condition caused by strand `wrap` method (sonic-net#104) [Jing Zhang]
* e9ede7d 2022-07-02 | Enforce switch after config mux to active (sonic-net#95) [Longxiang Lyu]
* 15dbc30 2022-06-30 | Add unittest to verify mux toggle active (sonic-net#94) [Longxiang Lyu]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
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.

3 participants