On one of my Exadata Cloud at Customer system, I recently had an issue which required to check exactly which files were updated when upgrading the cloud-specific tooling included on Exadata Cloud at Customer, also know as
dbaastools_exa. I needed to know if a configuration file had been overwritten or not, when upgrading
dbaastools_exa. My knowledge in RPM packages being very limited, I did some research and here is what I found :
What is the current version of Cloud Tooling installed on my system ?
# rpm -qa | grep -i dbaastools_exa dbaastools_exa-1.0-1+188.8.131.52.0_190606.0657.x86_64 Tue 18 Jun 2019 01:40:35 PM CEST
How and where can I get the corresponding RPM ?
The configuration file
/var/opt/oracle/exapatch/exadbcpatch.cfg contains a variable named
oss_container_url. This URL points to the local Object Storage and displays an XML with a list of all the RPMs available on my Exadata Cloud at Customer system. The URL looks like this :
Accessing this URL, I can look for the exact path of the RPM on the local Object Storage, by searching for pattern
190606 for example :
Then I deduce the full URL where the RPM resides :
wget, I download the aforesaid package :
# wget https://storage.<xxxxxx>.oraclecloudatcustomer.com/v1/Storage-idcs-cloudinfra-<xxx>/dbaas_patch/184.108.40.206.0/190606/dbaastools_exa.rpm --2019-07-03 11:31:52-- https://storage.<xxxxxx>.oraclecloudatcustomer.com/v1/Storage-idcs-cloudinfra-<xxx>/dbaas_patch/220.127.116.11.0/190606/dbaastools_exa.rpm Resolving storage.<xxxxxx>.oraclecloudatcustomer.com... x.x.x.x, x.x.x.x Connecting to storage.<xxxxxx>.oraclecloudatcustomer.com|x.x.x.x|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 379134824 (362M) [application/octet-stream] Saving to: “dbaastools_exa.rpm” 100%[================================================================================================>] 379,134,824 108M/s in 3.5s 2019-07-03 11:32:00 (103 MB/s) - “dbaastools_exa.rpm” saved [379134824/379134824]
What is inside the package ?
Now that I have the RPM, I want to know what’s in it. I could use
rpm -qlp dbaastools_exa.rpm to list its content. But I really want to explore the files, their content and their timestamp. So I use the 2 commands
# rpm2cpio dbaastools_exa.rpm | cpio -idmv [...] ./var/opt/oracle/rpms ./var/opt/oracle/rpms/dbtools [...] 754707 blocks
With this combination of commands, all the files are extracted locally :
# ll total 734036 -rw-r--r-- 1 root root 379134824 Jun 10 21:38 dbaastools_exa.rpm drwxr-xr-x 3 root root 4096 Jul 3 17:12 scratch drwxr-xr-x 3 root root 4096 Jul 3 17:12 var
And I can easily explore the content and eventually, find what I was looking for 😉
Bonus : What are the preinstall and postinstall scriptlets ?
When an RPM is installed, scripts can be run before or after installation. For example, if a specific file is not supposed to be overwritten, then maybe this file is saved before installation and should be restored after installation. Here is the command to find out what those scriplets are for package
# rpm -qp --scripts dbaastools_exa.rpm preinstall scriptlet (using /bin/sh): mkdir -p /var/opt/oracle chown oracle:oinstall /var/opt/oracle [...] postinstall scriptlet (using /bin/sh): chown oracle:oinstall /var/opt/oracle [...]
Cloud Tooling must be updated frequently on Exadata Cloud at Customer systems. I always try to be very careful everytime a change is carried out on one of my systems, so I find it convenient to have a way to know better what has been modified between two versions of Cloud Tooling. It is also very helpful to understand the product better.