Update ocf resource agent, pacemaker and systemd notes.

This commit is contained in:
2022-02-06 20:12:32 +01:00
parent f289a46857
commit 2e5bf7d1a7
3 changed files with 16 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
:PROPERTIES: :PROPERTIES:
:ID: 7a81bb2d-a6cf-4a2d-8308-0de97fab1856 :ID: 7a81bb2d-a6cf-4a2d-8308-0de97fab1856
:mtime: 20220111174057 :mtime: 20220130132903
:ctime: 20220110091205 :ctime: 20220110091205
:END: :END:
#+title: OCF resource agent #+title: OCF resource agent
@@ -20,13 +20,11 @@
#+BEGIN_SRC shell #+BEGIN_SRC shell
apt-get install resource-agents apt-get install resource-agents
#+END_SRC #+END_SRC
* Pour tester la conformité d'un ~resource-agent~ créé : * Tester la conformité d'un ~resource-agent~ créé :
#+BEGIN_SRC shell #+BEGIN_SRC shell
ocf-tester -n <nom du resource-agent> <chemin vers le script du resource agent> ocf-tester -n <nom du resource-agent> <chemin vers le script du resource agent>
#+END_SRC #+END_SRC
* A installer dans le répertoire ~/usr/lib/ocf/resource.d/<provider>/~ pour créer une nouvelle ressource:
* A installer dans le répertoire ~/usr/lib/ocf/resource.d/<provider>/~ du noeud concerné
* Pour créer une nouvelle ressource:
#+BEGIN_SRC shell #+BEGIN_SRC shell
sudo pcs resource create <id de la resource> [<standard>:[<provider>:]]<type> sudo pcs resource create <id de la resource> [<standard>:[<provider>:]]<type>
#+END_SRC #+END_SRC

View File

@@ -1,6 +1,6 @@
:PROPERTIES: :PROPERTIES:
:ID: 012e07b1-e12a-46e9-9a26-a93cde8b92ce :ID: 012e07b1-e12a-46e9-9a26-a93cde8b92ce
:mtime: 20220117112848 :mtime: 20220130133509
:ctime: 20220117112616 :ctime: 20220117112616
:END: :END:
#+title: Pacemaker #+title: Pacemaker
@@ -10,3 +10,6 @@
#+BEGIN_SRC shell #+BEGIN_SRC shell
crm_simulate -sL crm_simulate -sL
#+END_SRC #+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]]

View File

@@ -1,6 +1,6 @@
:PROPERTIES: :PROPERTIES:
:ID: af912c20-4752-44ba-bdc0-99451ac0cd10 :ID: af912c20-4752-44ba-bdc0-99451ac0cd10
:mtime: 20220117200052 :mtime: 20220130135731
:ctime: 20220117184604 :ctime: 20220117184604
:END: :END:
#+title: systemd #+title: systemd
@@ -18,7 +18,7 @@
* Tips * 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 : * Ajouter les contraintes suivantes à l'/unit/ à déclencher :
#+BEGIN_SRC shell #+BEGIN_SRC shell
[Unit] [Unit]
@@ -35,6 +35,13 @@ ExecStart=/lib/systemd/systemd-networkd-wait-online -i <interface>:routable
EOF EOF
systemctl enable systemd-networkd-wait-online.service systemctl enable systemd-networkd-wait-online.service
#+END_SRC #+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 * Références
* [[https://fr.wikipedia.org/wiki/Systemd][Wikipedia]] * [[https://fr.wikipedia.org/wiki/Systemd][Wikipedia]]