Please follow these upgrade instructions in our Administration Guide:
https://severalnines.com/docs/administration.html#upgrading-clustercontrol
[DEPRECATED - DON'T READ BELOW]
CMON 1.4. has been released!
Below you find an example how to upgrade from 1.2.8 to 1.4.1. You have the option to either to an automatic upgrade or manual (recommended) upgrade.
Choose the installation/upgrade method that applies to your system.
IMPORTANT CHANGE! The controller requires as of 1.2.9 that port 9500 is open between the web server (apache) and the cmon process.
[DEPRECATED] APT Repository (Recommended way to upgrade Debian/Ubuntu based systems)
Even if you have previously installed from our tarball or .deb packages it is possible to switch to our APT repository and upgrade.
Setup the repository ONLY IF YOU HAVE NOT DONE IT BEFORE:
# SETUP THE REPOSITORY
wget http://repo.severalnines.com/severalnines-repos.asc -O- | sudo apt-key add - echo 'deb [arch=amd64] http://repo.severalnines.com/deb ubuntu main' | sudo tee /etc/apt/sources.list.d/s9s-repo.list
New for 1.3.0 and later !! Important !! Create a default /etc/cmon.cnf file.
This applies if and only if you have a '/etc/cmon.cnf' file that contains a parameter with 'cluster_id' then perform these steps before upgrading using apt-get.
# Create the new configuration directory
$ mkdir /etc/cmon.d
# Create the new /etc/cmon.d/cmon_<cluster_id>.cnf file
# Use the cluster_id in /etc/cmon.cnf to name the new configuration file, e.g., /etc/cmon.d/cmon_1.cnf
$ cp /etc/cmon.cnf /etc/cmon.d/cmon_<cluster_id>.cnf
# Create the new default /etc/cmon.cnf file
# Edit /etc/cmon.cnf file and remove all parameters except the following 4:
mysql_port=<controller mysql server's mysql port>
mysql_password=<cmon user password>
mysql_hostname=<controller hostname/ip>
hostname=<controller hostname/ip>
# Your /etc/cmon.cnf file should now only contain above 4 parameters while
# your old configuration file lives in /etc/cmon.d/cmon_<cluster_id>.cnf
Install the software:
# INSTALL THE SOFTWARE
sudo apt-get update
sudo apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install clustercontrol clustercontrol-cmonapi clustercontrol-controller clustercontrol-nodejs
Upgrade the schema (showing from version v 1.2.8):
# APPLY SCHEMA
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.2.8-1.2.9.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.2.9-1.2.10.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.2.10-1.2.11.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.2.11-1.2.12.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.2.12-1.3.0.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.3.0-1.3.1.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.3.1-1.3.2.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.3.2-1.4.0.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.4.0-1.4.1.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_data.sql
# IF WWWROOT IS /var/www/html/ DO (e.g Ubuntu 14.04 or later):
mysql -f -h127.0.0.1 -ucmon -p dcps < /var/www/html/clustercontrol/sql/dc-schema.sql
# IF WWWROOT IS /var/www/ DO (e.g Ubuntu 12.04):
mysql -f -h127.0.0.1 -ucmon -p dcps < /var/www/clustercontrol/sql/dc-schema.sql
Restart the controller:
# CLEAR MODEL CACHE (WWWROOT FOR UBUNTU 12.04 AND EARLIER IS /var/www/)
rm -f /var/www/html/clustercontrol/app/tmp/cache/models/*
rm -rf /var/www/clustercontrol/app/tmp/cache/models/*
# RESTART CMON
sudo service cmon restart
Upgrade is now complete.
YUM Repository (Recommended way to upgrade Redhat/Centos based systems)
Even if you have previously installed from our tarball or .rpm packages it is possible to switch to our YUM repository and upgrade.
Setup the repository ONLY IF YOU HAVE NOT DONE IT BEFORE:
wget http://repo.severalnines.com/severalnines-repos.asc -Oseveralnines-repos.asc
# REQUIRES 'ROOT' USER: rpm --import severalnines-repos.asc # for older distros/yum cat - > /etc/yum.repos.d/s9s-repo.repo <<REPOEND [s9s-repo] name = Severalnines Release Repository baseurl = http://repo.severalnines.com/rpm/os/x86_64 enabled = 1 gpgkey = http://repo.severalnines.com/severalnines-repos.asc gpgcheck = 1 REPOEND
New for 1.3.0 and above !! Important !! Create a default /etc/cmon.cnf file.
This applies if and only if you have a '/etc/cmon.cnf' file that contains a parameter with 'cluster_id' then perform these steps before upgrading using yum.
# Create the new configuration directory
$ mkdir /etc/cmon.d
# Create the new /etc/cmon.d/cmon_<cluster_id>.cnf file
# Use the cluster_id in /etc/cmon.cnf to name the new configuration file, e.g., /etc/cmon.d/cmon_1.cnf
$ cp /etc/cmon.cnf /etc/cmon.d/cmon_<cluster_id>.cnf
# Create the new default /etc/cmon.cnf file
# Edit /etc/cmon.cnf file and remove all parameters except the following 4:
mysql_port=<controller mysql server's mysql port>
mysql_password=<cmon user password>
mysql_hostname=<controller hostname/ip>
hostname=<controller hostname/ip>
# Your /etc/cmon.cnf file should now only contain above 4 parameters while
# your old configuration file lives in /etc/cmon.d/cmon_<cluster_id>.cnf
Install the software:
# INSTALL THE SOFTWARE (as 'root' or 'sudo'):
yum clean all
yum install clustercontrol clustercontrol-cmonapi clustercontrol-controller clustercontrol-nodejs
Upgrade the schema (showing from version v 1.2.8):
# APPLY SCHEMA
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.2.8-1.2.9.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.2.9-1.2.10.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.2.10-1.2.11.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.2.11-1.2.12.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.2.12-1.3.0.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.3.0-1.3.1.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.3.1-1.3.2.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.3.2-1.4.0.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.4.0-1.4.1.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_data.sql
mysql -f -h127.0.0.1 -ucmon -p dcps < /var/www/html/clustercontrol/sql/dc-schema.sql
Restart the controller:
# CLEAR MODEL CACHE
rm -f /var/www/html/clustercontrol/app/tmp/cache/models/*
# Set owner
chown -R apache.apache /var/www/html/clustercontrol
# RESTART CMON (as 'root' or 'sudo'): service cmon restart
Upgrade is now complete.
Manual Upgrade - DEB install (Ubuntu)
New for 1.3.0 and above !! Important !! Create a default /etc/cmon.cnf file.
This applies if and only if you have a '/etc/cmon.cnf' file that contains a parameter with 'cluster_id' then perform these steps before upgrading using apt-get.
# Create the new configuration directory
$ mkdir /etc/cmon.d
# Create the new /etc/cmon.d/cmon_<cluster_id>.cnf file
# Use the cluster_id in /etc/cmon.cnf to name the new configuration file, e.g., /etc/cmon.d/cmon_1.cnf
$ cp /etc/cmon.cnf /etc/cmon.d/cmon_<cluster_id>.cnf
# Create the new default /etc/cmon.cnf file
# Edit /etc/cmon.cnf file and remove all parameters except the following 4:
mysql_port=<controller mysql server's mysql port>
mysql_password=<cmon user password>
mysql_hostname=<controller hostname/ip>
hostname=<controller hostname/ip>
# Your /etc/cmon.cnf file should now only contain above 4 parameters while
# your old configuration file lives in /etc/cmon.d/cmon_<cluster_id>.cnf
# You must be 'root' or use 'sudo'
# On the Controller do:
wget http://severalnines.com/downloads/cmon/clustercontrol-nodejs_1.4.1-86_x86_64.deb
wget http://severalnines.com/downloads/cmon/clustercontrol_1.4.1-3048_x86_64.deb
wget http://severalnines.com/downloads/cmon/clustercontrol-cmonapi_1.4.1-266_x86_64.deb
wget http://severalnines.com/downloads/cmon/clustercontrol-controller-1.4.1-1856-x86_64.deb
dpkg -i clustercontrol_1.4.1-3048_x86_64.deb clustercontrol-cmonapi_1.4.1-266_x86_64.deb clustercontrol-controller-1.4.1-1856-x86_64.deb clustercontrol-nodejs_1.4.1-86_x86_64.deb
# Stop the controller (issue 'killall -9 cmon' if it fails):
service cmon stop
# Update db schema :
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db.sql
## NOTE: Apply mods files from CMON version you currently use (you can ignore warnings):
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.2.8-1.2.9.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.2.9-1.2.10.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.2.10-1.2.11.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.2.11-1.2.12.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.2.12-1.3.0.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.3.0-1.3.1.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.3.1-1.3.2.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.3.2-1.4.0.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.4.0-1.4.1.sql
# Update data:
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_data.sql
# If WWWROOT is /var/www/html/ do (e.g Ubuntu 14.04 or later):
mysql -f -h127.0.0.1 -ucmon -p dcps < /var/www/html/clustercontrol/sql/dc-schema.sql
# If WWWROOT is /var/www/ do (e.g Ubuntu 12.04):
mysql -f -h127.0.0.1 -ucmon -p dcps < /var/www/clustercontrol/sql/dc-schema.sql
rm -f /var/www/html/clustercontrol/app/tmp/cache/models/*
rm -rf /var/www/clustercontrol/app/tmp/cache/models/*
apachectl restart
# Restart CMON:
service cmon restart
Upgrade is now complete.
Manual Upgrade - RPM install (Redhat)
New for 1.3.0 and above !! Important !! Create a default /etc/cmon.cnf file.
This applies if and only if you have a '/etc/cmon.cnf' file that contains a parameter with 'cluster_id' then perform these steps before upgrading using apt-get.
# Create the new configuration directory
$ mkdir /etc/cmon.d
# Create the new /etc/cmon.d/cmon_<cluster_id>.cnf file
# Use the cluster_id in /etc/cmon.cnf to name the new configuration file, e.g., /etc/cmon.d/cmon_1.cnf
$ cp /etc/cmon.cnf /etc/cmon.d/cmon_<cluster_id>.cnf
# Create the new default /etc/cmon.cnf file
# Edit /etc/cmon.cnf file and remove all parameters except the following 4:
mysql_port=<controller mysql server's mysql port>
mysql_password=<cmon user password>
mysql_hostname=<controller hostname/ip>
hostname=<controller hostname/ip>
# Your /etc/cmon.cnf file should now only contain above 4 parameters while
# your old configuration file lives in /etc/cmon.d/cmon_<cluster_id>.cnf
RPM is default for Galera and MySQL Replication. For MySQL Cluster, using RPMs is optional. If you did not tick the Use RPM checkbox go to TAR.GZ install in the next section.
# You must be 'root' or use 'sudo'
# On the Controller do:
wget http://severalnines.com/downloads/cmon/clustercontrol-cmonapi-1.4.1-266-x86_64.rpm
wget http://severalnines.com/downloads/cmon/clustercontrol-controller-1.4.1-1856-x86_64.rpm wget http://severalnines.com/downloads/cmon/clustercontrol-nodejs-1.4.1-86-x86_64.rpm
wget http://severalnines.com/downloads/cmon/clustercontrol-1.4.1-3048-x86_64.rpm
yum localinstall clustercontrol-*
# Stop the controller (issue 'killall -9 cmon' if it fails):
service cmon stop
# Update db schema:
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db.sql
## NOTE: Apply mods files from CMON version you currently use (you can ignore warnings):
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.2.8-1.2.9.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.2.9-1.2.10.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.2.10-1.2.11.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.2.11-1.2.12.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.2.12-1.3.0.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.3.0-1.3.1.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.3.1-1.3.2.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.3.2-1.4.0.sql
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_db_mods-1.4.0-1.4.1.sql
# Update data:
mysql -f -h127.0.0.1 -ucmon -p cmon < /usr/share/cmon/cmon_data.sql
# If WWWROOT is /var/www/html/ do (e.g Ubuntu 14.04 or later):
mysql -f -h127.0.0.1 -ucmon -p dcps < /var/www/html/clustercontrol/sql/dc-schema.sql
rm -f /var/www/html/clustercontrol/app/tmp/cache/models/*
rm -rf /var/www/clustercontrol/app/tmp/cache/models/*
chown -R apache.apache /var/www/html/clustercontrol
# Restart CMON:
service cmon restart
Upgrade is now complete. If you need to upgrade from an older version please let us know here.
Comments
47 comments
Nevermind, I pressed Cluster Registrations link on top and then Cluster and it came back..
Hi,
Command to add repository for Debian is not correct ! When I execute I get only OK in "/etc/apt/sources.list.d/s9s-repo.list".
##########
cat /etc/apt/sources.list.d/s9s-repo.list
OK
############
Can you please provide correct command how to add repo for Debian?
I also got errors when importing data in DB.
mysql -uroot -p -f cmon < /usr/share/cmon/cmon_db_mods-1.2.8-1.2.9.sql
Enter password:
ERROR 1054 (42S22) at line 5: Unknown column 'component' in 'simple_alarm'
mysql -uroot -p < /usr/share/cmon/cmon_data.sql
Enter password:
ERROR 1054 (42S22) at line 14: Unknown column 'cid' in 'field list'
Correct script for Debian should be:
mysql -uroot -p -f cmon < /usr/share/cmon/cmon_db.sql
mysql -uroot -p -f cmon < /usr/share/cmon/cmon_db_mods-1.2.6-1.2.7.sql
mysql -uroot -p -f cmon < /usr/share/cmon/cmon_db_mods-1.2.7-1.2.8.sql
mysql -uroot -p -f cmon < /usr/share/cmon/cmon_db_mods-1.2.8-1.2.9.sql
mysql -uroot -p -f cmon < /usr/share/cmon/cmon_data.sql
Hi Aigars,
We will look into it, particularly about the repo setup, but the sql scripts seems already to be written in the correct order.
Best regards
Johan
Works like a charm on Debian 7
Just upgraded from 1.2.8 to 1.2.9 and now I am stuck in redirect loops.
Deleted all cookies from the domain, even restarted the box just in case - still redirects forever after login.
We are using nginx on CentOS following exactly the instructions given here:
http://www.severalnines.com/blog/how-configure-clustercontrol-run-nginx
Have there been changes to the file/url structure? (Guess so...)
TIA!!
Just for clarification, this is what the nginx access log gives:
62.xxx.xx.xxx - - [18/Mar/2015:22:32:18 +0100] "GET /clustercontrol/ HTTP/1.1" 302 5 "-" "Mozilla/5.0"
62.xxx.xx.xxx - - [18/Mar/2015:22:32:18 +0100] "GET /clustercontrol/users/login HTTP/1.1" 302 5 "-" "Mozilla/5.0"
62.xxx.xx.xxx - - [18/Mar/2015:22:32:19 +0100] "GET /clustercontrol/ HTTP/1.1" 302 5 "-" "Mozilla/5.0"
62.xxx.xx.xxx - - [18/Mar/2015:22:32:19 +0100] "GET /clustercontrol/users/login HTTP/1.1" 302 5 "-" "Mozilla/5.0"
and so on and so on.
Seems like the login mechanism has changed or something along those lines.
Hi Tobi,
Please add following rewrite rules to the server section of your nginx config file. In 1.2.9 couple of .htaccess files were added and nginx doesn't support them.
location / {
rewrite ^/$ /app/webroot/ break;
rewrite ^(.*)$ /app/webroot/$1 break;
}
location /app/webroot/ {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?/$1 break;
}
}
You're a star!
That works fine now!
Hi Johan,
I have 1.2.9.657 Cluster control. When i executed the procedure I found a few error:
Cannot open: clustercontrol-controller-1.2.10-727-x86_64.rpm. Skipping.
When I checked my actual version I see:
|
ClusterControl UI version:
| 1.2.10.5dbcb85
|
|
ClusterControl CMON Version:
| 1.2.9.713
|
|
CMON API Version:
| 1.2.10.4103a2a
|
It is correct?
Hi,
in Debian manual section there is a typo:
wget -O cmon-controller-1.2.10-727-x86_64.rpm http://www.severalnines.com/downloads/cmon/cmon-controller-1.2.10-727-x86_64.rpm
Ofc it should be .deb
also did someone have problem with those error? (using wheezy update point 7.8)
dpkg: unrecoverable critical error, aborting:
File List package "netcat-traditional" does not contain the final newline
dpkg: unrecoverable critical error, aborting:
File List package "net-tools" does not contain the final newline
Petr
Hi,
After upgrade I got message "cluster is not running. Please, verify RPC_TOKEN settings". Where I should look for this setting?
Hi
How did you perform the upgrade? Try logout and then login again from the web application. It should have automatically updated the clusters with the correct RPC keys.
If that still doesn't work then
Check that your <webroot>/clustercontrol/bootstrap.php contains a parameter called RPC_TOKEN
If you only have a single /etc/cmon.cnf file then check that you have a parameter called rpc_key with the same value as the above RPC_TOKEN
If you have /etc/cmon.d/cmon_N.cnf file(s) then check that those files have a rpc_key parameter that matches below output
mysql -ucmon -p -e "select id as clusterid, token from dcps.clusters"
Best Regards,
Alex
Hi,
Updated was performed with APT.
Looks like my original cmon.cnf file was replaced in upgrade procedure. When I restored old one then ClusterController started up without errors.
Thanks.
Hi,
I had the same problem updating to cmon 1.3.0 with APT on Ubuntu. Performing the steps Alex posted fixed the error.
BR
Hi, Upgraded to latest version and hit a strange glitch
my galera cluster is graphed normaly but its reported as failed.
colums Status,wsrep cluster size,local quee, flowcontrol and cert deps distance seems to be empty/undefined...
In reality cluster size is 3 and all nodes are in primary state. Please note that I was upgrading galera as well and I am now on lastest percona version for 5.6
Please advise where/how to check what is wrong.
BR petr
Please sign in to leave a comment.