Skip to content

sap_anydb_install_oracle: Oracle Installer does not respect env var and always attempts to install to /oracle #1049

Open
@sean-freeman

Description

@sean-freeman

Ansible Role

sap_anydb_install_oracle

OS Family

N/A

Ansible Controller - Python version

Python 3.13.3

Ansible-core version

ansible [core 2.16.13]

Bug Description

ORACLE_BASE env var is set to /anydb and other env var are set from this, but this is not respected by the installer.

Summary of relevant directory location commands and stdout

setenv ORACLE_BASE "/anydb"
setenv ORACLE_HOME "$ORACLE_BASE/$DB_SID/19.0.0"
setenv IHRDBMS "$ORACLE_HOME"
setenv OHRDBMS "$ORACLE_BASE/$DB_SID/19"
setenv ORA_GOLD_IMAGE_FILE_L "$ORACLE_BASE/dvd/19.0.0/db_home"
setenv INVENTORY_LOCATION "/oraInventory"
setenv oracle.install.db.config.starterdb.globalDBName "AY1"
setenv oracle.install.db.config.starterdb.SID "AY1"
setenv oracle.install.db.config.starterdb.memoryLimit "122462"
setenv oracle.install.db.config.starterdb.storageType "FILE_SYSTEM_STORAGE"
setenv oracle.install.db.config.starterdb.fileSystemStorage.dataLocation "/oradata"

$ORA_GOLD_IMAGE_FILE_L/SAP/19cinstall.sh -norsp -silent -ohinstall -db_sid "$DB_SID" -oracle_base "$ORACLE_BASE" -oracle_stage "$ORA_GOLD_IMAGE_FILE_L"

    . Command line  : -norsp -silent -ohinstall -db_sid AY1 -oracle_base /anydb -oracle_stage /anydb/dvd/19.0.0/db_home

        . (OK     ) -  /oracle/AY1/orainstall has 80 GByte free.
        . (OK     ) -  Got location for Oracle base from '-oracle_base' option.
        . (OK     ) -  Directory /oracle/AY1 exists.
        . (OK     ) -  Oracle base location /anydb exists.
        . (OK     ) -  Installation location /oracle/AY1/19.0.0 does not exist.
        . (OK     ) -  Runtime location /oracle/AY1/19 does not exist.
        . (OK     ) -  New response file /oracle/AY1/orainstall/.19cinstall.rsp created.
        . Oracle home image file       : /anydb/dvd/19.0.0/db_home/LINUX.X64_193000_db_home.zip
        . ORACLE_BASE                  : /anydb
        . ORACLE_HOME                  : /anydb/AY1/19.0.0
        . ORACLE_BASE                  : /anydb
        . ORACLE_HOME IHRDBMS (install): /oracle/AY1/19.0.0
        . ORACLE_HOME OHRDBMS (runtime): /oracle/AY1/19
        . oratab new entry             : AY1:/oracle/AY1/19:N
        . Temporary directory          : /oracle/AY1/orainstall/.19cinstall.tmp
        . Temporary error file         : /oracle/AY1/orainstall/.19cinstall.tmp/sap_runinstaller.err
        . Response file                : /oracle/AY1/orainstall/.19cinstall.rsp
        . Output log file              : /oracle/AY1/orainstall/.19cinstall.oui
        . inventory location           : INVENTORY_LOCATION=/oracle/oraInventory

        . OHRDBMS -> IHRDBMS             /oracle/AY1/19 -> 19.0.0

        . Installation Log Directory   : /oracle/AY1/orainstall
        . Installation Log File        : /oracle/AY1/orainstall/19cinstall2025-06-12_12-44-27.log
        . Installation Summary Log File: /oracle/AY1/orainstall/19cinstall.log

        . (INFO   ) -  Creating Oracle home directory /oracle/AY1/19.0.0
        . unzip  /anydb/dvd/19.0.0/db_home/LINUX.X64_193000_db_home.zip -d /oracle/AY1/19.0.0 2>/oracle/AY1/orainstall/.19cinstall.tmp/sap_runinstaller.err
        . (INFO   ) -  Copying SAP RUNINSTALLER into Oracle home directory /oracle/AY1/19.0.0

        . (INFO   ) -  Oracle Database 19c Installer command line:
        TMP=/oracle/AY1/orainstall/.19cinstall.tmp
        TMPDIR=/oracle/AY1/orainstall/.19cinstall.tmp /oracle/AY1/19.0.0/runInstaller -waitForCompletion -silent | tee /oracle/AY1/orainstall/.19cinstall.oui

Full stdout from Ansible Task

TASK [community.sap_install.sap_anydb_install_oracle : Oracle DB - Install Oracle DB] ***
task path: /sap_install/roles/sap_anydb_install_oracle/tasks/oracledb_installer_minimal.yml:31
fatal: [sap-anydb-sbx]: FAILED! =>
    cmd: |-
        setenv CV_ASSUME_DISTID "OL7"
        setenv DISPLAY
        setenv DB_SID "AY1"
        setenv ORACLE_BASE "/anydb"
        setenv ORACLE_HOME "$ORACLE_BASE/$DB_SID/19.0.0"
        setenv ORACLE_HOME_NAME "OraDb19c_1"
        setenv IHRDBMS "$ORACLE_HOME"
        setenv OHRDBMS "$ORACLE_BASE/$DB_SID/19"
        setenv ORA_GOLD_IMAGE_FILE_L "$ORACLE_BASE/dvd/19.0.0/db_home"
        setenv INVENTORY_LOCATION "/oraInventory"
        setenv oracle.install.db.config.starterdb.globalDBName "AY1"
        setenv oracle.install.db.config.starterdb.SID "AY1"
        setenv oracle.install.db.config.starterdb.memoryLimit "122462"
        setenv oracle.install.db.config.starterdb.storageType "FILE_SYSTEM_STORAGE"
        setenv oracle.install.db.config.starterdb.fileSystemStorage.dataLocation "/oradata"
        setenv oracle.install.db.config.starterdb.password.ALL "NewPass$321"
        setenv oracle.install.db.config.starterdb.password.SYS "NewPass$321"
        setenv oracle.install.db.config.starterdb.password.SYSTEM "NewPass$321"
        setenv oracle.install.db.DBA_GROUP "dba"
        setenv oracle.install.db.BACKUPDBA_GROUP "dba"
        setenv oracle.install.db.DGDBA_GROUP "dba"
        setenv oracle.install.db.KMDBA_GROUP "dba"
        setenv oracle.install.db.OSRACDBA_GROUP "dba"
        $ORA_GOLD_IMAGE_FILE_L/SAP/19cinstall.sh -norsp -silent -ohinstall -db_sid "$DB_SID" -oracle_base "$ORACLE_BASE" -oracle_stage "$ORA_GOLD_IMAGE_FILE_L"
    failed_when_result: true
    msg: non-zero return code
    rc: 2
    stderr: ''
    stdout: |-
        .
        . ************************************************************
        . Oracle Database 19c Software Installation
        . Copyright (c) Oracle Corporation 2019. All Rights Reserved.
        . ************************************************************
        . 19cinstall.sh 19.0.0 (19-015) 2019-11-20 Production
        . ************************************************************
        .
        . Host          : sap-anydb-sbx
        . Platform      : linux_x86_64 (64-bit)
        . Date          : 2025-06-12 12-44-27
        . User          : oracle
        .
        . Command line #: 9
        . Command line  : -norsp -silent -ohinstall -db_sid AY1 -oracle_base /anydb -oracle_stage /anydb/dvd/19.0.0/db_home
        . (INFO   ) -  TASK - Install Oracle Home (Extract+Register+Configure)
        . (INFO   ) -  2025-06-12 12-44-27
        . (INFO   ) -  TASK - Prepare Installation and Installation Checks
        . (INFO   ) -  2025-06-12 12-44-27
        .
        . Performing Pre-Installation Checks ...
        .
        . (OK     ) -  unzip 6.00 or later available.
        . (OK     ) -  There is enough free space in TEMP directory.
        . (OK     ) -  /oracle/AY1/orainstall has 80 GByte free.
        . (OK     ) -  Environment variable <DB_SID> is set to AY1
        . (OK     ) -  Got value for <DB_SID> from '-db_sid' option.
        . (OK     ) -  Got location for Oracle base from '-oracle_base' option.
        . (OK     ) -  Environment variable DISPLAY is not set (not required for silent mode).
        . (OK     ) -  Directory /oracle/AY1 exists.
        . (OK     ) -  Oracle base location /anydb exists.
        . (OK     ) -  oratab file/etc/oratab does not exist.
        . (OK     ) -  Installation location /oracle/AY1/19.0.0 does not exist.
        . (OK     ) -  Runtime location /oracle/AY1/19 does not exist.
        . (WARN   ) -  Inventory pointer file /etc/oraInst.loc does not exist.
        . (OK     ) -  You are starting your first Oracle installation on this host.
        . (OK     ) -  OS group dba is defined.
        . (OK     ) -  OS group oper is defined.
        . (OK     ) -  OS group oper is defined.
        . (OK     ) -  OS group dba is defined.
        . (OK     ) -  OS group dba is defined.
        . (OK     ) -  OS group dba is defined.
        . (OK     ) -  OS group oinstall is defined.
        . (OK     ) -  New response file /oracle/AY1/orainstall/.19cinstall.rsp created.
        .
        . Pre-Installation Checks completed.
        .
        . (INFO   ) -  TASK - Verify Installation Settings
        . (INFO   ) -  2025-06-12 12-44-27
        .
        . Starting point:
        .
        . Started from DVD             : yes
        . Oracle home image file       : /anydb/dvd/19.0.0/db_home/LINUX.X64_193000_db_home.zip
        . Checksum has been verified?  : no
        . Checksum is ok?              : not set
        .
        . Environment Variables:
        .
        . DB_SID                       : AY1
        . DISPLAY                      : not set
        . ORACLE_BASE                  : /anydb
        . ORACLE_HOME                  : /anydb/AY1/19.0.0
        .
        . Installation Task:
        .
        . Preparing the Installation   : yes
        . Verifying Install Settings   : yes
        . Extracting Oracle Home       : yes
        . Checking Prerequisites       : no
        . Registering Oracle Home      : yes
        . Configuring for SAP          : yes
        .
        . Installation Status:
        .
        . Oracle Home is extracted     : no
        . Oracle Home is registered    : no
        . OHRDBMS is configured for SAP: no
        .
        . Oracle Home Version          : not set not set
        . root.sh already executed?    : no
        .
        . Installation Settings:
        .
        . Image file extraction        : unzip  <image file> (-xprogress )
        . UnZip tool path              : /bin/unzip
        . UnZip tool banner            : UnZip 6.00 of 20 April 2009, by Info-ZIP.  Maintained by C. Spieler.  Send
        . Oracle Database Release      : 19.0.0.0.0
        . ORACLE_BASE                  : /anydb
        . ORACLE_HOME IHRDBMS (install): /oracle/AY1/19.0.0
        . ORACLE_HOME OHRDBMS (runtime): /oracle/AY1/19
        . ORACLE_HOME_NAME             : not specified
        . oratab                       : /etc/oratab
        . oratab new entry             : AY1:/oracle/AY1/19:N
        .
        . Oracle Home Administrative OS Groups:
        .
        . Inventory group              : oinstall
        . OSDBA group (SYSDBA)         : dba
        . OSOPER group (SYSOPER)       : oper
        . OSBACKUPDBA group (SYSBACKUP): oper
        . OSDGDBA group (SYSDG)        : dba
        . OSKMDBA group (SYSKM)        : dba
        . OSRACDBA group (SYSRAC)      : dba
        .
        . Oracle Database 19c Installer Settings:
        .
        . Installer location           : not set
        . Version (oraparam.ini)       : 0.0.0.0.0
        . Temporary directory          : /oracle/AY1/orainstall/.19cinstall.tmp
        . Temporary error file         : /oracle/AY1/orainstall/.19cinstall.tmp/sap_runinstaller.err
        .                                Available disk space: 80 GByte
        . Response file                : /oracle/AY1/orainstall/.19cinstall.rsp
        . RSA Root Script Automation   : -
        . Use response file            : no
        . Output log file              : /oracle/AY1/orainstall/.19cinstall.oui
        . Options                      : -waitForCompletion  -silent
        . invPtrLoc option             : not set
        . inventory location           : INVENTORY_LOCATION=/oracle/oraInventory
        . Ignore prereq check warnings : FALSE ( / )
        .
        . Post Installation Settings:
        .
        . Create symbolic link         : yes
        . relative/absolute path       : relative
        . OHRDBMS -> IHRDBMS             /oracle/AY1/19 -> 19.0.0
        . Configure orabasetab         : yes
        . Clean up temp. files         : yes
        .
        . Installation Log File Settings:
        .
        . Installation Log Directory   : /oracle/AY1/orainstall
        . Installation Log File        : /oracle/AY1/orainstall/19cinstall2025-06-12_12-44-27.log
        . Installation Summary Log File: /oracle/AY1/orainstall/19cinstall.log
        .
        . (INFO   ) -  TASK - Extract Oracle Home Image File (unzip)
        . (INFO   ) -  2025-06-12 12-44-27
        . (INFO   ) -  Creating Oracle home directory /oracle/AY1/19.0.0
        . (INFO   ) -  Oracle home directory created.
        . (INFO   ) -  Oracle home directory is empty.
        . (INFO   ) -  Extracting Oracle home image file
        . (INFO   ) -  This step can take a while, please wait ...
        . unzip  /anydb/dvd/19.0.0/db_home/LINUX.X64_193000_db_home.zip -d /oracle/AY1/19.0.0 2>/oracle/AY1/orainstall/.19cinstall.tmp/sap_runinstaller.err
        . Number of files to extract: ~ 45000 (can vary, depending on platform)
        ........................................  4000 files extracted (  9 %)
        ........................................  8000 files extracted ( 18 %)
        ........................................ 12000 files extracted ( 27 %)
        ........................................ 16000 files extracted ( 36 %)
        ........................................ 20000 files extracted ( 44 %)
        ........................................ 24000 files extracted ( 53 %)
        ........................................ 28000 files extracted ( 62 %)
        ........................................ 32000 files extracted ( 71 %)
        ........................................ 36000 files extracted ( 80 %)
        ........................................ 40000 files extracted ( 89 %)
        .................. 41879 files extracted (100 %)
        . (INFO   ) -  Extracting Oracle home image file finished successfully.
        . (INFO   ) -  Copying SAP RUNINSTALLER into Oracle home directory /oracle/AY1/19.0.0
        . (INFO   ) -  Copying SAP RUNINSTALLER finished successfully.
        . (INFO   ) -  TASK - Check Installation Prerequisites (runInstaller) - task not selected
        . (INFO   ) -  TASK - Register Oracle Home (runInstaller)
        . (INFO   ) -  2025-06-12 12-45-22
        . (INFO   ) -  Oracle Database 19c Installer command line:
        LANG=C
        TMP=/oracle/AY1/orainstall/.19cinstall.tmp
        TMPDIR=/oracle/AY1/orainstall/.19cinstall.tmp /oracle/AY1/19.0.0/runInstaller -waitForCompletion -silent | tee /oracle/AY1/orainstall/.19cinstall.oui
        . (INFO   ) -  Starting Oracle Database 19c Installer (runInstaller) in silent mode - please wait ...
        . (INFO   ) -  ########################################
        . (INFO   ) -  Oracle Database 19c Installer started ...
        . (INFO   ) -  ########################################
        Launching Oracle Database Setup Wizard...

Bug reproduction

Change Oracle install path

Community participation

Unfortunately I am not in a position to help with the bug fix

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