# Load order for services

**URL:** <https://forums.suse.com/t/load-order-for-services/35168>\
**Category:** SLES Configure-Administer\
**Created:** [July 24, 2020, 1:13pm UTC](https://forums.suse.com/t/load-order-for-services/35168 "2020-07-24T13:13:03Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![warper2](https://avatars.discourse-cdn.com/v4/letter/w/3ab097/32.png) [@warper2](https://forums.suse.com/u/warper2)\
**Post date:** [July 24, 2020, 5:25pm UTC](https://forums.suse.com/t/load-order-for-services/35168/21 "2020-07-24T17:25:26Z")

</div>

Current sanlock.service file pacemaker has not been changed

```auto
[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

```auto
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.

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [July 24, 2020, 5:59pm UTC](https://forums.suse.com/t/load-order-for-services/35168/22 "2020-07-24T17:59:45Z")

</div>

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'`

---

<div class="post-metadata">

**Author:** ![warper2](https://avatars.discourse-cdn.com/v4/letter/w/3ab097/32.png) [@warper2](https://forums.suse.com/u/warper2)\
**Post date:** [July 24, 2020, 6:10pm UTC](https://forums.suse.com/t/load-order-for-services/35168/23 "2020-07-24T18:10:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![warper2](https://avatars.discourse-cdn.com/v4/letter/w/3ab097/32.png) [@warper2](https://forums.suse.com/u/warper2)\
**Post date:** [July 24, 2020, 6:39pm UTC](https://forums.suse.com/t/load-order-for-services/35168/24 "2020-07-24T18:39:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![warper2](https://avatars.discourse-cdn.com/v4/letter/w/3ab097/32.png) [@warper2](https://forums.suse.com/u/warper2)\
**Post date:** [July 24, 2020, 6:41pm UTC](https://forums.suse.com/t/load-order-for-services/35168/25 "2020-07-24T18:41:37Z")

</div>

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

```auto
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:~ # 

```

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [July 24, 2020, 10:45pm UTC](https://forums.suse.com/t/load-order-for-services/35168/26 "2020-07-24T22:45:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![warper2](https://avatars.discourse-cdn.com/v4/letter/w/3ab097/32.png) [@warper2](https://forums.suse.com/u/warper2)\
**Post date:** [July 25, 2020, 1:04pm UTC](https://forums.suse.com/t/load-order-for-services/35168/27 "2020-07-25T13:04:52Z")

</div>

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](https://superuser.com/questions/544399/how-do-you-make-a-systemd-service-as-the-last-service-on-boot "https://superuser.com/questions/544399/how-do-you-make-a-systemd-service-as-the-last-service-on-boot")

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [July 25, 2020, 2:18pm UTC](https://forums.suse.com/t/load-order-for-services/35168/28 "2020-07-25T14:18:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![warper2](https://avatars.discourse-cdn.com/v4/letter/w/3ab097/32.png) [@warper2](https://forums.suse.com/u/warper2)\
**Post date:** [July 26, 2020, 9:20pm UTC](https://forums.suse.com/t/load-order-for-services/35168/29 "2020-07-26T21:20:11Z")

</div>

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.

[Previous page](https://forums.suse.com/t/load-order-for-services/35168.md?page=1)
