Closed xtender closed 3 years ago
I've added a couple of ls -la
before echo "Running: $cmd";
in patchDBBinaries.sh
cmd="${ORACLE_HOME}/OPatch/opatchauto apply -binary -oh $ORACLE_HOME ${PATCH_DIR}/${ru_patch}";
echo "ls: ";
ls -la "${PATCH_DIR}";
ls -la "${PATCH_DIR}/${ru_patch}";
echo "Running: $cmd";
and it showed:
ls:
total 500
drwxr-xr-x 1 oracle dba 4096 Dec 28 12:46 .
drwxr-xr-x 1 root root 4096 Dec 28 12:45 ..
drwxr-xr-x 5 oracle oinstall 4096 Oct 8 04:34 31771877
-rw-rw-r-- 1 oracle oinstall 475361 Oct 20 19:54 PatchSearch.xml
drwxr-xr-x 2 oracle dba 4096 Oct 1 09:36 one_offs
-rwxr-xr-- 1 oracle dba 2020 Dec 28 12:44 patchDBBinaries.sh
drwxr-xr-x 2 oracle dba 4096 Dec 25 12:17 release_update
total 100
drwxr-xr-x 5 oracle oinstall 4096 Oct 8 04:34 .
drwxr-xr-x 1 oracle dba 4096 Dec 28 12:46 ..
-rw-r--r-- 1 oracle oinstall 73448 Oct 8 04:36 README.html
-rw-r--r-- 1 oracle oinstall 21 Oct 8 04:36 README.txt
drwxr-x--- 3 oracle oinstall 4096 Oct 8 04:36 custom
drwxr-x--- 3 oracle oinstall 4096 Oct 8 04:36 etc
drwxr-x--- 39 oracle oinstall 4096 Oct 8 04:34 files
Running: /opt/oracle/product/19c/dbhome_1/OPatch/opatchauto apply -binary -oh /opt/oracle/product/19c/dbhome_1 /opt/install/patches/31771877
OPATCHAUTO-72156: Patch location not accessible or empty.
OPATCHAUTO-72156: Patch location supplied cannot be accessed or no content found.
OPATCHAUTO-72156: Please provide a correct patch location.
Even with newer OPatch 12.2.0.1.23:
Unzipping /opt/install/patches/release_update/p31771877_190000_Linux-x86-64.zip
/opt/install/patches/one_offs/p6880880_190000_Linux-x86-64.zip
Removing directory /opt/oracle/product/19c/dbhome_1/OPatch
Unzipping OPatch archive /opt/install/patches/one_offs/p6880880_190000_Linux-x86-64.zip to /opt/oracle/product/19c/dbhome_1
Applying Release Update: 31771877 in /opt/install/patches/31771877
Running: cd /opt/install/patches/31771877 && pwd && echo && ls -la && /opt/oracle/product/19c/dbhome_1/OPatch/opatchauto apply /opt/install/patches/31771877 -binary -oh /opt/oracle/product/19c/dbhome_1 -target_type rac_database
/opt/install/patches/31771877
total 100
drwxr-xr-x 5 oracle oinstall 4096 Oct 8 04:34 .
drwxr-xr-x 1 oracle dba 4096 Dec 30 13:23 ..
-rw-r--r-- 1 oracle oinstall 73448 Oct 8 04:36 README.html
-rw-r--r-- 1 oracle oinstall 21 Oct 8 04:36 README.txt
drwxr-x--- 3 oracle oinstall 4096 Oct 8 04:36 custom
drwxr-x--- 3 oracle oinstall 4096 Oct 8 04:36 etc
drwxr-x--- 39 oracle oinstall 4096 Oct 8 04:34 files
OPATCHAUTO-72156: Patch location not accessible or empty.
OPATCHAUTO-72156: Patch location supplied cannot be accessed or no content found.
OPATCHAUTO-72156: Please provide a correct patch location.
perl patching initializaion failed with error code 255.
Please copy the patch inside extensions/patching/patches/release_update directory and retry. That is what is mentioned in the patching readme as well.
@rishabh20 that's exactly what I did, and you can see it in the log above:
Unzipping /opt/install/patches/release_update/p31771877_190000_Linux-x86-64.zip
@xtender What is the size of the patch?
@rishabh20 1424692091 bytes:
[root@orasql release_update]# pwd
/home/xtender/github-oracle/docker-images/OracleDatabase/SingleInstance/extensions/patching/patches/release_update
[root@orasql release_update]# ls -l
total 1391308
-rw-rw-r-- 1 oracle 54322 1424692091 Dec 23 20:59 p31771877_190000_Linux-x86-64.zip
@xtender The patch looks okay. I tried following the same steps on my machine and it went through fine. As of now, I don't know what could be the issue here. Please explain how u built the base 19.3 image.
@rishabh20 again, docker builds it, but oracle in resulted image returns still 19.3. Are you sure that your final oracle shows 19.9 in v$instance?
select version_full from v$instance;
VERSION_FULL
-----------------
19.3.0.0.0
Please explain how u built the base 19.3 image.
It was created successfully using ./buildContainerImage.sh from (docker-images/OracleDatabase/SingleInstance/dockerfiles/19.3.0/
) from this repo as per instrunction:
./buildContainerImage.sh -v 19.3.0 -e
I can confirm that i reproduced this issue on current git latest via
LINUX.X64_193000_db_home.zip
and p6880880_190000_Linux-x86-64.zip
to /data/docker-images/OracleDatabase/SingleInstance/dockerfiles/19.3.0
folder/data/docker-images/OracleDatabase/SingleInstance/dockerfiles>./buildContainerImage.sh -v 19.3.0 -e
p32226239_190000_Linux-x86-64.zip
to /data/docker-images/OracleDatabase/SingleInstance/extensions/patching/patches/release_update
/data/docker-images/OracleDatabase/SingleInstance/extensions> ./buildExtensions.sh -a -b oracle/database:19.3.0-ee -t oracle/database:19.10.0-ee
the resulting image claims its still 19.3.0
and the patches dont seem to be applied.
When trying via the one_offs p32067171_190000_Linux-x86-64.zip
and p32218454_190000_Linux-x86-64.zip
(and opatch update p6880880_190000_Linux-x86-64.zip
) in /data/docker-images/OracleDatabase/SingleInstance/extensions/patching/patches/one_offs
i get the following error during the build:
==Following patches FAILED in apply:
Patch: /opt/install/patches/32218454
Log: /opt/oracle/product/19c/dbhome_1/cfgtoollogs/opatchauto/core/opatch/opatch2021-03-31_19-10-51PM_1.log
Reason: Failed during Analysis: CheckPatchApplicable Failed, [ Prerequisite Status: FAILED, Prerequisite output:
The details are:
Patch 32218454:
Jar Action: Destination File "/opt/oracle/product/19c/dbhome_1/sqldeveloper/sqldeveloper/lib/osdt_cert.jar" does not exists or is not writeable
'oracle.dbdev, 19.0.0.0.0': Cannot update file '/opt/oracle/product/19c/dbhome_1/sqldeveloper/sqldeveloper/lib/osdt_cert.jar' with 'oracle/security/crypto/cert/GeneralName$Type.class'
Used files are:
> ls -la p*
-rw------- 1 user user 125586988 Mar 30 00:42 p32067171_190000_Linux-x86-64.zip
-rw------- 1 user user 1495300727 Mar 30 00:41 p32218454_190000_Linux-x86-64.zip
-rw------- 1 user user 3042388690 Mar 29 12:28 p32226239_190000_Linux-x86-64.zip
-rw------- 1 user user 120761121 Mar 29 11:48 p6880880_190000_Linux-x86-64.zip
> md5sum p*
d58d6a9cd276838648bfda323a8f6119 p32067171_190000_Linux-x86-64.zip
add92eb9abca0f67593ae08e128bc3d4 p32218454_190000_Linux-x86-64.zip
732ba3134a302320930a22676dff82f4 p32226239_190000_Linux-x86-64.zip
9672129ff86a7bc4eddc36097b1ba2ff p6880880_190000_Linux-x86-64.zip
@theBNT The issue that you are facing can be resolved by passing additional build argument (while creating 19.3 docker image) to make SLIMMING env var false. By default SLIMMING is true. If SLIMMING env var is true some unnecessary components are removed from the image and sqldeveloper is one of them (causing the issue in this case).
Example build command: ./buildContainerImage.sh -i -e -v 19.3.0 -o '--build-arg SLIMMING=false'
@xtender I am not able to reproduce this issue on my machine. I used OPatch 12.2.0.1.24 and I am able to build extended image without any error.
My resulted image is showing 19.9.0.0.0 in v$instance
SQL> select version_full from v$instance;
VERSION_FULL
-----------------
19.9.0.0.0
Not sure what issue is causing this error. Can you pls check logs in $ORACLE_HOME/cfgtoollogs/opatchauto/ directory for some additional information this error ?
@xtender Also can you pls try buildling extension with the 19.3 base image with SLIMMING false as I explained above ?
@abhisbyk thank you so much, this was indeed the issue and i also found it described only here. Patching now works for me!
The logical followup question is now: how to produce slim(er) patched images? Since all layers still exit, it doesnt make sense to delete the files after patching. The resulting image is 17GB! Docker export/import is not an option because all the metadata is gone. Docker squashing is still in experimental. Will this be addressed by PR #1666 or will patching not work there as well? #1265 is somewhat related.
@theBNT I guess currently patching will not work with the slim image as per the solution suggested by PR #1666. The reason is that cleanup.sh script introduced in the PR will mandatorily remove the components like sqldeveloper, apex etc (as in our case happens when SLIMMING is set). There is no option for not removing these components in that PR, hence, the same error that you were having initially will come.
But the idea of that PR (using compressed RMAN backup for creating the database, while the slimmer docker image only have binaries required) is interesting. Thorough testing is required to check whether this will be able to reduce the size of patched image.
@xtender Any update on the issue that you are facing ?
Closing this issue for now as not able to replicate it on the local development environment.
I'm trying to upgrade an image with 19.3 up to 19.9: I've put p31771877_190000_Linux-x86-64.zip into patches directory and ran
./buildExtensions.sh -a -b oracle/database:19.3.0-ee -t oracle/database:19.9.0-ee
and looks like it can't upgrade because of the following errors in step 5:
Full log: