Symptoms
- You have an Opsview version between 6.8.5+
From 6.8.5 onwards, Deploy will try to install a database client on the orchestrator, so that it matches the database software on the remote database server (most of the time, these are the same server).
However, if the orchestrator already has a database client installed that is from a different database vendor, the upgrade may fail to work.
Testing shows this works on RHEL8/OEL8, because they use dnf
for package installation and dnf
supports a flag called --allowerasing
which will deinstall the previous database client before replacing it with the desired one.
This problem should only be visible on CentOS7/RHEL7/OEL7/Ubuntu20/Debian10 when manually setting database vendor (opsview_database_package_vendor
in user_vars.yml
) and version (opsview_database_package_version
) in Deploy.
The errors will be something like the below on CentOS7/RHEL7/OEL7 :
TASK [opsview_database : Install MySQL client (yum)] ****
fatal: [tv-o7-rdb-orch]: FAILED! => changed=true
In this case, the orchestrator has mysql-community-client-8.0.33
installed, and deploy will try to install MariaDB-client-10.3.39
.
If you try to install the MySQL client manually with yum install MariaDB-client
, will get:
Transaction check error:
file /usr/bin/mysql from install of MariaDB-client-10.3.39-1.el7.centos.x86_64 conflicts with file from package mysql-community-client-8.0.33-1.el7.x86_64
...
Whereas for Ubuntu20/Debian10 the errors will be something like the below:
TASK [opsview_database : Install MySQL client] ********************************************************************************************************************************************************************
Monday 10 July 2023 08:44:24 +0000 (0:00:00.038) 0:01:31.271 ***********
fatal: [cdb-up-d10-orch]: FAILED! => changed=false
cache_update_time: 1688978663
cache_updated: false
msg: |-
'/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" install 'mysql-client'' failed: E: Unable to correct problems, you have held broken packages.
rc: 100
stderr: |-
E: Unable to correct problems, you have held broken packages.
stderr_lines: <omitted>
stdout: |-
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mysql-client : Depends: mysql-community-client (= 8.0.33-1debian10) but it is not going to be installed
stdout_lines: <omitted>
Workaround Solution:
To resolve this, (CentOS7/RHEL7/OEL7) need to remove the older package first, without breaking dependencies:
rpm -e --nodeps mysql-community-client
Then install the newer one:
yum install MariaDB-client
For Ubuntu 20/Debian10:
The pseudo package mysql-client
cannot be installed, but if you install the requested package instead (in this case, mysq-community-client
), then apt will continue:
apt-get install mysql-community-client
Then re-run deploy to finish the upgrade.
There are no planned code changes to support this, as this is an unlikely scenario and is a one-off upgrade issue.
If you have any issues
- Please contact our team via the chat service box available on any of our websites or via email to support@itrsgroup.com
Make sure you provide us with:
- ANY LOG FILE OR DIAGNOSTIC DATA
- ANY SCREENSHOT
- ANY VENDOR/VERSION etc
-
Tags:
- Opsview
- opsview
- exported_docs_10_05_24
Comments
0 comments
Please sign in to leave a comment.