Patching Quick Reference
Here is a quick reference for the output of currentPatchingStatus.csh, which is run nationally and reported by Sanford Garrard’s on the weekly email to awips_status list-serve. See Part 2 for instructions on the patching scripts.
These summaries are updated in this folder:
Hazard Services Patching Status folder
The naming is HSmmddyy
Also, the most recent one is usually checked into the OverridesInstaller package as the file globalPatchSummmary.txt
Part 1: Possible Messages in the national file:
(SVN updates need to be run on the LX, scripts get run on the DX)
It is strongly recommended that confirmAll.csh be run before
rerunning currentPatchingStatus.csh.
It is strongly recommended that confirmAll.csh be run before
rerunning currentPatchingStatus.csh.
Example Output from one of the weekly summaries.
Currently these summaries land in this folder:
https://drive.google.com/drive/folders/1swjPnGC8g3FALZP8ZU49QAWqq-rUG63l
These summaries are in documents named like HSmmddyy
ARX
AWIPS release is 19.3.5
Site ARX is at Hazard Services Release 19.3.5
Deprecated patches still installed: 73055@
Needed patches not installed: 76103 76438@ 75208@ 75298@ 73986 57738 76047 75491@ 78126@ 77893@ 82656 80166 75403@ 78706@ 75740 79810 79548
Installed patches that need to be updated: 80308 82905
2020_10_07 missing 82656
Helpful hints:
In these status outputs, the characters @ (at sign), o (lowercase o), or w (lowercase w) are not part of any patch ids; they are information about the state of that patch. See usage information in comments at the top of currentPatchingStatus.csh for more information.
Just because there is a directory present in /localapps/runtime/HazardServices/Patches with content for a patch, it does not necessarily follow that one needs to install that patch. At a minimum, those directories need to be part of the Patch utility subversion repository for as long as it might be necessary to support being able to withdraw those patches at any WFO.
Running currentPatchingStatus.csh will tell you which patches you need but are not installed. If you want to know which patches are installed, run recordSummary.csh.
Part 2: Update and Run PatchUpdate scripts: Sites will want to check and patch HS periodically to make sure they have the latest updates. (Consolidated from Above)
Pre-Install Steps (One time Setup completed above in Part 1.1)
Step 1: Update Patching Scripts
(Assumes these are already pulled down from SCP)
Step 2 Check your current patching status
Dealing with covering conflicts when installing a patch.
The text that follows is an example of the kind of response one sees if a “covering” conflict is encountered:
| The methods: updateStartEndTimesFromRecommendedEvent will be covered up by the same methods in site/OAX/HazardServices/python/events/recommenders/RiverFloodRecommender.py This can indicate an oversight in the updated content. Use -y option to bypass caution against being covered by existing overrides. Attempted to process all 1 files. 0 were successfully processed, 1 failed. 1 total files remain to be processed. Unprocessed files recorded in /home/awips/hsAutoinstall_unprocessed.txt Processing output recorded in /tmp/hsAutoinstall_awips_logfile.txt Patch at region level did not complete with installer arguments of: -m Check /tmp/hsAutoinstall_awips_logfile.txt and then move content of conflicting methods you want to save to another level using the localization perspective before trying a more aggressive set of installer args (-m|-a|-o|-y). Enter new installer args to use: |
If this is encountered, two steps need to be taken. First, respond
-m -y
in order to complete the installation of the region level files for the patch. Once this is done, the patch will still not be in effect when generating hazards for the site(s) for which there are covering conflict files (e.g. OAX in the example above). The patch will be in effect immediately when generating hazards for other sites.
Second, check the status of the covering conflicts involved, and clean them up if necessary, by running the commands that follow.
cd /localapps/runtime/HazardServices/OverridesInstaller
./coverSniffer.py nnnnn
If any of the methods referred to by coverSniffer.py have a * on them, this means that the covering method is a duplicate of the method being covered. This is very easy to clean up, just run:
./coverScrubber.csh nnnnn
If there are methods referred to by coverSniffer.py that do not have a * on them, they need to have the patch functionality in the region level override merged into the covering level method. Running the command that follows will provide assistance in performing this task:
./coverScrubber.csh -m nnnnn
This should produce a directory named like the following with proposed updated overrides:
/localapps/runtime/HazardServices/mergesRootPPPPP/
Note that PPPPP is not literal, nor is it the patch id; it is a process id to ensure unique naming.
Run the following command to check whether any of the proposed updated overrides have text merge conflicts:
./manageCoverConflicts.csh nnnnn -v
If text merge conflicts exist, edit the indicated files to deal with those conflicts. There is guidance about dealing with text merge conflicts here. Do not follow any of the instructions shown that involve running clearBackupOverrides.csh. As you edit the proposed updated overrides, leave in place any comments like the following:
#@# Merged automatically with the same method in
Once you are sure there are no remaining text merge conflicts, you can install the proposed updated overrides. If there is just one or two, which will usually be the case with a cover conflict for a specific patch, it may be just as easy to paste them into the localization perspective. The proposed updated override has the entire content of the override, so remove the entire existing override before pasting in the updated content. The advantage of this is that manageCoverConflicts.csh installs site overrides directly through the file system, which can leave them out of sync with what your Cave sees and won’t share the update by way of Backup Services. Otherwise run manageCoverConflicts.csh without the -v option, e.g.:
./manageCoverConflicts.csh nnnnn
If there are any doubts about how to complete the cleanup of a covering conflict, contact someone for support. If you are dealing with covering conflicts for multiple patches, be sure to deal with them one at a time. And once the conflict has been fully resolved and the updated overrides have been installed, the /localapps/runtime/HazardServices/mergesRootPPPPP directory should be removed.
Dealing with direct conflicts while updating patches.
A direct conflict while updating a patch means the patching action is attempting to update or remove an “unknown” instance of that method. In this context, “known” means one of the following:
A direct conflict is essentially anything that is not a “covering” conflict. When you experience a direct conflict the first thing you need to do is to identify the current override file that is in conflict. In the file /tmp/hsAutoinstall_awips_logfile.txt, any file identified for which the path starts with /awips2/edex/data/utility/common_static/ represents an override file with a direct conflict.
When a direct conflict is encountered, the patch scripting will pause before completion, and will ask you to respond to this:
Enter new installer args to use:
First use the localization perspective to make a temporary copy of any conflicting override at the user or workstation level.
Next, if one needs to complete the installation of a patch, respond:
-a -y
and if one is trying to complete a withdraw of a patch, respond:
-e -y
Finally, you need to inspect the content of your temporary copy to determine if there is any logic present that is not patch logic and you wish to restore. If there is no logic you wish to restore, just delete the temporary copy. If there is logic you wish to restore, how you restore it depends on whether you were installing or withdrawing a patch. If you were withdrawing a patch, what you restore should be your local effects applied to the base level instance of the method(s) being restored. If you were installing a patch, what you restore should be your local effects applied to the patch instance of the method(s) being restored. The file(s) with the patch instance will also be identified in /tmp/hsAutoinstall_awips_logfile.txt. In either case, the file so restored should typically be installed at the site level. Any region level instance(s) should be left in place to implement any needed patch(es) to backup sites.
Troubleshooting problems with subversion.
The various troubleshooting approaches here are only to get your set of patch utility files up to date with the latest contents of the VLab SCP subversion repository. These commands should be run on an lx host. To actually install or withdraw patches, be sure to run those commands on dx3 as user awips.
Troubleshooting approach # 1
| If there is a particular file you are having trouble with, try the following (path/to/problem.file is of course not literal): svn revert path/to/problem.file svn update path/to/problem.file If, while a file is being pulled down, you are given several options as to how to handle it, choose the Postpone option. Then perform the revert/update actions on that file as above. |
Troubleshooting approach # 2
| ls -l /localapps/runtime/HazardServices/Patches/updatePackage.csh Note which user owns updatePackage.csh, try running updatePackage.csh on behalf of that user. |
Troubleshooting approach # 3
| ls -l /localapps/runtime/HazardServices/OverridesInstaller/.svn/wc.db Note which user owns that file, on behalf of that user run chmod 664 /localapps/runtime/HazardServices/OverridesInstaller/.svn/wc.db ls -l /localapps/runtime/HazardServices/Patches/.svn/wc.db Note which user owns that file, on behalf of that user run chmod 664 /localapps/runtime/HazardServices/Patches/.svn/wc.db ls -l /localapps/runtime/HazardServices/Patches/updatePackage.csh Note which user owns updatePackage.csh, be sure to run updatePackage.csh on behalf of that user. |
Troubleshooting approach # 4
| Run these commands as root: chown -R awips:fxalpha /localapps/runtime/HazardServices/Patches chown -R awips:fxalpha /localapps/runtime/HazardServices/OverridesInstaller chmod g+w -R /localapps/runtime/HazardServices/Patches chmod g+w -R /localapps/runtime/HazardServices/OverridesInstaller chmod 664 /localapps/runtime/HazardServices/OverridesInstaller/.svn/wc.db chmod 664 /localapps/runtime/HazardServices/Patches/.svn/wc.db After these root commands, it should be possible to run updatePackage.csh on behalf of any user that is in group fxalpha |
Troubleshooting approach # 5
| This troubleshooting approach involves a complete reinitialization of the subversion repositories. As user awips run: cd /localapps/runtime/HazardServices/Patches tar cfp ~/patchRecord.tar */record Try these commands as user awips, but these commands might need root: cd /localapps/runtime/HazardServices/ rm -rf Patches OverridesInstaller As user awips run: cd /localapps/runtime ( umask 002 ; svn checkout https://vlab.ncep.noaa.gov/svn/nwsscp/HazardServices/Patches/trunk \ HazardServices/Patches ) ( umask 002 ; svn checkout https://vlab.ncep.noaa.gov/svn/nwsscp/HazardServices/OverridesInstaller/trunk \ HazardServices/OverridesInstaller ) chmod 664 HazardServices/Patches/.svn/wc.db chmod 664 HazardServices/OverridesInstaller/.svn/wc.db chmod g+w -R HazardServices/Patches HazardServices/OverridesInstaller cd HazardServices/Patches ./reorganizeUtilities2021.csh tar xfp ~/patchRecord.tar |
Troubleshooting approach # 6
This approach should be reserved for the case where updating a patch is considered time critical, and for some reason connectivity to the SCP has been interrupted and is not expected to be restored in a timely manner. Downloading the files by way of a tar will likely leave your subversion repositories in a non-functional state. After connectivity to the SCP is restored, eventually Troubleshooting approach # 5 will need to be invoked to get your subversion repositories back into a functional state.
Download overridesInstaller.tar.gz
Place these tars in ~awips As user awips, run: tar xzf ~awips/overridesInstaller.tar.gz tar xzf ~awips/hsPatcher.tar.gz cd HazardServices/Patches ./reorganizeUtilities2021.csh |
[a]Under IdM cannot run as "awips". sudo -i -u awips fails user not allowed to execute /bin/bash -c ./UpdatePackage.csh as awips and fails as sudo ./UpdatePackage.csh
[b]Run it without the "-i"...just "-u awips"