-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Use monotonic time or modify the process.py script? #218
Comments
@jleveque , i remember we have address this issue by patching supervisord, can you confirm? |
@lguohan: Yes, this is a supervisor issue and should have been addressed by my patch from January: sonic-net/sonic-buildimage#1311. @ryan44guo: Are you building SONiC from the latest source code? |
hi all, |
@ryan44guo , thanks for the feedback. you mentioned the monotonic time, how can we get it in python? Any idea? |
@lguohan , i am not familiar with python, but i think python should have some libs about monotonic time, although maybe it is not the default libs. there is an URL https://pypi.org/project/monotonic/ about it, maybe someone familiar with python can use it? Or, i have seen some codes on github, but i do not know which one is better. |
The maintainer of Supervisor wasn't happy with the way https://pypi.org/project/monotonic/ implements monotonic time for Python2, so he wasn't willing to use that library. I found and fixed what I believe was the last remaining issue with clock rollback here: sonic-net/sonic-buildimage#2624 My changes were also merged into upstream Supervisor here: Supervisor/supervisor#1047 I am closing this issue for now. Please reopen if you see the issue again in the future. |
|
Hi,
We meet a problem when starting.
When syncd starting and enter RUNNING state, the start.sh should exit almost immediately. But between the two events, the time changed by ntpd. so when the process.py run the code to exit the process, it find it quit too quickly, but its state is not STARTING (but RUNNING), so asserted.
In my opinion, in SONIC system, we should use monotonic time to control the interval-related process, maybe standarnd python library do not have it? although it seems not a difficult problem, we can install it if needed. I think it is not an isolation problem.
Of course, if we only deal with this question, we can modify the process.py, i.e, not assert the state to STARTING.
Hope to know the thought of the writer: What is your opinion about it?
The text was updated successfully, but these errors were encountered: