Ao tentar fazer deploy de uma nova instalação do Oracle Grid Infrastructure 19cRU12 com Fleet Patching and Provisioning, o processo falhou na execução do script root.sh:

[grid@fppserver ~]$ rhpctl add workingcopy -workingcopy wc_lab04_gi19cR12 -image gi19cR12 -path /u01/app/product/19.12.0.0/grid -targetnode lab04 -user grid -responsefile /tmp/response_gi19c.rsp -ignoreprereq -root
Enter user "root" password:
fppserver.dibiei.com: Storing metadata in repository for working copy "wc_lab04_gi19cR12" ...
fppserver.dibiei.com: Creating snapshot "tmpgi19cR12wc_lab04_gi19cR12" ...
fppserver.dibiei.com: Changing the home ownership to user grid...
fppserver.dibiei.com: Copying software contents to Local File System ...
fppserver.dibiei.com: Starting clone operation...
lab04: 
lab04: 
lab04: [INFO] [INS-32183] Use of clone.pl is deprecated in this release. Clone operation is equivalent to performing a Software Only installation from the image. 
lab04: You must use /u01/app/product/19.12.0.0/grid/gridSetup.sh script available to perform the Software Only install. For more details on image based installation, refer to help documentation.
lab04: 
lab04: Starting Oracle Universal Installer...
lab04: 
lab04: ..................................................   5% Done.
lab04: ..................................................   10% Done.
lab04: ..................................................   15% Done.
lab04: ..................................................   20% Done.
lab04: ..................................................   25% Done.
lab04: ..................................................   30% Done.
lab04: ..................................................   35% Done.
lab04: ..................................................   40% Done.
lab04: ..................................................   45% Done.
lab04: ..................................................   50% Done.
lab04: ..................................................   55% Done.
lab04: ..................................................   60% Done.
lab04: ..................................................   65% Done.
lab04: ..................................................   70% Done.
lab04: ..................................................   75% Done.
lab04: ..................................................   80% Done.
lab04: ..................................................   85% Done.
lab04: ..........
lab04: Copy files in progress.
lab04: 
lab04: Copy files successful.
lab04: 
lab04: Link binaries in progress.
lab04: ..........
lab04: Link binaries successful.
lab04: 
lab04: Setup files in progress.
lab04: ..........
lab04: Setup files successful.
lab04: 
lab04: Setup Inventory in progress.
lab04: 
lab04: Setup Inventory successful.
lab04: ..........
lab04: Finish Setup successful.
lab04: The cloning of wc_lab04_gi19cR12 was successful.
lab04: Please check '/u01/app/oraInventory/logs/cloneActions2021-09-22_07-52-51PM.log' for more details.
lab04: 
lab04: Setup Oracle Base in progress.
lab04: 
lab04: Setup Oracle Base successful.
lab04: ..................................................   95% Done.
lab04: 
lab04: As a root user, execute the following script(s):
lab04: 	1. /u01/app/oraInventory/orainstRoot.sh
lab04: 	2. /u01/app/product/19.12.0.0/grid/root.sh
lab04: 
lab04: 
lab04: 
lab04: ..................................................   100% Done.
fppserver.dibiei.com: Successfully executed clone operation.
fppserver.dibiei.com: Executing root script on nodes [lab04].
lab04: Changing permissions of /u01/app/oraInventory.
lab04: Adding read,write permissions for group.
lab04: Removing read,write,execute permissions for world.
lab04: 
lab04: Changing groupname of /u01/app/oraInventory to oinstall.
lab04: The execution of the script is complete.
fppserver.dibiei.com: Successfully executed root script on nodes [lab04].
fppserver.dibiei.com: Executing configuration script on nodes [lab04]
fppserver.dibiei.com: Successfully executed configuration script on nodes [lab04]
fppserver.dibiei.com: Executing root script on nodes [lab04].
lab04: Check /u01/app/product/19.12.0.0/grid/install/root_lab04_2021-09-22_19-53-46-322486528.log for the output of root script
fppserver.dibiei.com: Audit ID: 29
PRGH-1063 : failure while executing the scripts for Oracle Grid Infrastructure configuration
PRCZ-2009 : Failed to execute command "/u01/app/product/19.12.0.0/grid/root.sh" as root within 6,000 seconds on nodes "lab04"
PRCZ-2103 : Failed to execute command "/u01/app/product/19.12.0.0/grid/root.sh" on node "lab04" as user "root". Detailed error:
Check /u01/app/product/19.12.0.0/grid/install/root_lab04_2021-09-22_19-53-46-322486528.log for the output of root script

Consultando o arquivo de log no servidor no qual o Grid estava sendo instalado:

[root@lab04 ~]# cat /u01/app/product/19.12.0.0/grid/install/root_lab04_2021-09-22_19-53-46-322486528.log
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/product/19.12.0.0/grid
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/product/19.12.0.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/lab04/crsconfig/roothas_2021-09-22_07-53-46PM.log
2021/09/22 19:53:53 CLSRSC-363: User ignored prerequisites during installation
Redirecting to /bin/systemctl restart rsyslog.service
Invalid site guid (-y) 
clscfg -localadd -z <site guid> [-avlookup]
                 -p property1:value1,property2:value2...

  -avlookup       - Specify if the operation is during clusterware upgrade
  -z <site guid>  - Specify the site GUID for this node
  -p propertylist - list of cluster properties and its value pairs

 Adds keys in OLR for the HASD.
WARNING: Using this tool may corrupt your cluster configuration. Do not
         use unless you positively know what you are doing.

Failed to create keys in the OLR, rc = 100, Message:
   

2021/09/22 19:53:55 CLSRSC-188: Failed to create keys in Oracle Local Registry
Died at /u01/app/product/19.12.0.0/grid/crs/install/oraolr.pm line 628.

O erro “CLSRSC-188: Failed to create keys in Oracle Local Registry” ocorre devido a pré existência do arquivo crsgenconfig_params abaixo do $GI_HOME/crsl/install. Neste caso específico, a Gold Image gi19cR12 foi criada a partir da instalação de um cluster existente, causando esse conflito (no mundo perfeito, a importação da imagem realizada pelo comando rhpctl import image deveria remover esse arquivo).

Solução

Para concluir a instalação com sucesso, basta remover o arquivo crsgenconfig_params e reexecutar o script root.sh. Mas em um cenário com Fleet Patching and Proviosioning, onde o objetivo é automatizar todo o processo de instalação com um único comando, o ideal é que a Gold Image esteja “limpa”, então farei a removi a instalação com falha, removi o arquivo crsgenconfig_params da Gold Image e iniciei uma nova instalação via Fleet Patching Provisioning.

1) Removendo a Working Copy com falha (No servidor do FPP Server):

[grid@fppserver ~]$ rhpctl delete workingcopy -workingcopy wc_lab04_gi19cR12 -targetnode lab04 -root
Enter user "root" password:
fppserver.dibiei.com: Audit ID: 33
fppserver.dibiei.com: Removing storage for working copy ...

2) Desinstalando o Grid Home no servidor no qual estava sendo instalado:

[grid@lab04 ..]$ cd /u01/app/product/19.12.0.0/grid/crs/install/
[grid@lab04 deinstall]$ ./deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /tmp/deinstall2021-09-22_08-08-15PM/logs/

############ ORACLE DECONFIG TOOL START ############


######################### DECONFIG CHECK OPERATION START #########################
## [START] Install check configuration ##

 Specify a comma-separated list of remote nodes to cleanup : 


Checking for existence of the Oracle home location /u01/app/product/19.12.0.0/grid
Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Standalone Server
Oracle Base selected for deinstall is: /u01/app/grid
Checking for existence of central inventory location /u01/app/oraInventory
Checking for existence of the Oracle Grid Infrastructure home 

## [END] Install check configuration ##

Traces log file: /tmp/deinstall2021-09-22_08-08-15PM/logs//crsdc_2021-09-22_08-08-27-PM.log

Network Configuration check config START

Network de-configuration trace file location: /tmp/deinstall2021-09-22_08-08-15PM/logs/netdc_check2021-09-22_08-08-27PM.log

Network Configuration check config END

Asm Check Configuration START

ASM de-configuration trace file location: /tmp/deinstall2021-09-22_08-08-15PM/logs/asmcadc_check2021-09-22_08-08-27PM.log

ASM configuration was not detected in this Oracle home. Was ASM configured in this Oracle home (y|n) [n]: 
ASM was not detected in the Oracle Home
Database Check Configuration START

Database de-configuration trace file location: /tmp/deinstall2021-09-22_08-08-15PM/logs/databasedc_check2021-09-22_08-08-27PM.log

Database Check Configuration END

######################### DECONFIG CHECK OPERATION END #########################


####################### DECONFIG CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: 
Oracle Home selected for deinstall is: /u01/app/product/19.12.0.0/grid
Inventory Location where the Oracle home registered is: /u01/app/oraInventory
ASM was not detected in the Oracle Home
Do you want to continue (y - yes, n - no)? [n]: y
A log of this session will be written to: '/tmp/deinstall2021-09-22_08-08-15PM/logs/deinstall_deconfig2021-09-22_08-08-19-PM.out'
Any error messages from this session will be written to: '/tmp/deinstall2021-09-22_08-08-15PM/logs/deinstall_deconfig2021-09-22_08-08-19-PM.err'

######################## DECONFIG CLEAN OPERATION START ########################
Database de-configuration trace file location: /tmp/deinstall2021-09-22_08-08-15PM/logs/databasedc_clean2021-09-22_08-08-27PM.log
ASM de-configuration trace file location: /tmp/deinstall2021-09-22_08-08-15PM/logs/asmcadc_clean2021-09-22_08-08-27PM.log
ASM Clean Configuration END

Network Configuration clean config START

Network de-configuration trace file location: /tmp/deinstall2021-09-22_08-08-15PM/logs/netdc_clean2021-09-22_08-08-27PM.log

De-configuring Naming Methods configuration file...
Naming Methods configuration file de-configured successfully.

De-configuring backup files...
Backup files de-configured successfully.

The network configuration has been cleaned up successfully.

Network Configuration clean config END


######################### DECONFIG CLEAN OPERATION END #########################


####################### DECONFIG CLEAN OPERATION SUMMARY #######################
Oracle Restart is stopped and de-configured successfully.
#######################################################################


############# ORACLE DECONFIG TOOL END #############

Using properties file /tmp/deinstall2021-09-22_08-08-15PM/response/deinstall_2021-09-22_08-08-19-PM.rsp
Location of logs /tmp/deinstall2021-09-22_08-08-15PM/logs/

############ ORACLE DEINSTALL TOOL START ############





####################### DEINSTALL CHECK OPERATION SUMMARY #######################
A log of this session will be written to: '/tmp/deinstall2021-09-22_08-08-15PM/logs/deinstall_deconfig2021-09-22_08-08-19-PM.out'
Any error messages from this session will be written to: '/tmp/deinstall2021-09-22_08-08-15PM/logs/deinstall_deconfig2021-09-22_08-08-19-PM.err'

######################## DEINSTALL CLEAN OPERATION START ########################
## [START] Preparing for Deinstall ##
Setting LOCAL_NODE to lab04
Setting CRS_HOME to false
Setting oracle.installer.invPtrLoc to /tmp/deinstall2021-09-22_08-08-15PM/oraInst.loc
Setting oracle.installer.local to false

## [END] Preparing for Deinstall ##

Setting the force flag to false
Setting the force flag to cleanup the Oracle Base
Oracle Universal Installer clean START

Detach Oracle home '/u01/app/product/19.12.0.0/grid' from the central inventory on the local node : Done

Delete directory '/u01/app/product/19.12.0.0/grid' on the local node : Done

Delete directory '/u01/app/oraInventory' on the local node : Done

Delete directory '/u01/app/grid' on the local node : Done

Oracle Universal Installer cleanup was successful.

Oracle Universal Installer clean END


## [START] Oracle install clean ##


## [END] Oracle install clean ##


######################### DEINSTALL CLEAN OPERATION END #########################


####################### DEINSTALL CLEAN OPERATION SUMMARY #######################
Successfully detached Oracle home '/u01/app/product/19.12.0.0/grid' from the central inventory on the local node.
Successfully deleted directory '/u01/app/product/19.12.0.0/grid' on the local node.
Successfully deleted directory '/u01/app/oraInventory' on the local node.
Successfully deleted directory '/u01/app/grid' on the local node.
Oracle Universal Installer cleanup was successful.


Run 'rm -r /etc/oraInst.loc' as root on node(s) 'lab04' at the end of the session.

Run 'rm -r /opt/ORCLfmap' as root on node(s) 'lab04' at the end of the session.
Run 'rm -r /etc/oratab' as root on node(s) 'lab04' at the end of the session.
Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################


############# ORACLE DEINSTALL TOOL END #############

Obs: Execute os comandos “rm” em outra sessão com usuário root:

[root@lab04 ~]# rm -rf /etc/oraInst.loc
[root@lab04 ~]# rm -rf /opt/ORCLfmap
[root@lab04 ~]# rm -rf /etc/oratab

A Gold Image é mantida como um snapshot read only no ACFS, então precisamos colocar o snapshot em read-write para remover o arquivo crsgenconfig_params.

3) Identificando o FIle System da Gold Image (atributo Software home path):

[grid@fppserver ~]$ rhpctl query image -image gi19cR12
fppserver.dibiei.com: Audit ID: 34
Image name: gi19cR12
Owner: grid@fppserver
Site: fppserver
Access control: USER:grid@fppserver
Access control: ROLE:OTHER
Access control: ROLE:GH_IMG_PUBLISH
Access control: ROLE:GH_IMG_ADMIN
Access control: ROLE:GH_IMG_VISIBILITY
Parent Image: 
Software home path: /fpp_images/images/igi19cR12313964/.ACFS/snaps/igi19cR12/swhome
Image state: PUBLISHED
Image size: 10294 Megabytes
Image Type: ORACLEGISOFTWARE
Image Version: 19.0.0.0.0:19.12.0.0.0
Groups configured in the image: OSDBA=asmdba,OSASM=asmadmin,OSBACKUP=asmadmin,OSDG=asmadmin,OSKM=asmadmin,OSRAC=asmadmin
Image platform: Linux_AMD64
Interim patches installed: 32918050,32916816,32915586,32904851,32585572
Contains a non-rolling patch: FALSE
Complete: TRUE

Dica: O FIle System ACFS é o caminho que precede “.ACFS”.

4) Consultando informações do snapshot:

[grid@fppserver ~ ]$ acfsutil snap info /fpp_images/images/igi19cR12313964/
snapshot name:               igi19cR12
snapshot location:           /fpp_images/images/igi19cR12313964/.ACFS/snaps/igi19cR12
RO snapshot or RW snapshot:  RO
parent name:                 /fpp_images/images/igi19cR12313964/
snapshot creation time:      Wed Sep 22 19:39:09 2021
file entry table allocation: 126091264   ( 120.25 MB )
storage added to snapshot:   126091264   ( 120.25 MB )


    number of snapshots:  1
    kilosnap state:       ENABLED
    snapshot space usage: 126144512  ( 120.30 MB )

Para converter o snapshot de RO (Read Only) para RW (Read Write), usamos o comando acfsutil snap convert, que tem a seguinte sintaxe:

[grid@fppserver ~]$ acfsutil snap convert
acfsutil snap convert: ACFS-00535: insufficient arguments
Usage: acfsutil [-h] snap convert -w|-r <snap_name> <mountpoint>
                -w                       - convert to a writeable snapshot
                -r                       - convert to a read-only snapshot

5) Alterando o snapshot para RW (Read Write):

[grid@fppserver ~]$ acfsutil snap convert -w igi19cR12 /fpp_images/images/igi19cR12313964/
acfsutil snap convert: Snapshot operation is complete.

6) Removendo o arquivo crsgenconfig_params:

[grid@fppserver ~]$ cd /fpp_images/images/igi19cR12313964/.ACFS/snaps/igi19cR12/swhome/crs/install
[grid@fppserver ~]$ mv crsgenconfig_params crsgenconfig_params.old

7) Colocando o snapshot em RO (Read Only) novamente:

[grid@fppserver install]$ acfsutil snap convert -r igi19cR12 /fpp_images/images/igi19cR12313964/
acfsutil snap convert: Snapshot operation is complete.

8) Instalando o Grid Infrastructure novamente, agora com sucesso:

[grid@fppserver ~]$ rhpctl add workingcopy -workingcopy wc_lab04_gi19cR12 -image gi19cR12 -path /u01/app/product/19.12.0.0/grid -targetnode lab04 -user grid -responsefile /tmp/response_gi19c.rsp -ignoreprereq -root
Enter user "root" password:
fppserver.dibiei.com: Audit ID: 35
fppserver.dibiei.com: Storing metadata in repository for working copy "wc_lab04_gi19cR12" ...
fppserver.dibiei.com: Creating snapshot "tmpgi19cR12wc_lab04_gi19cR12" ...
fppserver.dibiei.com: Changing the home ownership to user grid...
fppserver.dibiei.com: Copying software contents to Local File System ...
fppserver.dibiei.com: Starting clone operation...
lab04: 
lab04: 
lab04: [INFO] [INS-32183] Use of clone.pl is deprecated in this release. Clone operation is equivalent to performing a Software Only installation from the image. 
lab04: You must use /u01/app/product/19.12.0.0/grid/gridSetup.sh script available to perform the Software Only install. For more details on image based installation, refer to help documentation.
lab04: 
lab04: Starting Oracle Universal Installer...
lab04: 
lab04: ..................................................   5% Done.
lab04: ..................................................   10% Done.
lab04: ..................................................   15% Done.
lab04: ..................................................   20% Done.
lab04: ..................................................   25% Done.
lab04: ..................................................   30% Done.
lab04: ..................................................   35% Done.
lab04: ..................................................   40% Done.
lab04: ..................................................   45% Done.
lab04: ..................................................   50% Done.
lab04: ..................................................   55% Done.
lab04: ..................................................   60% Done.
lab04: ..................................................   65% Done.
lab04: ..................................................   70% Done.
lab04: ..................................................   75% Done.
lab04: ..................................................   80% Done.
lab04: ..................................................   85% Done.
lab04: ..........
lab04: Copy files in progress.
lab04: 
lab04: Copy files successful.
lab04: 
lab04: Link binaries in progress.
lab04: ..........
lab04: Link binaries successful.
lab04: 
lab04: Setup files in progress.
lab04: ..........
lab04: Setup files successful.
lab04: 
lab04: Setup Inventory in progress.
lab04: 
lab04: Setup Inventory successful.
lab04: ..........
lab04: Finish Setup successful.
lab04: The cloning of wc_lab04_gi19cR12 was successful.
lab04: Please check '/u01/app/oraInventory/logs/cloneActions2021-09-22_08-20-20PM.log' for more details.
lab04: 
lab04: Setup Oracle Base in progress.
lab04: 
lab04: Setup Oracle Base successful.
lab04: ..................................................   95% Done.
lab04: 
lab04: As a root user, execute the following script(s):
lab04: 	1. /u01/app/oraInventory/orainstRoot.sh
lab04: 	2. /u01/app/product/19.12.0.0/grid/root.sh
lab04: 
lab04: 
lab04: 
lab04: ..................................................   100% Done.
fppserver.dibiei.com: Successfully executed clone operation.
fppserver.dibiei.com: Executing root script on nodes [lab04].
lab04: Changing permissions of /u01/app/oraInventory.
lab04: Adding read,write permissions for group.
lab04: Removing read,write,execute permissions for world.
lab04: 
lab04: Changing groupname of /u01/app/oraInventory to oinstall.
lab04: The execution of the script is complete.
fppserver.dibiei.com: Successfully executed root script on nodes [lab04].
fppserver.dibiei.com: Executing configuration script on nodes [lab04]
fppserver.dibiei.com: Successfully executed configuration script on nodes [lab04]
fppserver.dibiei.com: Executing root script on nodes [lab04].
lab04: Check /u01/app/product/19.12.0.0/grid/install/root_lab04_2021-09-22_20-21-18-116020450.log for the output of root script
fppserver.dibiei.com: Successfully executed root script on nodes [lab04].
fppserver.dibiei.com: Executing post configuration script on nodes [lab04]
fppserver.dibiei.com: Successfully executed post configuration script on nodes [lab04]
fppserver.dibiei.com: Oracle home provisioned.
fppserver.dibiei.com: Working copy creation completed.

Leave a Reply

Discover more from Blog do Dibiei

Subscribe now to keep reading and get access to the full archive.

Continue reading