From 855858436a2629da28f143bdc61b4234a9f87e04 Mon Sep 17 00:00:00 2001 From: Daan Hoogland Date: Tue, 27 Apr 2021 15:17:22 +0200 Subject: [PATCH 1/2] mysql-quirk Co-authored-by: Rohit Yadav --- source/upgrading/index.rst | 4 ++-- source/upgrading/upgrade/mysql.rst | 36 ++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 source/upgrading/upgrade/mysql.rst diff --git a/source/upgrading/index.rst b/source/upgrading/index.rst index eb368a29b6..dc9e9041bd 100644 --- a/source/upgrading/index.rst +++ b/source/upgrading/index.rst @@ -31,12 +31,13 @@ release. Please read through all sections carefully before starting. .. note:: For information on the API changes and issues fixed in this release, please see the Release Notes section of the documentation - Contents: .. toctree:: :maxdepth: 1 + upgrade/mysql + upgrade/valid_source upgrade/upgrade-4.15 upgrade/upgrade-4.14 upgrade/upgrade-4.13 @@ -55,4 +56,3 @@ Contents: .. upgrade/upgrade-4.0 .. upgrade/upgrade-3.0.x .. upgrade/upgrade-2.2.14 - upgrade/valid_source diff --git a/source/upgrading/upgrade/mysql.rst b/source/upgrading/upgrade/mysql.rst new file mode 100644 index 0000000000..c29f45e31d --- /dev/null +++ b/source/upgrading/upgrade/mysql.rst @@ -0,0 +1,36 @@ +.. Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information# + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +MySQL upgrade problems +====================== + +Users who may upgrade their MySQL server after upgrading to Apache +CloudStack 4.15 or later, may need to run the following SQL query to +fix an issue with "cloud.nics" table's column type which may lead to +exception seen in the management server logs. Users who have already +upgraded their MySQL server prior to upgrading to Apache CloudStack +4.15 may not need this as this query runs as part of the 4.14.x to +4.15.0.0 database upgrade path. + +.. note:: + The issue has not been seen in cases where the database was upgraded while on CloudStack version 4.14. + + .. parsed-literal:: +ALTER TABLE nics MODIFY COLUMN update_time timestamp DEFAULT CURRENT_TIMESTAMP; + +The issue is known to affect the following MySQL server versions: + + - 5.7.34 or later + - 8+ From a3fed6107a3d0d362e17becee1046c70f9b82236 Mon Sep 17 00:00:00 2001 From: dahn Date: Fri, 4 Jun 2021 09:16:20 +0200 Subject: [PATCH 2/2] Update source/upgrading/upgrade/mysql.rst Co-authored-by: Andrija Panic <45762285+andrijapanicsb@users.noreply.github.com> --- source/upgrading/upgrade/mysql.rst | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/source/upgrading/upgrade/mysql.rst b/source/upgrading/upgrade/mysql.rst index c29f45e31d..bbbc2d1ef6 100644 --- a/source/upgrading/upgrade/mysql.rst +++ b/source/upgrading/upgrade/mysql.rst @@ -16,16 +16,12 @@ MySQL upgrade problems ====================== -Users who may upgrade their MySQL server after upgrading to Apache -CloudStack 4.15 or later, may need to run the following SQL query to -fix an issue with "cloud.nics" table's column type which may lead to -exception seen in the management server logs. Users who have already -upgraded their MySQL server prior to upgrading to Apache CloudStack -4.15 may not need this as this query runs as part of the 4.14.x to -4.15.0.0 database upgrade path. +With certain MySQL versions (see below), issues have been seen with "cloud.nics" table's +column type (which was not updated properly during CloudStack upgrades, due to MySQL limitations), +which eventually may lead to exception seen in the management server logs, causing users to +not be able to start any VM. -.. note:: - The issue has not been seen in cases where the database was upgraded while on CloudStack version 4.14. +The following SQL statement needs to be manually executed in order to fix such issue: .. parsed-literal:: ALTER TABLE nics MODIFY COLUMN update_time timestamp DEFAULT CURRENT_TIMESTAMP;