Rigorous and Reliable (RAR)

Full Version: Service management of Sage - D
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
(05-09-2019 10:37 AM)xwcwt Wrote: [ -> ]Also I feel it will be

Code:
modname = sage
LearnPcf /thinker/etc/soft/$modname/mic.pcf before LearnPcf $base/config.pcf

Update into head-post.

My impression is that the pcf reading does not override earlier values. Because config.pcf has precedence, we should learn config.pcf first, then mic.pcf.
(05-09-2019 10:37 AM)xwcwt Wrote: [ -> ]
(05-08-2019 10:01 PM)lingu Wrote: [ -> ]The sage program begins with the following logic.

Code:
base=current dir
LearnPcf $base/config.pcf
ips=$base/hosts.ips

I suggest we also learn /thinker/etc/soft/sage/mic.pcf but $base/config.pcf take precedence over /thinker/etc/soft/sage/mic.pcf

RR xwcwt

Good to me.

Also I feel it will be

Code:
modname = sage
LearnPcf /thinker/etc/soft/$modname/mic.pcf before LearnPcf $base/config.pcf

Update into head-post.

I guess you added 'Common var input' in the headpost. I think it is too narrow and, if we use such narrorw section topics, the info ortanization would have 20 pieces of pseudocode. I am changing it to 'sage main logic' so that we can add the overall logic of the sage program to it.
(07-12-2016 05:54 PM)YU_Xinjie Wrote: [ -> ]sage main logiccommon var import
Code:
modname = sage
base=current dir
LearnPcf /thinker/etc/soft/$modname/mic.pcf
LearnPcf $base/config.pcf
ips=$base/hosts.ips

also, avoid such hard clash of blocks, such as a title followed by a title, a title followed by a code segment, a code segment followed by a code segment, ...
Add text between titles and other blocks of content.

The sage logic also performs the following and I'll add them to the pseudocode.
Code:
set timeout
parse options
run command
  start
  status
  ps
  tasks
  help
(07-12-2016 05:54 PM)YU_Xinjie Wrote: [ -> ]sage main logiccommon var import

modname = sage
base=current dir
LearnPcf /thinker/etc/soft/$modname/mic.pcf
LearnPcf $base/config.pcf
ips=$base/hosts.ips
set timeout to be half of the number of IPs

Driver: The IP counting is based on 'wc -l $ips'. But $ips may not exist on non-portal.

I suggest we use a plain number 3 if $ips does not exist.

RR xwcwt

xwcwt

(05-09-2019 07:09 PM)lingu Wrote: [ -> ]
(07-12-2016 05:54 PM)YU_Xinjie Wrote: [ -> ]sage main logiccommon var import

modname = sage
base=current dir
LearnPcf /thinker/etc/soft/$modname/mic.pcf
LearnPcf $base/config.pcf
ips=$base/hosts.ips
set timeout to be half of the number of IPs

Driver: The IP counting is based on 'wc -l $ips'. But $ips may not exist on non-portal.

I suggest we use a plain number 3 if $ips does not exist.

RR xwcwt

Good to me.
(07-12-2016 05:54 PM)YU_Xinjie Wrote: [ -> ]sage tasks
cat $sage_base/stdout/tasks_graph.tmp.<timestamp>.

The logic is actually more involved than that. I will outline the logic as follows.
Code:
local tasks_graph_file=$base/stdout/tasks_graph.tmp
while True {
  while True {
    cnt = count ${tasks_graph_file}*;
    sleep 5 if cnt>1 || cnt==0;
    otherwise break;
  }
  check timestamp;
  cat $sage_base/stdout/tasks_graph.tmp.<timestamp>
  update timestamp;
}
driver: we used to rely on a sage awake screen to collect sage tasks result, but that screen runs only on sage_portal. Now we allow non-sage_portal to interact with sage. So we should run 'auntie' to wake up sage before collecting the sage tasks result.

(07-12-2016 05:54 PM)YU_Xinjie Wrote: [ -> ]sage tasks
sage tasks invokes function tasks_sage():
local tasks_graph_file=$base/stdout/tasks_graph.tmp
while True {
while True {

Proposal: add 'auntie' here

Quote: cnt = count ${tasks_graph_file}*;
sleep 5 if cnt>1 || cnt==0;
otherwise break;
}
check timestamp;
cat $sage_base/stdout/tasks_graph.tmp.<timestamp>
update timestamp;
}
[/code]

RR xwcwt
Driver: Sage configuration can be quite complex. It is often convenient to evaluate a var in Sage either on command line or in a program. GLAD has a command 'gladinfo var' or 'glad info var' to read the value of a variable var. But Sage does not have it.

Proposal: add a command 'info' like the 'info' command in glad, an let 'sage info var' report the value of var.

RR zheny

xwcwt

(05-10-2019 07:46 PM)lingu Wrote: [ -> ]driver: we used to rely on a sage awake screen to collect sage tasks result, but that screen runs only on sage_portal. Now we allow non-sage_portal to interact with sage. So we should run 'auntie' to wake up sage before collecting the sage tasks result.

(07-12-2016 05:54 PM)YU_Xinjie Wrote: [ -> ]sage tasks
sage tasks invokes function tasks_sage():
local tasks_graph_file=$base/stdout/tasks_graph.tmp
while True {
while True {

Proposal: add 'auntie' here

Quote: cnt = count ${tasks_graph_file}*;
sleep 5 if cnt>1 || cnt==0;
otherwise break;
}
check timestamp;
cat $sage_base/stdout/tasks_graph.tmp.<timestamp>
update timestamp;
}
[/code]

RR xwcwt

The idea is Good to me. Also I think the auntie call should add before check timestamp. Update first.
(07-12-2016 05:54 PM)YU_Xinjie Wrote: [ -> ]sage tasks
sage tasks invokes function tasks_sage():
Code:
local tasks_graph_file=$base/stdout/tasks_graph.tmp
while True {
  while True {
    cnt = count ${tasks_graph_file}*;
    sleep 5 if cnt>1 || cnt==0;
    otherwise break;
  }
  call auntie ##To wake up sage to collect info in all nodes.
  check timestamp;
  cat $sage_base/stdout/tasks_graph.tmp.<timestamp>
  update timestamp;
}

I'm splitting this info to be a separate thread.
Pages: 1 2 3 4 5 6
Reference URL's