we have several redhat servers which we patch from redhat satellite.
To avoid confusion, I'll use the term "host" to denote the server which is being patched.
We have a script, say, patch.sh, which we'll schedule to run in all redhat hosts (virtual machine) using "Remote command" option in Redhat satellite.
This patch.sh script runs "yum update" followed by "vmware-config-tools -d" and reboot. There's more to it, but this is just the outline.
My understanding is, "yum update" downloads all packages to /var/cache/yum/ of the host, under various sub-directories that are named based on the channels the hosts are subscribed to, and then installs the packages and remove them from there.
Have pasted the output of command "ls -lt /var/cache/yum" below for better understanding.
[root@xyzdev01]#ls -lt /var/cache/yum total 64 drwxr-xr-x 3 root bin 4096 Mar 1 22:27 rhel-5-64bit drwxr-xr-x 3 root bin 4096 Mar 1 22:27 rhel-5-64bit-supplementary drwxr-xr-x 3 root bin 4096 Mar 1 22:27 rhel-5-64bit-rhn-tools
Here under these directories, for example, say under rhel-5-64bit, there are few files along with a sub-directory called packages, where packages from this channel gets downloaded to.
Per my understanding, this packages sub-directory is empty in servers where the patching is successful.
Sometimes, what happens is, the package gets downloaded to the host, but due to some intermittent connectivity issue between Redhat satellite server and host where patching is happening (i.e) where the patch.sh script is being run, it doesn't gets installed. But when Redhat satellite server re-establishes the connection with the host, it thinks that the host is patched and proceeds with the reboot and these servers gets listed under "Completed Systems" in Redhat satellite, whereas actually the host is not patched. Here, the package stays in the /var/cache/yum/channel_name/packages without being installed.
To avoid this corner case, we're planning to implement an additional check in the patch.sh script.
I have 2 questions.
1) Is my understanding right?
2) If yes, then if i place an additional check in the script to check for **.rpms* under /var/cache/yum before it actually performs the next steps (i.e) vmware-config-tools -d and reboot, would it work?
Appreciate any suggestions and clarifications.