Managing custom MariaDB passwords before updating
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 6.5.0.
Follow these steps to determine whether custom passwords are in use:
-
Log in to the Control Center master host as a user with
serviced
CLI 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:
Managing passwords with a script
Use this procedure to maintain your customized MariaDB passwords before updating Resource Manager.
To perform this procedure, 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 utility.
- A user account on the Control Center master host with
serviced
CLI privileges.
Follow these steps:
-
In a web browser, navigate to delivery.zenoss.io, and then log in.
-
Download the
addGlobalConfToMariadb.py
script. The script is located in theresource-manager-65x
folder. -
Use a network copy utility to copy the script to the Control Center master host.
-
Log in to the Control Center master host as a user with
serviced
CLI privileges. -
Create a variable for the ID of the Zope/0 container.
zope0=$(docker container ls --no-trunc --format "{{.ID}} {{.Command}}" | awk '/runzope/ { if ($4 == "0" && $9 !~ "CONFIG") print $1 }') && echo $zope0
-
Copy the script to the temporary directory of the Zope/0 container.
docker cp addGlobalConfToMariadb.py ${zope0}:/tmp
-
Start an interactive session in the Zope/0 container as user
zenoss
.serviced service attach zope/0 su - zenoss
-
Change directory to the migration directory.
cd /opt/zenoss/Products/ZenModel/migrate
-
Copy the
addGlobalConfToMariadb.py
script from the temporary directory.cp /tmp/addGlobalConfToMariadb.py .
-
Migrate the passwords.
-
To migrate 6.3.2 systems:
zenmigrate --step=AddGlobalConfToMariadb --dont-bump
-
To migrate more recent systems:
zenmigrate --step=AddGlobalConfToMariadb
-
-
Exit the container.
exit