Updating non-appliance deployments to release 6.10.0
Use the instructions on this page to update Resource Manager deployments that are not based on a virtual appliance. The instructions on this page support updates from release 6.9.0 to 6.10.0.
Updates from Resource Manager 6.8.0 have been minimally tested. Release 6.10.0 contains many changes since 6.8.0, so update to 6.9.0 first when you can. RHEL 8 and CentOS 7 are not supported: move the hosts to Rocky Linux 9, AlmaLinux 9, or RHEL 9 before you update Control Center.
To perform some of the procedures on this page, you need:
- A workstation with internet access.
- Permission to download files from delivery.zenoss.io. Customers can request permission by filing a ticket at the Zenoss Support site.
- A secure network copy program.
Upgrade Control Center first
These instructions do not include steps for updating Control Center or the host operating system. Resource Manager 6.10.0 requires Control Center 2.1.0. Update Control Center on every host first. For the procedure, see Updating Control Center to release 2.1.0. For the changes in that release, see the Control Center 2.1.0 release notes.
Updating from Control Center 1.11.0 changes Control Center
The update to Control Center 2.1.0 adds registry authentication on every host and clears the Control Center internal services HBase data. This removes the Control Center internal metric history only. It does not remove Resource Manager device metrics. The Control Center update guide describes both steps.
Prepare to update
Verify normal operation, create backup
Follow these steps to prepare your deployment:
-
Verify that Resource Manager is operating normally.
-
Log in to the Control Center browser interface as
ccuser. -
In the Application column of the Applications table, click Zenoss.resmgr.
-
Verify that all of the services in the IP Assignments table have valid IP addresses.
-
Scroll down to the Services table, and then verify that none of the child services have failing health checks.
-
-
Check the integrity of Resource Manager databases. For more information, see Using Zenoss Toolbox.
-
Create a backup of Resource Manager with the Control Center backup feature.
Install the base image, if necessary
The Resource Manager update script relies on specific content that is typically found within the base image of the installed release. For example, if the base image was installed on RM 6.9, then RM 6.9 is necessary for the script to run successfully.
This base image contains essential components and configurations that the script uses during the update process. However, if the layers of the base image have been flattened to optimize storage and performance after the initial installation, then some important metadata, such as labels, may be lost. The upgrade script might not be able to locate the necessary content within the base image and the script will fail to execute properly.
Follow these steps to determine whether the base image is present, and to download and import it, if necessary.
-
Log in to the Control Center host as
rootor as a user with superuser privileges. -
Search for the base image.
docker images | grep -E 'zenoss/resmgr'-
If the command returns a result, the base image is present. Continue to the next procedure.
-
If the command returns no result, the base image is absent. Perform the remaining steps of this procedure.
-
-
In a web browser, navigate to delivery.zenoss.io, and then log in.
-
Download the self-installing base image file for the currently installed release of Resource Manager, release 6.9.0.
install-zenoss-resmgr_6.9_6.9.0_1.run -
Copy the file to the Control Center master host.
-
Log in to the master host as root or as a user with superuser privileges.
-
Change directory to the directory where the image file is located.
-
Add execute permission to the image file and then import it.
chmod +x ./install-zenoss-resmgr*run && yes | ./install-zenoss-resmgr*run -
Verify the base image is present.
docker images | grep -E 'zenoss/resmgr'
Download and import Resource Manager image files
Use this procedure to download files required to update Resource Manager and then to copy the files to a Control Center master host.
Follow these steps:
-
In a web browser, navigate to delivery.zenoss.io, and then log in.
-
Download the self-installing Docker image files for Resource Manager 6.10.0.
install-gcr.io-zing-registry-188222-resmgr_6.10:6.10.0_<build>.run install-gcr.io-zing-registry-188222-mariadb-resmgr:6.10.0_<build>.run install-zenoss-serviced-isvcs_v80.run install-zenoss-isvcs-zookeeper_v18.run install-zenoss-hbase:24.0.12.run install-zenoss-opentsdb:24.0.12.run install-zenoss-memcached:cc38f31.run install-zenoss-redis:760f98c.run install-zenoss-rabbitmq:5ccc9e3.run install-zenoss-metric-consumer:dc5433f.run install-zenoss-query:aa78191.run install-zenoss-solr:1.1.9.run install-zenoss-zproxy:1.0.12.runIf your deployment includes Zenoss Service Impact (Zenoss Service Dynamics only), also download the Impact image file.
install-zenoss-impact_5.7:5.7.0.run -
Copy the files to the Control Center master host.
-
Log in to the master host as root or as a user with superuser privileges.
-
Copy or move the archive files to /root.
-
Add execute permission to the files.
chmod +x /root/*.run -
Change directory to /root.
cd /root -
Import the images.
for image in install-*.run do /bin/echo -en "\nLoading $image..." yes | ./$image done -
List the images in the registry.
docker imagesThe result should include one image for each archive file.
-
Optional: Delete the archive files, if desired.
rm -i ./install-*.run -
Copy the update scripts from the new Resource Manager image to a directory in /root.
docker run -it --rm -v /root:/mnt/root gcr.io/zing-registry-188222/resmgr_6.10:6.10.0_<build> rsync -a /root/6.10.x /mnt/root
Verify the internal services image
Resource Manager 6.10.0 runs the zenoss/serviced-isvcs:v80 internal services image. The
Control Center 2.1.0 update sets it with SERVICED_ISVCS_IMAGE on the master host. Confirm
that the master host runs it.
-
Log in to the Control Center master host as a user with
servicedCLI privileges. -
Display the internal services images. The result includes
zenoss/serviced-isvcs:v80.serviced version | grep ImagesIf the result shows another version, such as
v77, setSERVICED_ISVCS_IMAGE=zenoss/serviced-isvcs:v80in/etc/default/servicedon the master host, and then restart Control Center withsystemctl restart serviced.
Optional: Manage custom MariaDB passwords
If you are using custom database passwords for the mariadb-events and mariadb-model services, the passwords must be managed before starting the update process for Resource Manager.
Follow these steps to determine whether custom passwords are in use:
-
Log in to the Control Center master host as a user with
servicedCLI privileges. -
Display the MariaDB passwords.
serviced service list Zenoss.resmgr | awk '/(zep|zodb).*-password/'When the default passwords are in use, the result looks like this:
"global.conf.zep-admin-password": "", "global.conf.zep-password": "zenoss", "global.conf.zodb-admin-password": "", "global.conf.zodb-password": "zenoss",
You can manage the passwords with either of the following methods:
Perform the update
Stop Resource Manager
Follow these steps:
-
Log in to the Control Center master host as a user with
servicedCLI privileges. -
Check the status of Resource Manager.
serviced service status Zenoss.resmgr --show-fields 'Name,ServiceID,Status'-
If the status of all services is
stopped, this procedure is complete. Continue to the next procedure. -
If the status is
running, perform the remaining steps.
-
-
Stop Resource Manager.
serviced service stop Zenoss.resmgr -
Check the status of Resource Manager.
serviced service status Zenoss.resmgr --show-fields 'Name,ServiceID,Status'Repeat the command until the status of all services is
stopped.
Optional: Keep your changes to the Resource Manager image
By default, the update replaces the Resource Manager image, and changes that you committed
into the image are lost. Examples of such changes are a ZenPack that Zenoss doesn't ship, a
patch to a Zenoss file, a Python module installed with pip, or a file under /etc. To
keep them, update with the --preserve-image-layers option of upgrade-resmgr.sh. Perform
this procedure first.
The option keeps the files that you added in the new Resource Manager image. It doesn't keep a change to a file that the new image also ships. The update reports these files as conflicts, and you make those changes again after the update.
Before you begin, make sure that the master host has:
python3installed.- Free disk in
/root/6.10.xof about three times the size of the Resource Manager image (about twice for the dry run). - Free Docker data space of about twice the size of the Resource Manager image.
Follow these steps:
-
Log in to the Control Center master host as root or as a user with superuser privileges.
-
Run a dry run. It changes nothing and writes the report
/root/6.10.x/rebase-report.txt./root/6.10.x/upgrade-resmgr.sh -n --preserve-image-layers -
Read the report. It lists the following groups:
- Kept: your files that the new image holds.
- Dropped: files that the update doesn't need to keep. Class A is a ZenPack file that
the update restores. Class B is a
.pth, log, or lock file. Class C is compiled Python code or a cache. Unchanged copies and removed paths are counted only. - Conflicts D: you changed a Zenoss file, or added a file that the new image also ships. Your copy is not kept.
- Conflicts E: you removed a file that the new image ships. The removal is not kept.
A row whose old and new Zenoss hashes are equal names a file that a service writes when it starts. Usually you don't need to act on these rows.
-
If the report lists D conflicts, save your copies of those files now. The report gives only the path and the hashes of each file. After the update, the old image remains only in the pre-upgrade snapshot, and it is lost when the snapshot is removed.
a. Find the current Resource Manager image.
```sh TENANT=localhost:5000/$(serviced service list "Zenoss.resmgr/Zenoss/User Interface/Zope" --format '{{.ImageID}}') echo $TENANT ```b. Copy each file in a D row to
/root/rebase-conflicts. The commands change no image and no service.```sh REPORT=/root/6.10.x/rebase-report.txt OUT=/root/rebase-conflicts mkdir -p $OUT cid=$(docker create $TENANT true) awk '$1=="D" {print $2}' $REPORT | while read p; do mkdir -p "$OUT/$(dirname "$p")" docker cp "$cid:/$p" "$OUT/$p" 2>/dev/null || echo "not in the image: $p" done docker rm $cid cp $REPORT $OUT/ find $OUT -type f | wc -l ``` The count is one file for each D row, plus the copy of the report. An E row names a file that you removed, so there is nothing to save for it.c. Optional: To see what you changed in a Zenoss file, save the old Zenoss copy and compare the two. Replace
<path>with the path from the D row.```sh VENDOR=$(awk '/^Old vendor image:/ {print $4}' $REPORT) docker run --rm --entrypoint cat $VENDOR /<path> > $OUT/<path>.vendor diff -u $OUT/<path>.vendor $OUT/<path> ``` -
In the next procedure, start the update script with the
--preserve-image-layersoption.
Note the following limits:
- The option is tested on updates from Resource Manager 6.9.0.
- If you roll back to the pre-upgrade snapshot after an update with this option, don't run the update with the option again. The second run stops, because the first run changed the services migration script.
- The appliance update doesn't use this option. To use it on an appliance, run the script by hand.
Update Resource Manager
Follow these steps to update Resource Manager.
-
Log in to the Control Center master host as root or as a user with superuser privileges.
-
Start the update script.
/root/6.10.x/upgrade-resmgr.shThe update process begins. The following message appears frequently and can be ignored:
sync.go:85: ERR Failed to publish events caused by: EOFIf you changed the Resource Manager image and want to keep the changes, run the script with the
--preserve-image-layersoption instead. First complete the steps in Optional: Keep your changes to the Resource Manager image./root/6.10.x/upgrade-resmgr.sh --preserve-image-layersWith this option, the script saves the current Resource Manager image and the new image, compares their files, writes a new image that carries your changes, and loads it. This step takes several minutes. The time depends on the size of the Resource Manager image and of your own changes, not on the amount of monitoring data, because the databases are stored in Control Center volumes, not in the image. Don't interrupt the script while this step runs.
The script prints a line with the time for each phase of the step, for example
HH:MM:SS Preserve image layers: saving the tenant image .... When the step ends, it prints the new image tag (Rebased tag:), the location of the report (Report:), and the number of conflicts (Conflicts:). Read the full report in/root/6.10.x/rebase-report.txtbefore you continue. To put back a change that the report lists as a conflict, see Optional: Restore a conflicting change after the update. -
(Optional) While the script runs, you might encounter an error. Use the following list to identify the error or errors and apply the recommended solution.
-
You might encounter a common update error. To troubleshoot, see Common update error recovery procedures.
-
You might encounter another known update problem. See Troubleshooting 6.10.0 upgrades.
-
-
Stop Resource Manager. Some Resource Manager services are started during the update, and they must be stopped.
serviced service stop Zenoss.resmgr
Perform post-update tasks
Remove the pre-upgrade snapshot and start Resource Manager
The Resource Manager update script uses Control Center to create and tag a snapshot of the system before it begins the update process. Tagged snapshots persist until they are explicitly removed, and grow over time. When you are satisfied the new release is working properly, remove the pre-update snapshot.
-
Log in to the Control Center master host as a user with
servicedCLI privileges. -
Display a list of all Control Center snapshots, with their tags.
serviced snapshot list -tExample result, truncated to save space:
Snapshot Description Tags xm5mtezbyo2_20160211-220535.480 preupgrade-resmgr-6.10.0The snapshot identifier is shown in the first column.
-
Remove the pre-update snapshot.
Replace Snapshot-ID with the identifier of the pre-update snapshot returned in the previous step:
serviced snapshot remove Snapshot-ID -
Start Resource Manager.
serviced service start Zenoss.resmgr
Rebuild device configurations
Device configurations that were built before the update stay current afterward. Until each device changes, collectors keep using objects that the old ZenPack code built. For example, CiscoMonitor status thresholds fail. To rebuild all device configurations, expire them.
-
After Resource Manager starts, log in to the Control Center master host as a user with
servicedCLI privileges. -
Attach to the
zopeservice as thezenossuser.serviced service attach zope/0 su - zenoss -
Expire all device configurations. Do not give a device argument.
configcache device expireAt the prompt
Recreate all device configurations. Are you sure (y/N)?, entery. The command reports how many device configurations it expired, and the configurations rebuild within a minute. -
Exit the
zopeservice.exit
Optional: Restore a conflicting change after the update
If you updated with --preserve-image-layers and the report listed D conflicts, make those
changes again in the new image. Don't copy a saved file over the new file. The saved file
holds the old Zenoss code around your change.
-
For each file in
/root/rebase-conflicts, check whether the new release already includes your change. Compare your change with the same file in the new image. A support patch is often part of a later release.The path can differ in the new image. For example,
/opt/zenoss/Productsin Resource Manager 6.8 is/opt/zenoss/lib/python2.7/site-packages/Productsin 6.9 and later. -
Log in to the Control Center master host as a user with
servicedCLI privileges. -
Open a shell in the
zopeservice that saves its changes. Replace<name>with a name for the change.serviced service shell -i -s <name> zope bash -
Make the change in the new file, and then exit the shell.
-
Commit the change to the Resource Manager image.
serviced snapshot commit <name> -
Restart the services that use the changed file.
If you use quilt to manage patches, note that the update keeps the quilt metadata in
/opt/zenoss/.pc and /opt/zenoss/patches. A quilt pop can fail after the update.
Optional: Install the application template
The most recent Resource Manager application template is not included in non-appliance updates and is not needed. Use the following procedure if you plan to delete a deployed application template and then redeploy a newer version of the template. (For example, in a development or staging environment.)
Follow these steps
-
In a web browser, navigate to the delivery.zenoss.io site, and then log in.
-
Download the template package file.
zenoss-resmgr-service-6.10.0-1.noarch.rpm -
Copy the package file to the Control Center master host.
-
Log in to the Control Center master host as root or as a user with superuser privileges.
-
Change directory to the directory where the template package file is located.
-
Install the template.
yum install ./zenoss-resmgr-service-6.10.0-1.noarch.rpmThe template file is stored in
/opt/serviced/templates.