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

[syncd.sh] stop pmon ahead of syncd in flows except warm reboot #7

Closed
wants to merge 7 commits into from

Commits on Sep 4, 2019

  1. Configuration menu
    Copy the full SHA
    b1a6adf View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2019

  1. rephase

    Stephen Sun committed Sep 5, 2019
    Configuration menu
    Copy the full SHA
    7517d5e View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2019

  1. [syncd.sh] extract common code out of the if/else/fi

    Stephen Sun committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    5468646 View commit details
    Browse the repository at this point in the history
  2. [syncd.sh] remove unused comments

    Stephen Sun committed Sep 10, 2019
    Configuration menu
    Copy the full SHA
    cce1785 View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2019

  1. [syncd.sh] move "start pmon" out of the "warm reboot != true" conditi…

    …onal branch to fix the issue that pmon not started after warm reboot
    Stephen Sun committed Sep 12, 2019
    Configuration menu
    Copy the full SHA
    226039c View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2019

  1. [syncd.sh,pmon.service] Prevent pmon from starting ahead of syncd

    During system starting, pmon isn't supposed to start ahead of syncd starting in order to avoid racing condition between syncd and pmon.
    Currently it is done by killing pmon if is alive when syncd is starting. However such implementation is still risky. Consider the following flow:
    1. pmon is inactive when syncd.sh is checking. but syncd.sh is scheduled out somehow just ahead of "chipdown" called
    2. systemd is switched in and starts pmon service
    3. at this point, pmon and syncd are running simultaneously, critical section broken and racing condition formed
    To prevent that issue, ony solution is to add syncd as "After" in pmon.service, which ensure that whenever pmon starts syncd has been started.
    However, dong so requires to defer starting pmon.service after syncd.service has fully started otherwise a deadlock is formed as following:
    1. syncd.sh starts pmon ahead of itself fully started, while
    2. pmon not being able to start due to syncd, one of its "After", not fully started.
    3. as a result, syncd and pmon have to wait for each other forever
    To solve that, move starting pmon.service to "wait()" so that pmon is started after syncd fully started, breaking the deadlock.
    Stephen Sun committed Sep 13, 2019
    Configuration menu
    Copy the full SHA
    62509b6 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2019

  1. Merge pull request #8 from stephenxs/pmon-dependency-syncd-defer-pmon…

    …-start
    
    [syncd.sh,pmon.service] Prevent pmon from starting ahead of syncd
    stephenxs authored Sep 19, 2019
    Configuration menu
    Copy the full SHA
    d5376e3 View commit details
    Browse the repository at this point in the history