Skip to content

sap_hana_install: Idempotency check is not thorough enough #1050

@marcelmamula

Description

@marcelmamula

Issue

Current idempotency check using /usr/sap/hostctrl/exe/saphostctrl -function ListInstances is not catching midway failed installations.

My installation failed because of SElinux in enforcing mode, but command above is still showing HANA regardless. It is not installed and it is not running.

ansible.builtin.shell: set -o pipefail && /usr/sap/hostctrl/exe/saphostctrl -function ListInstances | cut -d":" -f2-

hdblcm.log and command output

h02hana0:~ # tail -20 /var/tmp/hdblcm.log
09:54:23.090 - INFO: Total execution time                                          | 00:04:05
09:54:23.090 - INFO:
09:54:23.092 - ERR : Installation of SAP HANA Database System failed.
09:54:23.140 - INFO: -----------------------------------------------------------
09:54:23.140 - INFO: Cleaning up configuration changes...
09:54:23.140 - INFO: -----------------------------------------------------------
09:54:23.140 - INFO:   Checking for any auto-failover settings disabled by the SAP HANA Lifecycle Management...
09:54:23.140 - INFO:     Getting nameserver.ini
09:54:23.140 - INFO:       Reading nameserver.ini
09:54:23.140 - INFO:         Layer 'Default' found
09:54:23.144 - INFO:         Layer 'System' found
09:54:23.145 - INFO:   No auto-failover settings disabled by the SAP HANA Lifecycle Management were found.
09:54:23.145 - INFO: -----------------------------------------------------------
09:54:23.145 - INFO: END: Cleaning up configuration changes (start: 09:54:23.140 duration: 00:00:00)
09:54:23.145 - INFO: -----------------------------------------------------------
09:54:23.145 - INFO: Summary of critical errors
09:54:23.092 - ERR :   Installation of SAP HANA Database System failed.
09:53:51.500 - ERR :     Start instance 90 on master host 'h02hana0' (worker) failed.
09:53:51.500 - ERR :       Cannot establish http connection to unix domain socket '/tmp/.sapstream59013' (No such file or directory)
09:53:51.501 - ERR :     Check the log file for SAP HANA Database error messages
h02hana0:~ # /usr/sap/hostctrl/exe/saphostctrl -function ListInstances
 Inst Info : H02 - 90 - h02hana0 - 753, patch 1236, changelist 2222163
h02hana0:~ #

HANA status

h02hana0:~ # su - h02adm
h02adm@h02hana0:/usr/sap/H02/HDB90> HDB start


StartService
FAIL: Service start failed: systemdI_msg_handler: job '/org/freedesktop/systemd1/job/77170' canceled with 'failed'

ERROR: start service command '/usr/sap/H02/SYS/exe/hdb/sapcontrol -nr 90 -function StartService H02' failed, rc = 1
h02adm@h02hana0:/usr/sap/H02/HDB90> HDB info
USER          PID     PPID  %CPU        VSZ        RSS COMMAND
h02adm     138152   138151   0.8       9740       8576 -sh
h02adm     138231   138152  10.0       7460       5768  \_ /bin/sh /usr/sap/H02/HDB90/HDB info
h02adm     138256   138231   0.0       9408       6384      \_ ps fx -U h02adm -o user:8,pid:8,ppid:8,pcpu:5,vsz:10,rss:10,args

@berndfinger FYI

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions