From 2e5bf7d1a72d7db2137fabda39d52b5c4d6dbc74 Mon Sep 17 00:00:00 2001 From: Adrien Date: Sun, 6 Feb 2022 20:12:32 +0100 Subject: [PATCH] Update ocf resource agent, pacemaker and systemd notes. --- 20220110091205-ocf_resource_agent.org | 8 +++----- 20220117112616-pacemaker.org | 5 ++++- 20220117184604-systemd.org | 11 +++++++++-- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/20220110091205-ocf_resource_agent.org b/20220110091205-ocf_resource_agent.org index 6e8fd9f..1743e02 100644 --- a/20220110091205-ocf_resource_agent.org +++ b/20220110091205-ocf_resource_agent.org @@ -1,6 +1,6 @@ :PROPERTIES: :ID: 7a81bb2d-a6cf-4a2d-8308-0de97fab1856 -:mtime: 20220111174057 +:mtime: 20220130132903 :ctime: 20220110091205 :END: #+title: OCF resource agent @@ -20,13 +20,11 @@ #+BEGIN_SRC shell apt-get install resource-agents #+END_SRC - * Pour tester la conformité d'un ~resource-agent~ créé : + * Tester la conformité d'un ~resource-agent~ créé : #+BEGIN_SRC shell ocf-tester -n #+END_SRC - - * A installer dans le répertoire ~/usr/lib/ocf/resource.d//~ du noeud concerné - * Pour créer une nouvelle ressource: + * A installer dans le répertoire ~/usr/lib/ocf/resource.d//~ pour créer une nouvelle ressource: #+BEGIN_SRC shell sudo pcs resource create [:[:]] #+END_SRC diff --git a/20220117112616-pacemaker.org b/20220117112616-pacemaker.org index eed4ff8..32768fb 100644 --- a/20220117112616-pacemaker.org +++ b/20220117112616-pacemaker.org @@ -1,6 +1,6 @@ :PROPERTIES: :ID: 012e07b1-e12a-46e9-9a26-a93cde8b92ce -:mtime: 20220117112848 +:mtime: 20220130133509 :ctime: 20220117112616 :END: #+title: Pacemaker @@ -10,3 +10,6 @@ #+BEGIN_SRC shell crm_simulate -sL #+END_SRC + +* Références + * [[https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_high_availability_clusters/index][Configuring and managing high availability clusters - Red Hat]] diff --git a/20220117184604-systemd.org b/20220117184604-systemd.org index e01d91b..3433082 100644 --- a/20220117184604-systemd.org +++ b/20220117184604-systemd.org @@ -1,6 +1,6 @@ :PROPERTIES: :ID: af912c20-4752-44ba-bdc0-99451ac0cd10 -:mtime: 20220117200052 +:mtime: 20220130135731 :ctime: 20220117184604 :END: #+title: systemd @@ -18,7 +18,7 @@ * Tips -** Pour déclencher le démarrage d'une /unit/ une fois une @IP obtenue sur une interface +** Déclencher le démarrage d'une /unit/ une fois une @IP obtenue sur une interface * Ajouter les contraintes suivantes à l'/unit/ à déclencher : #+BEGIN_SRC shell [Unit] @@ -35,6 +35,13 @@ ExecStart=/lib/systemd/systemd-networkd-wait-online -i :routable EOF systemctl enable systemd-networkd-wait-online.service #+END_SRC +** Vérifier qu'un service est en cours d'exécution +#+BEGIN_SRC shell +systemctl is-active --quiet systemd-networkd.service && echo Service is running +#+END_SRC + +#+RESULTS: +: Service is running * Références * [[https://fr.wikipedia.org/wiki/Systemd][Wikipedia]]