From 55b9cf6a1759ed7d1e74b928c1e3a02537f4065b Mon Sep 17 00:00:00 2001
From: wtrabels <weissem.trabelsi@inria.fr>
Date: Mon, 17 Jul 2023 17:30:14 +0200
Subject: [PATCH] docker tutorial

---
 g5k/07_fault_injection_on_processes.ipynb         | 11 ++++++-----
 g5k/08_fault_injection_on_docker_containers.ipynb |  4 ++--
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/g5k/07_fault_injection_on_processes.ipynb b/g5k/07_fault_injection_on_processes.ipynb
index 7128982..9b182c3 100644
--- a/g5k/07_fault_injection_on_processes.ipynb
+++ b/g5k/07_fault_injection_on_processes.ipynb
@@ -36,7 +36,7 @@
     "\n",
     "[Cron](https://man7.org/linux/man-pages/man8/cron.8.html) is a time-based job scheduler in Unix-like operating systems. It allows you to schedule and automate the execution of commands or scripts at specified intervals or specific times. Cron is commonly used for repetitive tasks, system maintenance, and scheduling periodic jobs.\n",
     "\n",
-    "All asynchronous tools shown here are based on cron. Because of that, for each event, the date is of the order of a minute.\n",
+    "All asynchronous tools shown here are based on cron. Because of that, for each event, the date is of the order of a minute and please take not that if a cron job is setup at HH:MM:50 for the minute after, it will be executed at HH:MM+1:00 (only 10 seconds after).\n",
     "\n",
     "\n",
     "[pgrep](https://man7.org/linux/man-pages/man1/pgrep.1.html) is a command-line utility in Unix-like operating systems that is used to search for and list the process IDs (PIDs) of running processes based on certain criteria. It allows you to find processes by their names, command lines, or other attributes.\n",
@@ -561,11 +561,12 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "registry_on_consumers = en.ProcessRegistry()\n",
-    "registry_on_consumers.build(\n",
-    "    \"'python3 /tmp/rabbitmq/consumer.py' | grep -v bin\",\n",
-    "    roles[\"consumer\"]\n",
+    "registry = en.ProcessRegistry()\n",
+    "registry.build(\n",
+    "    \"'python3 /tmp/rabbitmq' | grep -v bin\",\n",
+    "    roles\n",
     ")\n",
+    "registry_on_consumers = registry.lookup(roles[\"consumer\"])\n",
     "print(registry_on_consumers)"
    ]
   },
diff --git a/g5k/08_fault_injection_on_docker_containers.ipynb b/g5k/08_fault_injection_on_docker_containers.ipynb
index 4bcb29b..df48298 100644
--- a/g5k/08_fault_injection_on_docker_containers.ipynb
+++ b/g5k/08_fault_injection_on_docker_containers.ipynb
@@ -38,7 +38,7 @@
     "\n",
     "[Cron](https://man7.org/linux/man-pages/man8/cron.8.html) is a time-based job scheduler in Unix-like operating systems. It allows you to schedule and automate the execution of commands or scripts at specified intervals or specific times. Cron is commonly used for repetitive tasks, system maintenance, and scheduling periodic jobs.\n",
     "\n",
-    "All asynchronous tools shown here are based on cron. Because of that, for each event, the date is of the order of a minute."
+    "All asynchronous tools shown here are based on cron. Because of that, for each event, the date is of the order of a minute and please take not that if a cron job is setup at HH:MM:50 for the minute after, it will be executed at HH:MM+1:00 (only 10 seconds after)."
    ]
   },
   {
@@ -733,7 +733,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 86,
    "metadata": {},
    "outputs": [],
    "source": [
-- 
GitLab