Skip to content

Commit 499b78b

Browse files
Harikrishna PatnalaJayapal
authored andcommitted
CLOUDSTACK-3601: Adding router.template.xen/vmware/kvm/lxc/hyperv parameters in upgrade setup
Signed-off-by: Jayapal <jayapal@apache.org>
1 parent bd54fa1 commit 499b78b

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,10 @@ private void updateSystemVmTemplates(Connection conn) {
248248
pstmt.executeUpdate();
249249
pstmt.close();
250250
// Change value of global configuration parameter router.template.* for the corresponding hypervisor
251-
pstmt = conn.prepareStatement("INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'NetworkManager', ?, ?, 'Name of the default router template on Xenserver')");
252-
pstmt.setString(1, routerTemplateConfigurationNames.get(hypervisorAndTemplateName.getKey()));
253-
pstmt.setString(2, hypervisorAndTemplateName.getValue());
254-
pstmt.execute();
251+
pstmt = conn.prepareStatement("UPDATE `cloud`.`configuration` SET value = ? WHERE name = ?");
252+
pstmt.setString(1, hypervisorAndTemplateName.getValue());
253+
pstmt.setString(2, routerTemplateConfigurationNames.get(hypervisorAndTemplateName.getKey()));
254+
pstmt.executeUpdate();
255255
pstmt.close();
256256
} else {
257257
if (hypervisorsListInUse.contains(hypervisorAndTemplateName.getKey())){

setup/db/db/schema-410to420.sql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2177,6 +2177,12 @@ INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'manag
21772177
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'interval.baremetal.securitygroup.agent.echo', 10, 'Interval to echo baremetal security group agent, in seconds');
21782178
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'timeout.baremetal.securitygroup.agent.echo', 3600, 'Timeout to echo baremetal security group agent, in seconds, the provisioning process will be treated as a failure');
21792179

2180+
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'NetworkManager', 'router.template.hyperv', 'SystemVM Template (HyperV)', 'Name of the default router template on Hyperv.');
2181+
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'NetworkManager', 'router.template.kvm', 'SystemVM Template (KVM)', 'Name of the default router template on KVM.');
2182+
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'NetworkManager', 'router.template.lxc', 'SystemVM Template (LXC)', 'Name of the default router template on LXC.');
2183+
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'NetworkManager', 'router.template.vmware', 'SystemVM Template (vSphere)', 'Name of the default router template on Vmware.');
2184+
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'NetworkManager', 'router.template.xen', 'SystemVM Template (XenServer)', 'Name of the default router template on Xenserver.');
2185+
21802186
alter table `cloud`.`network_offerings` add column egress_default_policy boolean default false;
21812187

21822188
-- Add stratospher ssp tables

0 commit comments

Comments
 (0)