Skip to content

Commit 89053c7

Browse files
packaging: deprecate el6 and add 4.13-4.14 upgrade path (apache#3591)
- Removes CentOS6/el6 packaging (voting thread reference https://markmail.org/message/u3ka4hwn2lzwiero) - Add upgrade path from 4.13 to 4.14 - Enable live storage migration support for KVM by default as el6 is deprecated - PRs using live storage migration apache#2997 KVM VM live migration with ROOT volume on file storage type apache#2983 KVM live storage migration intra cluster from NFS source and destination apache#2298 CLOUDSTACK-9620: Enhancements for managed storage Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent c01ce7b commit 89053c7

File tree

18 files changed

+120
-1439
lines changed

18 files changed

+120
-1439
lines changed

engine/schema/src/main/java/com/cloud/upgrade/DatabaseUpgradeChecker.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
import com.cloud.upgrade.dao.Upgrade41120to41130;
6767
import com.cloud.upgrade.dao.Upgrade41120to41200;
6868
import com.cloud.upgrade.dao.Upgrade41200to41300;
69+
import com.cloud.upgrade.dao.Upgrade41300to41400;
6970
import com.cloud.upgrade.dao.Upgrade420to421;
7071
import com.cloud.upgrade.dao.Upgrade421to430;
7172
import com.cloud.upgrade.dao.Upgrade430to440;
@@ -187,6 +188,7 @@ public DatabaseUpgradeChecker() {
187188
.next("4.11.2.0", new Upgrade41120to41130())
188189
.next("4.11.3.0", new Upgrade41120to41200())
189190
.next("4.12.0.0", new Upgrade41200to41300())
191+
.next("4.13.0.0", new Upgrade41300to41400())
190192
.build();
191193
}
192194

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
18+
package com.cloud.upgrade.dao;
19+
20+
import java.io.InputStream;
21+
import java.sql.Connection;
22+
23+
import org.apache.log4j.Logger;
24+
25+
import com.cloud.utils.exception.CloudRuntimeException;
26+
27+
public class Upgrade41300to41400 implements DbUpgrade {
28+
29+
final static Logger LOG = Logger.getLogger(Upgrade41300to41400.class);
30+
31+
@Override
32+
public String[] getUpgradableVersionRange() {
33+
return new String[] {"4.13.0.0", "4.14.0.0"};
34+
}
35+
36+
@Override
37+
public String getUpgradedVersion() {
38+
return "4.14.0.0";
39+
}
40+
41+
@Override
42+
public boolean supportsRollingUpgrade() {
43+
return false;
44+
}
45+
46+
@Override
47+
public InputStream[] getPrepareScripts() {
48+
final String scriptFile = "META-INF/db/schema-41300to41400.sql";
49+
final InputStream script = Thread.currentThread().getContextClassLoader().getResourceAsStream(scriptFile);
50+
if (script == null) {
51+
throw new CloudRuntimeException("Unable to find " + scriptFile);
52+
}
53+
54+
return new InputStream[] {script};
55+
}
56+
57+
@Override
58+
public void performDataMigration(Connection conn) {
59+
}
60+
61+
@Override
62+
public InputStream[] getCleanupScripts() {
63+
final String scriptFile = "META-INF/db/schema-41300to41400-cleanup.sql";
64+
final InputStream script = Thread.currentThread().getContextClassLoader().getResourceAsStream(scriptFile);
65+
if (script == null) {
66+
throw new CloudRuntimeException("Unable to find " + scriptFile);
67+
}
68+
69+
return new InputStream[] {script};
70+
}
71+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
-- Licensed to the Apache Software Foundation (ASF) under one
2+
-- or more contributor license agreements. See the NOTICE file
3+
-- distributed with this work for additional information
4+
-- regarding copyright ownership. The ASF licenses this file
5+
-- to you under the Apache License, Version 2.0 (the
6+
-- "License"); you may not use this file except in compliance
7+
-- with the License. You may obtain a copy of the License at
8+
--
9+
-- http://www.apache.org/licenses/LICENSE-2.0
10+
--
11+
-- Unless required by applicable law or agreed to in writing,
12+
-- software distributed under the License is distributed on an
13+
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
-- KIND, either express or implied. See the License for the
15+
-- specific language governing permissions and limitations
16+
-- under the License.
17+
18+
--;
19+
-- Schema upgrade cleanup from 4.13.0.0 to 4.14.0.0
20+
--;
21+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
-- Licensed to the Apache Software Foundation (ASF) under one
2+
-- or more contributor license agreements. See the NOTICE file
3+
-- distributed with this work for additional information
4+
-- regarding copyright ownership. The ASF licenses this file
5+
-- to you under the Apache License, Version 2.0 (the
6+
-- "License"); you may not use this file except in compliance
7+
-- with the License. You may obtain a copy of the License at
8+
--
9+
-- http://www.apache.org/licenses/LICENSE-2.0
10+
--
11+
-- Unless required by applicable law or agreed to in writing,
12+
-- software distributed under the License is distributed on an
13+
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
-- KIND, either express or implied. See the License for the
15+
-- specific language governing permissions and limitations
16+
-- under the License.
17+
18+
--;
19+
-- Schema upgrade from 4.13.0.0 to 4.14.0.0
20+
--;
21+
22+
-- KVM: enable storage data motion on KVM hypervisor_capabilities
23+
UPDATE `cloud`.`hypervisor_capabilities` SET `storage_motion_supported` = 1 WHERE `hypervisor_capabilities`.`hypervisor_type` = 'KVM';

packaging/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ These scripts are also used by the CloudStack team to build packages for the off
66
# Requirements
77
The RPM and DEB packages have dependencies on versions of specific libraries. Due to these dependencies the following distributions and their versions are supported by the packages.
88

9-
* CentOS / RHEL: 6 and 7
9+
* CentOS / RHEL: 7
1010
* Debian 7 (Wheezy) and 8 (Jessy) (untested!)
11-
* Ubuntu: 14.04 (Trusty) and 16.04 (Xenial)
11+
* Ubuntu: 16.04 (Xenial) and 18.04 (Bionic)
1212

1313
# Building
1414
Using the scripts in the *packaging* directory the RPM and DEB packages can be build.

packaging/centos63/cloud-agent.rc

Lines changed: 0 additions & 122 deletions
This file was deleted.

packaging/centos63/cloud-ipallocator.rc

Lines changed: 0 additions & 96 deletions
This file was deleted.

0 commit comments

Comments
 (0)