Commit 2755b7d5 authored by Thomas Lavocat's avatar Thomas Lavocat
Browse files

Update tests to follow master changes

parent 3b5b61eb
......@@ -8,94 +8,95 @@ processor start
v1 is init
b4 is init
v2 is init
v3 is init
b2 is running
b1 is running
g1 is running
---------- A--1 ----------
-> Task : b2
A--1 stdout : /home/faquin
A--1 status : A--1: pwd (2964): status > Exited with status 0
A--1 status : A--1: pwd (6154): status > Exited with status 0
---------- B--1 ----------
-> Task : b2
B--1 stdout : /home/faquin
B--1 status : B--1: pwd (2965): status > Exited with status 0
B--1 status : B--1: pwd (6155): status > Exited with status 0
---------- B--1 ----------
-> Task : b1
B--1 stdout : 18:07:53 up 2 days, 3:34, 1 user, load average: 0,51, 0,40, 0,47
B--1 status : B--1: uptime (2966): status > Exited with status 0
B--1 stdout : 18:56:21 up 1 day, 9:13, 1 user, load average: 0,33, 0,11, 0,05
B--1 status : B--1: uptime (6156): status > Exited with status 0
---------- A--1 ----------
-> Task : b1
A--1 stdout : 18:07:53 up 2 days, 3:34, 1 user, load average: 0,51, 0,40, 0,47
A--1 status : A--1: uptime (2967): status > Exited with status 0
A--1 stdout : 18:56:21 up 1 day, 9:13, 1 user, load average: 0,33, 0,11, 0,05
A--1 status : A--1: uptime (6157): status > Exited with status 0
b1 is done
---------- A--1 ----------
-> Task : b2
A--1 stderr : Can't exec "pouet": Aucun fichier ou dossier de ce type at /usr/bin/taktuk line 3108.
A--1 stderr : Exec failed : No such file or directory at /usr/bin/taktuk line 3108.
A--1 status : A--1: pouet (2968): status > Exited with status 512
A--1 status : A--1: pouet (6158): status > Exited with status 512
---------- B--1 ----------
-> Task : b2
B--1 stderr : Can't exec "pouet": Aucun fichier ou dossier de ce type at /usr/bin/taktuk line 3108.
B--1 stderr : Exec failed : No such file or directory at /usr/bin/taktuk line 3108.
B--1 status : B--1: pouet (2969): status > Exited with status 512
B--1 status : B--1: pouet (6159): status > Exited with status 512
b3 is running
b2 is error
---------- A--1 ----------
-> Task : b3
A--1 stdout : Sys. de fichiers blocs de 1K Utilisé Disponible Uti% Monté sur
A--1 stdout : /dev/mapper/bigpanda--vg-root 23897936 21299176 1361768 94% /
A--1 stdout : udev 16239188 0 16239188 0% /dev
A--1 stdout : tmpfs 16253896 76 16253820 1% /dev/shm
A--1 stdout : tmpfs 3250780 26536 3224244 1% /run
A--1 stdout : tmpfs 5120 4 5116 1% /run/lock
A--1 stdout : tmpfs 16253896 0 16253896 0% /sys/fs/cgroup
A--1 stdout : /dev/nvme0n1p2 241965 105629 123844 47% /boot
A--1 stdout : /dev/nvme0n1p1 523248 148 523100 1% /boot/efi
A--1 stdout : /dev/mapper/bigpanda--vg-var 14707028 12450832 1544488 89% /var
A--1 stdout : /dev/mapper/bigpanda--vg-tmp 12208768 18892 11657248 1% /tmp
A--1 stdout : /dev/mapper/bigpanda--vg-home 232478816 154474992 66549036 70% /home
A--1 stdout : tmpfs 3250776 28 3250748 1% /run/user/1000
A--1 status : A--1: df (2970): status > Exited with status 0
---------- B--1 ----------
-> Task : b3
B--1 stdout : Sys. de fichiers blocs de 1K Utilisé Disponible Uti% Monté sur
B--1 stdout : /dev/mapper/bigpanda--vg-root 23897936 21299176 1361768 94% /
B--1 stdout : udev 16239188 0 16239188 0% /dev
B--1 stdout : tmpfs 16253896 76 16253820 1% /dev/shm
B--1 stdout : tmpfs 3250780 26536 3224244 1% /run
B--1 stdout : udev 16238836 0 16238836 0% /dev
B--1 stdout : tmpfs 3250760 99772 3150988 4% /run
B--1 stdout : /dev/mapper/bigpanda--vg-root 29058852 25905740 1714280 94% /
B--1 stdout : tmpfs 16253796 8 16253788 1% /dev/shm
B--1 stdout : tmpfs 5120 4 5116 1% /run/lock
B--1 stdout : tmpfs 16253896 0 16253896 0% /sys/fs/cgroup
B--1 stdout : /dev/nvme0n1p2 241965 105629 123844 47% /boot
B--1 stdout : tmpfs 16253796 0 16253796 0% /sys/fs/cgroup
B--1 stdout : /dev/nvme0n1p2 241965 80019 149454 35% /boot
B--1 stdout : /dev/nvme0n1p1 523248 148 523100 1% /boot/efi
B--1 stdout : /dev/mapper/bigpanda--vg-var 14707028 12450832 1544488 89% /var
B--1 stdout : /dev/mapper/bigpanda--vg-tmp 12208768 18892 11657248 1% /tmp
B--1 stdout : /dev/mapper/bigpanda--vg-home 232478816 154474992 66549036 70% /home
B--1 stdout : tmpfs 3250776 28 3250748 1% /run/user/1000
B--1 status : B--1: df (2971): status > Exited with status 0
B--1 stdout : /dev/mapper/bigpanda--vg-tmp 12208768 26460 11649680 1% /tmp
B--1 stdout : /dev/mapper/bigpanda--vg-var 14707028 3121364 10873956 23% /var
B--1 stdout : /dev/mapper/bigpanda--vg-home 253121256 231903684 8933448 97% /home
B--1 stdout : tmpfs 3250756 16 3250740 1% /run/user/1000
B--1 status : B--1: df (6161): status > Exited with status 0
---------- A--1 ----------
-> Task : b3
A--1 stdout : Linux bigpanda 4.14.0-3-amd64 #1 SMP Debian 4.14.13-1 (2018-01-14) x86_64 GNU/Linux
A--1 status : A--1: uname -a (2972): status > Exited with status 0
---------- B--1 ----------
A--1 stdout : Sys. de fichiers blocs de 1K Utilisé Disponible Uti% Monté sur
A--1 stdout : udev 16238836 0 16238836 0% /dev
A--1 stdout : tmpfs 3250760 99772 3150988 4% /run
A--1 stdout : /dev/mapper/bigpanda--vg-root 29058852 25905740 1714280 94% /
A--1 stdout : tmpfs 16253796 8 16253788 1% /dev/shm
A--1 stdout : tmpfs 5120 4 5116 1% /run/lock
A--1 stdout : tmpfs 16253796 0 16253796 0% /sys/fs/cgroup
A--1 stdout : /dev/nvme0n1p2 241965 80019 149454 35% /boot
A--1 stdout : /dev/nvme0n1p1 523248 148 523100 1% /boot/efi
A--1 stdout : /dev/mapper/bigpanda--vg-tmp 12208768 26460 11649680 1% /tmp
A--1 stdout : /dev/mapper/bigpanda--vg-var 14707028 3121364 10873956 23% /var
A--1 stdout : /dev/mapper/bigpanda--vg-home 253121256 231903684 8933448 97% /home
A--1 stdout : tmpfs 3250756 16 3250740 1% /run/user/1000
A--1 status : A--1: df (6160): status > Exited with status 0
---------- A--1 ----------
-> Task : b3
B--1 stdout : Linux bigpanda 4.14.0-3-amd64 #1 SMP Debian 4.14.13-1 (2018-01-14) x86_64 GNU/Linux
B--1 status : B--1: uname -a (2973): status > Exited with status 0
A--1 stdout : Linux bigpanda 4.16.0-2-amd64 #1 SMP Debian 4.16.12-1 (2018-05-27) x86_64 GNU/Linux
A--1 status : A--1: uname -a (6162): status > Exited with status 0
---------- B--1 ----------
-> Task : b3
B--1 stdout : mercredi 31 janvier 2018, 18:07:53 (UTC+0100)
B--1 status : B--1: date (2975): status > Exited with status 0
B--1 stdout : Linux bigpanda 4.16.0-2-amd64 #1 SMP Debian 4.16.12-1 (2018-05-27) x86_64 GNU/Linux
B--1 status : B--1: uname -a (6163): status > Exited with status 0
---------- A--1 ----------
-> Task : b3
A--1 stdout : mercredi 31 janvier 2018, 18:07:53 (UTC+0100)
A--1 status : A--1: date (2974): status > Exited with status 0
---------- A--1 ----------
A--1 stdout : mardi 12 juin 2018, 18:56:21 (UTC+0200)
A--1 status : A--1: date (6164): status > Exited with status 0
---------- B--1 ----------
-> Task : b3
A--1 stdout : mercredi 31 janvier 2018, 18:07:54 (UTC+0100)
A--1 status : A--1: date (2977): status > Exited with status 0
B--1 stdout : mardi 12 juin 2018, 18:56:21 (UTC+0200)
B--1 status : B--1: date (6165): status > Exited with status 0
---------- B--1 ----------
-> Task : b3
B--1 stdout : mercredi 31 janvier 2018, 18:07:54 (UTC+0100)
B--1 status : B--1: date (2976): status > Exited with status 0
B--1 stdout : mardi 12 juin 2018, 18:56:21 (UTC+0200)
B--1 status : B--1: date (6166): status > Exited with status 0
---------- A--1 ----------
-> Task : b3
A--1 stdout : mardi 12 juin 2018, 18:56:21 (UTC+0200)
A--1 status : A--1: date (6167): status > Exited with status 0
b3 is done
shutdown socket wrapper
g2 is init
......@@ -104,55 +105,57 @@ shutdown socket wrapper
g3 is running
v1 is running
g2 is running
---------- v1 A-1 ----------
---------- v1 A-3 ----------
-> Task : v1
v1 A-1 stderr : Can't exec "nono": Aucun fichier ou dossier de ce type at /usr/bin/taktuk line 3108.
v1 A-1 stderr : Exec failed : No such file or directory at /usr/bin/taktuk line 3108.
v1 A-1 status : A-1: nono (3066): status > Exited with status 512
---------- v1 A-4 ----------
v1 A-3 stderr : Can't exec "nono": Aucun fichier ou dossier de ce type at /usr/bin/taktuk line 3108.
v1 A-3 stderr : Exec failed : No such file or directory at /usr/bin/taktuk line 3108.
v1 A-3 status : A-3: nono (6238): status > Exited with status 512
---------- v1 A-1 ----------
-> Task : v1
v1 A-4 stdout : 18:07:55 up 2 days, 3:34, 1 user, load average: 0,51, 0,40, 0,47
v1 A-4 status : A-4: uptime (3067): status > Exited with status 0
v1 A-1 stdout : 18:56:22 up 1 day, 9:13, 1 user, load average: 0,33, 0,11, 0,05
v1 A-1 status : A-1: uptime (6239): status > Exited with status 0
---------- v1 A-2 ----------
-> Task : v1
v1 A-2 stdout : 18:07:55 up 2 days, 3:34, 1 user, load average: 0,51, 0,40, 0,47
v1 A-2 status : A-2: uptime (3068): status > Exited with status 0
v1 A-2 stdout : 18:56:22 up 1 day, 9:13, 1 user, load average: 0,33, 0,11, 0,05
v1 A-2 status : A-2: uptime (6240): status > Exited with status 0
---------- v1 A-4 ----------
-> Task : v1
v1 A-4 stdout : 18:56:22 up 1 day, 9:13, 1 user, load average: 0,33, 0,11, 0,05
v1 A-4 status : A-4: uptime (6241): status > Exited with status 0
---------- v1 A-3 ----------
-> Task : v1
v1 A-3 stdout : 18:07:55 up 2 days, 3:34, 1 user, load average: 0,51, 0,40, 0,47
v1 A-3 status : A-3: uptime (3069): status > Exited with status 0
v1 A-3 stdout : 18:56:22 up 1 day, 9:13, 1 user, load average: 0,33, 0,11, 0,05
v1 A-3 status : A-3: uptime (6242): status > Exited with status 0
---------- v1 A-1 ----------
-> Task : v1
v1 A-1 stdout : 18:07:55 up 2 days, 3:34, 1 user, load average: 0,51, 0,40, 0,47
v1 A-1 status : A-1: uptime (3070): status > Exited with status 0
---------- v1 A-4 ----------
-> Task : v1
v1 A-4 stdout : 18:07:55 up 2 days, 3:34, 1 user, load average: 0,51, 0,40, 0,47
v1 A-4 status : A-4: uptime (3071): status > Exited with status 0
v1 A-1 stdout : 18:56:23 up 1 day, 9:13, 1 user, load average: 0,33, 0,11, 0,05
v1 A-1 status : A-1: uptime (6243): status > Exited with status 0
---------- v1 A-2 ----------
-> Task : v1
v1 A-2 stdout : 18:07:55 up 2 days, 3:34, 1 user, load average: 0,51, 0,40, 0,47
v1 A-2 status : A-2: uptime (3072): status > Exited with status 0
---------- v1 A-3 ----------
v1 A-2 stdout : 18:56:23 up 1 day, 9:13, 1 user, load average: 0,33, 0,11, 0,05
v1 A-2 status : A-2: uptime (6244): status > Exited with status 0
---------- v1 A-4 ----------
-> Task : v1
v1 A-3 stdout : 18:07:55 up 2 days, 3:34, 1 user, load average: 0,51, 0,40, 0,47
v1 A-3 status : A-3: uptime (3073): status > Exited with status 0
---------- v1 A-1 ----------
v1 A-4 stdout : 18:56:23 up 1 day, 9:13, 1 user, load average: 0,33, 0,11, 0,05
v1 A-4 status : A-4: uptime (6245): status > Exited with status 0
---------- v1 A-3 ----------
-> Task : v1
v1 A-1 stdout : 18:07:55 up 2 days, 3:34, 1 user, load average: 0,51, 0,40, 0,47
v1 A-1 status : A-1: uptime (3074): status > Exited with status 0
v1 A-3 stdout : 18:56:23 up 1 day, 9:13, 1 user, load average: 0,33, 0,11, 0,05
v1 A-3 status : A-3: uptime (6246): status > Exited with status 0
b4 is running
v1 is done
shutdown socket wrapper
g2 is done
v2 is running
v3 is canceled
b4 is timeout
---------- v2 A-1 ----------
-> Task : v2
v2 A-1 stdout : timeout
v2 A-1 status : A-1: echo timeout (3079): status > Exited with status 0
v2 A-1 status : A-1: echo timeout (6252): status > Exited with status 0
v2 is done
shutdown socket wrapper
g3 is done
shutdown socket wrapper
shutdown socket wrapper
g3 !!!!!!!!!!! invalid transition asked 80
......@@ -9,6 +9,8 @@ from yggdrasil.task_lib import SerialBroadcaster
from yggdrasil.task_lib import ParrallelBroadcaster
from yggdrasil.task_lib import Ventilator
from yggdrasil.task_lib import TaskProcessor
from yggdrasil.task_lib import Dependency
from yggdrasil.task_lib import DependencyEvent
class Sample(TaskProcessor):
def __init__(self, erebor, ID, node_list, tfile=None):
......@@ -17,8 +19,21 @@ class Sample(TaskProcessor):
def register_tasks(self) :
g1 = Group("g1", "g1", "nonexistingcomputernowhere", "0", "root")
g2 = Group("g2", "g2", "A,A,A,A", "0", "root")
g2.add_dependency_for_transition(consts.IDLE_INIT, consts.INIT_RUNNING, g1)
g2.add_trigger_for_transition(consts.IDDLE_CANCEL, consts.INIT_ERROR, g1)
g2.set_dependency_for_transition(
consts.IDLE_INIT,
Dependency(
Dependency.AND,
[DependencyEvent(g1, consts.INIT_RUNNING)]
)
)
g2.set_trigger_for_transition(
consts.IDDLE_CANCEL,
Dependency(
Dependency.AND,
[DependencyEvent(g1, consts.INIT_ERROR)]
)
)
self.tasks.append(g1)
self.tasks.append(g2)
......
......@@ -6,6 +6,8 @@ from yggdrasil.erebor import runner
from yggdrasil.task_lib import MPIJail
from yggdrasil.task_lib import MPIExecutor
from yggdrasil.task_lib import TaskProcessor
from yggdrasil.task_lib import Dependency
from yggdrasil.task_lib import DependencyEvent
class Sample(TaskProcessor):
def __init__(self, erebor, ID, node_list, tfile=None):
......@@ -17,7 +19,13 @@ class Sample(TaskProcessor):
server_jail = MPIExecutor('server_jail',
os.environ["PWD"]+"/c_wrapper/server -C {}".format(nb_clients),
g1, True)
server_jail.add_dependency_for_transition(consts.INIT_RUNNING, consts.INIT_RUNNING, g1)
server_jail.set_dependency_for_transition(
consts.INIT_RUNNING,
Dependency(
Dependency.AND,
[DependencyEvent(g1, consts.INIT_RUNNING)]
)
)
self.tasks.append(g1)
self.tasks.append(server_jail)
for i in range(0, nb_clients) :
......@@ -25,8 +33,20 @@ class Sample(TaskProcessor):
client_jail = MPIExecutor("mpi_executor{}".format(i),
os.environ["PWD"]+"/c_wrapper/client -R 1 -S {}".format("server"),
gc,True)
gc.add_dependency_for_transition(consts.IDLE_INIT, consts.INIT_RUNNING, server_jail)
client_jail.add_dependency_for_transition(consts.IDLE_INIT, consts.INIT_RUNNING, gc)
gc.set_dependency_for_transition(
consts.IDLE_INIT,
Dependency(
Dependency.AND,
[DependencyEvent(server_jail, consts.INIT_RUNNING)]
)
)
client_jail.set_dependency_for_transition(
consts.IDLE_INIT,
Dependency(
Dependency.AND,
[DependencyEvent(gc, consts.INIT_RUNNING)]
)
)
self.tasks.append(gc)
self.tasks.append(client_jail)
......
......@@ -9,6 +9,8 @@ from yggdrasil.task_lib import SerialBroadcaster
from yggdrasil.task_lib import ParrallelBroadcaster
from yggdrasil.task_lib import Ventilator
from yggdrasil.task_lib import TaskProcessor
from yggdrasil.task_lib import Dependency
from yggdrasil.task_lib import DependencyEvent
class Sample(TaskProcessor):
def __init__(self, erebor, ID, node_list, tfile=None):
......@@ -17,54 +19,146 @@ class Sample(TaskProcessor):
def register_tasks(self) :
g1 = Group("g1", "g1", "A,B", "0", "root")
b1 = Broadcaster("b1", "uptime", g1)
b1.add_dependency_for_transition(consts.INIT_RUNNING, consts.INIT_RUNNING, g1)
b1.set_dependency_for_transition(
consts.INIT_RUNNING,
Dependency(
Dependency.AND,
[DependencyEvent(g1, consts.INIT_RUNNING)]
)
)
self.tasks.append(g1)
self.tasks.append(b1)
### serial broadcast after b1 on g1
b2 = SerialBroadcaster("b2", ["pouet", "pwd"], g1)
b2.add_dependency_for_transition(consts.INIT_RUNNING, consts.INIT_RUNNING, b1)
b2.set_dependency_for_transition(
consts.INIT_RUNNING,
Dependency(
Dependency.AND,
[DependencyEvent(b1, consts.INIT_RUNNING)]
)
)
self.tasks.append(b2)
# parallel broadcast after b2 on g1
b3 = ParrallelBroadcaster("b3", ["df", "uname -a", "date", "date"], g1, True)
b3.add_dependency_for_transition(consts.INIT_RUNNING,
consts.RUNNING_ERROR, b2)
b3.set_dependency_for_transition(
consts.INIT_RUNNING,
Dependency(
Dependency.AND,
[DependencyEvent(b2, consts.RUNNING_ERROR)]
)
)
self.tasks.append(b3)
g2 = NumberedGroup("g2", "g2", "A,A,A,A", "0", "root")
g2.add_dependency_for_transition(consts.IDLE_INIT, consts.RUNNING_DONE, g1)
g2.set_dependency_for_transition(
consts.IDLE_INIT,
Dependency(
Dependency.AND,
[DependencyEvent(g1, consts.RUNNING_DONE)]
)
)
self.tasks.append(g2)
## ventilator while b3 on g2
v1 = Ventilator("v1", ["uptime", "uptime", "uptime", "uptime", "uptime",
"uptime", "uptime", "uptime", "nono"], g2,True, -1, 1)
v1.add_dependency_for_transition(consts.INIT_RUNNING, consts.INIT_RUNNING, g2)
v1.set_dependency_for_transition(
consts.INIT_RUNNING,
Dependency(
Dependency.AND,
[DependencyEvent(g2, consts.INIT_RUNNING)]
)
)
self.tasks.append(v1)
## On a new group g3
g3 = NumberedGroup("g3", "g3", "A", "0", "root")
g3.add_dependency_for_transition(consts.IDLE_INIT, consts.RUNNING_DONE, g1)
g3.set_dependency_for_transition(
consts.IDLE_INIT,
Dependency(
Dependency.AND,
[DependencyEvent(g1, consts.RUNNING_DONE)]
)
)
self.tasks.append(g3)
## broadcast that can timeout after v1 done
b4 = Broadcaster("b4", "sleep 2", g3, False, 1)
b4.add_dependency_for_transition(consts.INIT_RUNNING, consts.RUNNING_DONE, v1)
b4.set_dependency_for_transition(
consts.INIT_RUNNING,
Dependency(
Dependency.AND,
[DependencyEvent(v1, consts.RUNNING_DONE)]
)
)
self.tasks.append(b4)
## ventilator executed if b4 timeout, canceled otherwise
v2 = Ventilator("v2", ["echo timeout"], g3, True)
v2.add_dependency_for_transition(consts.INIT_RUNNING, consts.RUNNING_TIMEOUT, b4)
v2.add_dependency_for_transition(consts.INIT_CANCELED, consts.RUNNING_DONE, b4)
v2.set_dependency_for_transition(
consts.INIT_RUNNING,
Dependency(
Dependency.AND,
[
DependencyEvent(b4, consts.RUNNING_TIMEOUT),
]
)
)
v2.set_trigger_for_transition(
consts.INIT_CANCELED,
Dependency(
Dependency.AND,
[
DependencyEvent(b4, consts.RUNNING_DONE),
]
)
)
self.tasks.append(v2)
v3 = Ventilator("v3", ["echo pas de timeout"], g3, True)
v3.set_dependency_for_transition(
consts.INIT_RUNNING,
Dependency(
Dependency.AND,
[
DependencyEvent(b4, consts.RUNNING_DONE),
]
)
)
v3.set_trigger_for_transition(
consts.INIT_CANCELED,
Dependency(
Dependency.AND,
[
DependencyEvent(b4, consts.RUNNING_TIMEOUT),
]
)
)
self.tasks.append(v3)
g3.set_dependency_for_transition(
consts.RUNNING_DONE,
Dependency(
Dependency.OR,
[
Dependency(
Dependency.AND,
[
DependencyEvent(v2, consts.INIT_CANCELED),
DependencyEvent(v3, consts.RUNNING_DONE)
]
),
Dependency(
Dependency.AND,
[
DependencyEvent(v2, consts.RUNNING_DONE),
DependencyEvent(v3, consts.INIT_CANCELED)
]
)
]
)
)
## ventilator executed if b4 is done, canceled otherwise
#v3 = Ventilator("v3", ["echo pas de timeout"], g3, False)
#v3.add_dependency_conjunction({b4:consts.DONE}, True)
#v3.add_dependency_conjunction({b4:consts.TIMEOUT}, False)
## g3 canceled, after done of v2 or v3 (way to reduce)
#g3.add_dependency_conjunction({v2:consts.DONE}, False)
#g3.add_dependency_conjunction({v3:consts.DONE}, False)
## append all tasks to the list
#self.tasks.append(v3)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment