Load order for services

Current sanlock.service file pacemaker has not been changed

[Unit]
Description=Shared Storage Lease Manager
After=syslog.target 
After=pacemaker.service
Wants=wdmd.service
Requires=pacemaker.service

[Service]
Type=forking
ControlGroup=cpu:/
EnvironmentFile=-/etc/sysconfig/sanlock
ExecStart=/usr/sbin/sanlock daemon $SANLOCKOPTS
ExecStop=/bin/kill -TERM $MAINPID
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target

This is with sanlock enabled in yast, system services enables for sanlock

linuxvm2:~ # systemctl status pacemaker sanlock
? pacemaker.service - Pacemaker High Availability Cluster Manager
   Loaded: loaded (/usr/lib/systemd/system/pacemaker.service; enabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:pacemakerd
           https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/1.1/html-single/Pacemaker_Explained/index.html

Jul 24 12:18:38 linuxvm2 systemd[1]: Dependency failed for Pacemaker High Availability Cluster Manager.
Jul 24 12:18:38 linuxvm2 systemd[1]: pacemaker.service: Job pacemaker.service/start failed with result 'dependency'.

? sanlock.service - Shared Storage Lease Manager
   Loaded: loaded (/usr/lib/systemd/system/sanlock.service; enabled; vendor preset: disabled)
   Active: inactive (dead)

Jul 24 12:16:04 linuxvm2 systemd[1]: [/usr/lib/systemd/system/sanlock.service:10] Unknown lvalue 'ControlGroup' in section 'Service'
Jul 24 12:18:38 linuxvm2 systemd[1]: Dependency failed for Shared Storage Lease Manager.
Jul 24 12:18:38 linuxvm2 systemd[1]: sanlock.service: Job sanlock.service/start failed with result 'dependency'.
linuxvm2:~ # 

If I boot with sanlock disabled in system services pacemaker comes up fine and I can than start sanlock
manually with systemctl start sanlock.service

If I shutdown pacemaker and than try systemctl start sanlock.service it will not start.
I am using sbd as well which of course effects everything loading as well.

Hi
Looks like you need to fix this error first?
Jul 24 12:16:04 linuxvm2 systemd[1]: [/usr/lib/systemd/system/sanlock.service:10] Unknown lvalue 'ControlGroup' in section 'Service'

That is what is installed there by default. I have 2 servers. Only editing one till get this figured out. I would have no idea what it would be changed to.

Ultimately this is what I see.
system boots with sanlock disabled
pacemaker loads which also loads sbd I believe which in turn loads wdmd.
with sanlock enabled the system boots and I think sanlock is than coming up first which than causes wdmd to load which than cause sbd to not load and than pacemaker will not start.

This is with sanlock disabled and I manually start after server comes up.

linuxvm2:~ # rcpacemaker status
* pacemaker.service - Pacemaker High Availability Cluster Manager
   Loaded: loaded (/usr/lib/systemd/system/pacemaker.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2020-07-24 13:37:25 CDT; 2min 41s ago
     Docs: man:pacemakerd
           https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/1.1/html-single/Pacemaker_Explained/index.html
 Main PID: 3004 (pacemakerd)
    Tasks: 7
   CGroup: /system.slice/pacemaker.service
           |-3004 /usr/sbin/pacemakerd -f
           |-3033 /usr/lib/pacemaker/cib
           |-3034 /usr/lib/pacemaker/stonithd
           |-3036 /usr/lib/pacemaker/lrmd
           |-3037 /usr/lib/pacemaker/attrd
           |-3038 /usr/lib/pacemaker/pengine
           `-3039 /usr/lib/pacemaker/crmd

Jul 24 13:37:51 linuxvm2 crmd[3039]:   notice: Result of probe operation for Server9-start on linuxvm2: 7 (not running)
Jul 24 13:37:51 linuxvm2 crmd[3039]:   notice: Initiating monitor operation webctrl-start_monitor_0 locally on linuxvm2
Jul 24 13:37:51 linuxvm2 crmd[3039]:   notice: Result of probe operation for Starcall-start on linuxvm2: 7 (not running)
Jul 24 13:37:51 linuxvm2 crmd[3039]:   notice: Initiating monitor operation windows2-start_monitor_0 locally on linuxvm2
Jul 24 13:37:51 linuxvm2 crmd[3039]:   notice: Result of probe operation for webctrl-start on linuxvm2: 7 (not running)
Jul 24 13:37:51 linuxvm2 crmd[3039]:   notice: Initiating monitor operation windows3-start_monitor_0 locally on linuxvm2
Jul 24 13:37:52 linuxvm2 crmd[3039]:   notice: Result of probe operation for windows3-start on linuxvm2: 7 (not running)
Jul 24 13:37:52 linuxvm2 crmd[3039]:   notice: Result of probe operation for windows2-start on linuxvm2: 7 (not running)
Jul 24 13:37:52 linuxvm2 crmd[3039]:   notice: Transition 1 (Complete=24, Pending=0, Fired=0, Skipped=0, Incomplete=0, Source=/var/lib/pacemaker/pengine/pe-warn-18.bz2): Complete
Jul 24 13:37:52 linuxvm2 crmd[3039]:   notice: State transition S_TRANSITION_ENGINE -> S_IDLE
linuxvm2:~ # rcsanlock status
Checking status of sanlock                                                                                                                        unused
? sanlock.service - Shared Storage Lease Manager
   Loaded: loaded (/usr/lib/systemd/system/sanlock.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
linuxvm2:~ # rcsanlock start
redirecting to systemctl start sanlock.service
linuxvm2:~ # rcsanlock status
Checking status of sanlock                                                                                                                        running
? sanlock.service - Shared Storage Lease Manager
   Loaded: loaded (/usr/lib/systemd/system/sanlock.service; disabled; vendor preset: disabled)
   Active: active (running) since Fri 2020-07-24 13:40:19 CDT; 8s ago
  Process: 4011 ExecStart=/usr/sbin/sanlock daemon $SANLOCKOPTS (code=exited, status=0/SUCCESS)
 Main PID: 4012 (sanlock)
    Tasks: 6 (limit: 512)
   CGroup: /system.slice/sanlock.service
           ??4012 /usr/sbin/sanlock daemon -w 0
           ??4013 /usr/sbin/sanlock daemon -w 0
linuxvm2:~ # 

Hi
I would tempted to script the startup with a sleep to ensure pacemaker is started (or look for the pacemaker status) and use your own service file in /etc/systemd/system…

Else, I would also suggest a support request to SUSE if you can, I wonder if it’s because one is type simple and the other forking which maybe causing issues.

After days and many hours of beating my head against the wall. I have finally figured it out. I used this website to try different things. I have learned a lot through this ordeal. I used the custom.target one in the site. Took a while to figure out though that sanlock seems to require a forking startup type. Thank you for the help to figure different searches to find what needed.
https://superuser.com/questions/544399/how-do-you-make-a-systemd-service-as-the-last-service-on-boot

Hi
Thanks for posting back your solution and your welcome glad to be of some help :slight_smile:

Just so aware that did not totally resolve the issue. It still could not talk to watchdog so was really flaky. Went back to lockd.