Add sdp_upgrade.sh script to the SDP.
Add a script to the SDP that knows how to upgrade the to the
current version from earlier versions on a single machine, and
can be run on multiple machines as part of a larger global
topology upgrade process.
The sdp_upgrade.sh requires the old SDP to be 2020.1 or newer.
Each future version of the SDP will know how to upgrade from all
prior releases, so long as the starting point is SDP 2020.1. or
About this script:
* This script will be safe to run in environments where live
p4d instances are running, and will not require p4d to be
stopped or upgraded. Upgrade of the SDP will be cleanly
separated from the upgrade the Helix Core binaries,
* Preflight checks will be done first, including requirng a
successful verfify_sdp.sh call of the old version. Among other
things, this will verify the the /p4/sdp/Version file exists
and references the SDP 2020.1+.
* This will ugprade from SDP 2020.1 and all future versions, but
not from pre-2020.1 SDP versions.
* For upgrading from pre-20.1 versions, the script will reference
detailed documentation availabile in SDP 2020.1 for doing in-place
or migration-style updgrades for SDP releases since the first
official SDP release in 2007. The documentation will account for
SDP changes over the years including structural changes, changes in
format of init scripts, changes in the format of systemd *.service
files, changes in generated and often customized shell environment
files, etc. Due to blending of configuration and customization,
automation of upgrades from pre-2020.1 releases is not being
* This script will upgrade SDP script files, and provide guidance
on any post-processing steps, e.g. adjustments to crontabs.
* This will re-generate generated SDP configuraion files, including:
- /p4/common/config/p4_N.vars (for all instances)
The re-generation logic will preserve current settings, and
also preserve any customizations made below a special tag in
those generated files that says:
### MAKE LOCAL CHANGES HERE
Starting with SDP r21.1, custom logic will be moved to a new
The logic will preserve anything below that tag. It will also
preserve specific changes made above the tag. Changes preserved
above the tag include the right-side of assignments for specific
settings. For p4_vars, preserved setting values include:
Note that the above list excludes any values that are calculated.
* The /hxdepots/sdp folder will be moved aside, and the
new SDP deployed in /hxdepots/sdp.
* The SDP_VERSION and SDP_DATE counters will be set.
* This will be work for basic, non-HMS environments to simpfliy
upgrades of the SDP, but will be compatible with HMS upgrade
procedures and mechanisms (which will need some evolution to
adapt to this).