node 1 :
systemctl daemon-reload; systemctl restart gluster_auto_run_vm.service; systemctl status gluster_auto_run_vm.service
● gluster_auto_run_vm.service - Gluster Auto Run VM Service
Loaded: loaded (/etc/systemd/system/gluster_auto_run_vm.service; enabled; preset: enabled)
Active: active (exited) since Wed 2024-09-18 09:24:59 CEST; 10ms ago
Process: 594953 ExecStartPre=/bin/bash -c /usr/local/bin/gluster_auto_heal gfs0 gluster (code=exited, status=0/SUCCESS)
Process: 594970 ExecStart=/bin/bash -c /usr/local/bin/gluster_auto_run_vm (code=exited, status=0/SUCCESS)
Main PID: 594970 (code=exited, status=0/SUCCESS)
CPU: 8.425s
Sep 18 09:24:50 c1 systemd[1]: Starting gluster_auto_run_vm.service - Gluster Auto Run VM Service...
Sep 18 09:24:54 c1 bash[594970]: vmid 995 in gluster is already running
Sep 18 09:24:56 c1 bash[594970]: vmid 990 in gluster is already running
Sep 18 09:24:57 c1 bash[594970]: vmid 998 in gluster is already running
Sep 18 09:24:59 c1 bash[594970]: vmid 800 in gluster is already running
Sep 18 09:24:59 c1 systemd[1]: Finished gluster_auto_run_vm.service - Gluster Auto Run VM Service.
node 2 : (never VMs with glusterFS disk)
gluster_auto_run_vm.service - Gluster Auto Run VM Service
Loaded: loaded (/etc/systemd/system/gluster_auto_run_vm.service; enabled; preset: enabled)
Active: active (exited) since Wed 2024-09-18 09:47:10 CEST; 9ms ago
Process: 699600 ExecStartPre=/bin/bash -c /usr/local/bin/gluster_auto_heal gfs0 gluster (code=exited, status=0/SUCCESS)
Process: 699617 ExecStart=/bin/bash -c /usr/local/bin/gluster_auto_run_vm (code=exited, status=0/SUCCESS)
Main PID: 699617 (code=exited, status=0/SUCCESS)
CPU: 2.520s
Sep 18 09:47:08 c2 systemd[1]: Starting gluster_auto_run_vm.service - Gluster Auto Run VM Service...
Sep 18 09:47:10 c2 systemd[1]: Finished gluster_auto_run_vm.service - Gluster Auto Run VM Service.
Node 3 : (One VM with glusterFS disk and not started)
gluster_auto_run_vm.service - Gluster Auto Run VM Service
Loaded: loaded (/etc/systemd/system/gluster_auto_run_vm.service; enabled; preset: enabled)
Active: active (exited) since Wed 2024-09-18 09:49:42 CEST; 11ms ago
Process: 258138 ExecStartPre=/bin/bash -c /usr/local/bin/gluster_auto_heal gfs0 gluster (code=exited, status=0/SUCCESS)
Process: 258155 ExecStart=/bin/bash -c /usr/local/bin/gluster_auto_run_vm (code=exited, status=0/SUCCESS)
Main PID: 258155 (code=exited, status=0/SUCCESS)
CPU: 4.944s
Sep 18 09:49:36 c3 systemd[1]: Starting gluster_auto_run_vm.service - Gluster Auto Run VM Service...
Sep 18 09:49:40 c3 bash[258155]: vmid 900 in gluster on node c3 is starting.
Sep 18 09:49:41 c3 pvesh[258173]: <root@pam> starting task UPID:c3:0003F080:0052C7E1:66EA8615:qmstart:900:root@pam:
Sep 18 09:49:41 c3 pvesh[258176]: start VM 900: UPID:c3:0003F080:0052C7E1:66EA8615:qmstart:900:root@pam:
Sep 18 09:49:42 c3 pvesh[258173]: <root@pam> end task UPID:c3:0003F080:0052C7E1:66EA8615:qmstart:900:root@pam: OK
Sep 18 09:49:42 c3 bash[258173]: UPID:c3:0003F080:0052C7E1:66EA8615:qmstart:900:root@pam:
Sep 18 09:49:42 c3 systemd[1]: Finished gluster_auto_run_vm.service - Gluster Auto Run VM Service.
Node 3 : After reboot :
Just after reboot :
systemctl status gluster_auto_run_vm.service
systemctl status gluster_auto_run_vm.service
● gluster_auto_run_vm.service - Gluster Auto Run VM Service
Loaded: loaded (/etc/systemd/system/gluster_auto_run_vm.service; enabled; preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Wed 2024-09-18 10:07:22 CEST; 9s ago
Process: 8271 ExecStart=/bin/bash -c /usr/local/bin/gluster_auto_run_vm (code=exited, status=1/FAILURE)
Main PID: 8271 (code=exited, status=1/FAILURE)
CPU: 128ms
/usr/local/bin/gluster_auto_heal gfs0 gluster;echo $?
1
After 10 minutes, the VM 900 is not started :
systemctl status gluster_auto_run_vm.service
● gluster_auto_run_vm.service - Gluster Auto Run VM Service
Loaded: loaded (/etc/systemd/system/gluster_auto_run_vm.service; enabled; preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Wed 2024-09-18 10:17:22 CEST; 9s ago
Process: 8271 ExecStart=/bin/bash -c /usr/local/bin/gluster_auto_run_vm (code=exited, status=1/FAILURE)
Main PID: 8271 (code=exited, status=1/FAILURE)
CPU: 128ms
and :
/usr/local/bin/gluster_auto_heal gfs0 gluster;echo $?
1
After 11 minutes, the VM 900 starting :
systemctl status gluster_auto_run_vm.service
● gluster_auto_run_vm.service - Gluster Auto Run VM Service
Loaded: loaded (/etc/systemd/system/gluster_auto_run_vm.service; enabled; preset: enabled)
Active: active (exited) since Wed 2024-09-18 10:18:41 CEST; 36s ago
Process: 8780 ExecStart=/bin/bash -c /usr/local/bin/gluster_auto_run_vm (code=exited, status=0/SUCCESS)
Main PID: 8780 (code=exited, status=0/SUCCESS)
CPU: 4.985s
Sep 18 10:18:34 c3 systemd[1]: Starting gluster_auto_run_vm.service - Gluster Auto Run VM Service...
Sep 18 10:18:38 c3 bash[8780]: vmid 900 in gluster on node c3 is starting.
Sep 18 10:18:39 c3 pvesh[8824]: <root@pam> starting task UPID:c3:00002296:0001908B:66EA8A87:qmstart:900:root@pam:
Sep 18 10:18:39 c3 pvesh[8854]: start VM 900: UPID:c3:00002296:0001908B:66EA8A87:qmstart:900:root@pam:
Sep 18 10:18:41 c3 pvesh[8824]: <root@pam> end task UPID:c3:00002296:0001908B:66EA8A87:qmstart:900:root@pam: OK
Sep 18 10:18:41 c3 bash[8824]: UPID:c3:00002296:0001908B:66EA8A87:qmstart:900:root@pam:
Sep 18 10:18:41 c3 systemd[1]: Finished gluster_auto_run_vm.service - Gluster Auto Run VM Service.
and :
/usr/local/bin/gluster_auto_heal gfs0 gluster;echo $?
0