Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Service management of Sage - D
02-02-2018, 04:57 PM
Post: #37
RE: Service management of Sage - OD
(06-02-2017 06:24 PM)YU_Xinjie Wrote:  @lingu Please review.

The driving example: http://tab.d-thinker.org/showthread.php?...9#pid41989
We needs to let sage complains to mayday when sage fails.

The design is as follows:
[quote='YU_Xinjie' pid='11533' dateline='1468313653']
sage start

Start a sage_screen to run script start_sage.
start_sage script looks like this:
Quote:...

do_start() {
./detect_listen.sh &
make run, which would calls `dt run sage-svc $sage_base/config.pcf`
if return non-0 {
.. mayday_msg = "SAGE FATAL EXIT. "

It is okay to write a mayday log message on this case.

[quote]
.. check the stdout log of Sage. If it is because one of the task failure {
.... find the container (DT) log of this task
.... mayday_msg += fetch the task command line from the container log
.. }

But don't parse stdout log. I wonder why we dont have a simpler way.

The idea of mayday log is to simplfy log examination. If a task fails, the task should write something in the mayday log. Then the calling routine's job is to just output mayday log. This avoids parsing think containers' log files.

If think containers dont write mayday log now, we should improve them so that they write mayday log files. If we try to let another program help them write mayday log files, that would be a painful complicated solution.

Quote:.. #Do some clean work
.. kill (clean) the screen session of "sage wake"
.. kill (clean) the screen session of "sage start", namely the current session.
}[/u]
}
...


In many cases, we want to keep those screens for debugging. Pls make the killing of the screens controllable by some options. The default behavior can be to kill the screens, but with some options we should be able to keep the screens upon failure.

Those two screens seem to have the same name. It is very confusing. Pls fix it.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Service management of Sage - D - YU_Xinjie - 07-12-2016, 05:54 PM
RE: Service management of Sage - YU_Xinjie - 09-07-2016, 02:00 PM
RE: Service management of Sage - YU_Xinjie - 09-07-2016, 02:47 PM
RE: Service management of Sage - lingu - 09-07-2016, 03:53 PM
RE: Service management of Sage - YU_Xinjie - 09-07-2016, 04:11 PM
RE: Service management of Sage - lingu - 09-07-2016, 05:06 PM
RE: Service management of Sage - YU_Xinjie - 09-07-2016, 05:18 PM
RE: Service management of Sage - lingu - 09-07-2016, 03:55 PM
RE: Service management of Sage - lingu - 09-07-2016, 03:58 PM
RE: Service management of Sage - lingu - 09-07-2016, 05:35 PM
RE: Service management of Sage - YU_Xinjie - 09-07-2016, 05:53 PM
RE: Service management of Sage - lingu - 09-07-2016, 06:18 PM
RE: Service management of Sage - YU_Xinjie - 09-07-2016, 06:37 PM
RE: Service management of Sage - lingu - 09-07-2016, 06:53 PM
RE: Service management of Sage - YU_Xinjie - 09-08-2016, 04:28 PM
RE: Service management of Sage - lingu - 09-15-2016, 12:49 AM
RE: Service management of Sage - lingu - 09-07-2016, 06:52 PM
RE: Service management of Sage - YU_Xinjie - 09-08-2016, 04:48 PM
RE: Service management of Sage - lingu - 09-15-2016, 12:34 AM
RE: Service management of Sage - YU_Xinjie - 09-18-2016, 03:59 PM
RE: Service management of Sage - lingu - 09-23-2016, 10:41 PM
RE: Service management of Sage - YU_Xinjie - 09-27-2016, 11:33 AM
RE: Service management of Sage - lingu - 09-27-2016, 12:35 PM
RE: Service management of Sage - YU_Xinjie - 09-08-2016, 06:41 PM
RE: Service management of Sage - YU_Xinjie - 09-27-2016, 05:16 PM
RE: Service management of Sage - YU_Xinjie - 09-27-2016, 05:34 PM
RE: Service management of Sage - OMUD - YU_Xinjie - 10-19-2016, 06:37 PM
RE: Service management of Sage - OMUD - YU_Xinjie - 12-06-2016, 12:32 PM
RE: Service management of Sage - OMUD - YU_Xinjie - 12-06-2016, 03:32 PM
RE: Service management of Sage - OMUD - YU_Xinjie - 01-12-2017, 07:05 PM
RE: Service management of Sage - OD - YU_Xinjie - 06-02-2017, 06:24 PM
RE: Service management of Sage - OD - lingu - 02-02-2018 04:57 PM
RE: Service management of Sage - D - lingu - 05-08-2019, 09:55 PM
RE: Service management of Sage - D - lingu - 05-08-2019, 10:01 PM
RE: Service management of Sage - D - xwcwt - 05-09-2019, 10:37 AM
RE: Service management of Sage - D - lingu - 05-09-2019, 06:39 PM
RE: Service management of Sage - D - lingu - 05-09-2019, 06:42 PM
RE: Service management of Sage - D - lingu - 05-09-2019, 06:52 PM
RE: Service management of Sage - D - lingu - 05-09-2019, 07:09 PM
RE: Service management of Sage - D - xwcwt - 05-09-2019, 07:12 PM
RE: Service management of Sage - D - lingu - 05-10-2019, 07:41 PM
RE: Service management of Sage - D - lingu - 05-10-2019, 07:46 PM
RE: Service management of Sage - D - xwcwt - 05-11-2019, 10:14 AM
RE: Service management of Sage - D - lingu - 05-10-2019, 07:56 PM
RE: Service management of Sage - D - lingu - 11-23-2019, 11:48 PM
RE: Service management of Sage - D - zheny - 11-24-2019, 06:09 PM
RE: Service management of Sage - D - xwcwt - 11-25-2019, 03:17 PM
RE: Service management of Sage - D - lingu - 11-23-2019, 11:30 PM

Forum Jump: