1

Topic: start-stop ohasd under systemd

There are 2 services.

oratest56: ~ # systemctl list-units | grep oha
ohasd.service loaded active exited LSB: Start and Stop Oracle High Availability Service
oracle-ohasd.service loaded active running Oracle High Availability Services

The Oracle on them perfectly starts. And here at reboot all under abnormal condition falls. I can not achieve in any way that there was a serial break as under old initrd. How to achieve normal break as was?

/etc/init.d/ohasd stop
wrote:

oratest56: ~ # systemctl cat oracle-ohasd.service
# /etc/systemd/system/oracle-ohasd.service
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
#
# Oracle OHASD startup
[Unit]
Description=Oracle High Availability Services
After=network.target
[Service]
ExecStart =/etc/init.d/init.ohasd run>/dev/null 2>&1 </dev/null
Type=simple
Restart=always
TimeoutStopSec=5min
[Install]
WantedBy=multi-user.target graphical.target
oratest56: ~ #

wrote:

oratest56: ~ # systemctl cat ohasd.service
# /run/systemd/generator.late/ohasd.service
# Automatically generated by systemd-sysv-generator
[Unit]
Documentation=man:systemd-sysv-generator (8)
SourcePath =/etc/init.d/ohasd
Description=LSB: Start and Stop Oracle High Availability Service
Before=multi-user.target graphical.target lockgcstartup.service
After=network-online.target remote-fs.target open_iscsi.service raw.service
Wants=network-online.target remote-fs.target
[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
ExecStart =/etc/init.d/ohasd start
ExecStop =/etc/init.d/ohasd stop
oratest56: ~ #

Hands certainly all stops normally.

oratest56: ~ # systemctl stop ohasd.service
oratest56: ~ # systemctl stop oracle-ohasd.service
oratest56: ~ # systemctl start oracle-ohasd.service
oratest56: ~ # systemctl start ohasd.service

2

Re: start-stop ohasd under systemd

Suse Sles Linux 12SP2

3

Re: start-stop ohasd under systemd

Uncle Zhora;
The krivoruky Hindu wrote these scripts of initialization and forgot to specify dependence in between.
It is necessary in a file oracle-ohasd.service in section [Unit] to add a line: Before=ohasd.service
Then all will be correct to stop.

4

Re: start-stop ohasd under systemd

ivan78 wrote:

[Unit] to add a line: Before=ohasd.service
Then all will be correct to stop.

Here the problem is deeper, and as I esteemed on forums, it appears concerns not only Oracle, but also other services which at  should be stopped correctly. Before=ohasd.service really specifies servised to give a command on break ohasd.service before oracle-ohasd.service. But all problem that Linux does not wait for a stop ohasd.service before a stop oracle-ohasd.service. Also it turns out that both services take off simply under abnormal condition. As a result we have

Wed Sep 13 10:01:56 AM 2017
Errors in file /u01/app/grid/diag/asm/+asm/+ASM/trace/+ASM_gmon_3478.trc:
ORA-29710: Current operation aborted by Cluster Synchronization Services
GMON (ospid: 3478): terminating the instance due to error 29710
Wed Sep 13 10:01:56 AM 2017
System state dump requested by (instance=1, osid=3478 (GMON)), summary = [abnormal instance termination].
System State dumped to trace file /u01/app/grid/diag/asm/+asm/+ASM/trace/+ASM_diag_3462_20170913100156.trc
Dumping diagnostic data in directory = [cdmp_20170913100156], requested by (instance=1, osid=3478 (GMON)), summary = [abnormal instance termination].
Instance terminated by GMON, pid = 3478

initrd as well as it is necessary stopped all sequentially and fairly waited while ohasd.service stops before starting a stop of the following service during time . Now with a parallelism aggressive policy systemd to achieve from it stop waiting in any way it is not possible. Whether Also I generally began to doubt probably it basically. Certainly it is possible before  to stop simply ohasd.service hands, and then already to leave on reboot, but in life there are different situations and it would be desirable that idle time  was correct.

5

Re: start-stop ohasd under systemd

It is possible to pass again by the way on initrd. But at first I anywhere did not find in the documentation of Oracle of requirements to refuse from systemd. And secondly in  adjustments initrd (anyway at Suse Sles 12) there is a good few of necessary scripts in/init.d (for example network) I.e. even simply to pass on initrd it is necessary to finish still its file.

6

Re: start-stop ohasd under systemd

At usage initrd the similar problem was watched at switched on parallelism. Therefore in Doc ID 464061.1
Even there are instructions to disconnect parallelism

Change RUN_PARALLEL=no in/etc/sysconfig/boot. The startup will not be much slower and Oracle Clusterware will work just fine as usual.

In systemd (as I understand) it is impossible to disconnect parallelism basically.

7

Re: start-stop ohasd under systemd

After an upgrade 12.2 problem dared at Oracle! They corrected oracle-ohasd.service so that at  now Linux  began to wait for normal break. Not clearly only why they did not correct at 11.2.0.4 (with the registration of that that at me was  )
Here so it began to look now

wrote:

oratest56: ~ # systemctl cat oracle-ohasd.service
# /etc/systemd/system/oracle-ohasd.service
# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
#
# Oracle OHASD startup
[Unit]
Description=Oracle High Availability Services
After=syslog.target network-online.target remote-fs.target
[Service]
ExecStart =/etc/init.d/init.ohasd run>/dev/null 2>&1 </dev/null
ExecStop =/etc/init.d/init.ohasd stop>/dev/null 2>&1 </dev/null
TimeoutStopSec=60min
Type=simple
Restart=always
# Do not kill any processes except init.ohasd after ExecStop, unless the
# stop command times out.
KillMode=process
SendSIGKILL=yes
[Install]
WantedBy=multi-user.target graphical.target
oratest56: ~ #

Apparently there was section ExecStop. Increased After and appeared KillMode=process SendSIGKILL=yes
Not clearly only on which they increased TimeoutStopSec since 5 minutes on 60.