From ec4d83da4df78c48e7065a912b724ef389708068 Mon Sep 17 00:00:00 2001 From: Spaceman1984 <49917670+Spaceman1984@users.noreply.github.com> Date: Tue, 12 Jan 2021 09:53:16 +0200 Subject: [PATCH 1/2] vmware: Fixed instance creation failure on dvswitch when using vlan id 4095 (#4557) Fixed instance creation failure on dvswitch when using vlan id 4095 --- .../com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java b/vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java index 7826bb136a8..c43395d6b20 100644 --- a/vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java +++ b/vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/HypervisorHostHelper.java @@ -1073,6 +1073,10 @@ public class HypervisorHostHelper { } public static VmwareDistributedVirtualSwitchVlanSpec createDVPortVlanSpec(Integer vlanId, String vlanRange) { + if (vlanId != null && vlanId == 4095){ + vlanId = null; + vlanRange = "0-4094"; + } if (vlanId == null && vlanRange != null && !vlanRange.isEmpty()) { s_logger.debug("Creating dvSwitch port vlan-trunk spec with range: " + vlanRange); VmwareDistributedVirtualSwitchTrunkVlanSpec trunkVlanSpec = new VmwareDistributedVirtualSwitchTrunkVlanSpec(); From f70da104a043ba7a3c41679254057906bb15aa60 Mon Sep 17 00:00:00 2001 From: davidjumani Date: Tue, 12 Jan 2021 18:21:30 +0530 Subject: [PATCH 2/2] engine/schema: add upgrade path from 4.14.0.0 to 4.14.1.0 (#4580) --- .../cloud/upgrade/DatabaseUpgradeChecker.java | 2 + .../upgrade/dao/Upgrade41400to41410.java | 52 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41400to41410.java diff --git a/engine/schema/src/main/java/com/cloud/upgrade/DatabaseUpgradeChecker.java b/engine/schema/src/main/java/com/cloud/upgrade/DatabaseUpgradeChecker.java index eed2e2fd449..43ecbde8d07 100644 --- a/engine/schema/src/main/java/com/cloud/upgrade/DatabaseUpgradeChecker.java +++ b/engine/schema/src/main/java/com/cloud/upgrade/DatabaseUpgradeChecker.java @@ -68,6 +68,7 @@ import com.cloud.upgrade.dao.Upgrade41120to41200; import com.cloud.upgrade.dao.Upgrade41200to41300; import com.cloud.upgrade.dao.Upgrade41300to41310; import com.cloud.upgrade.dao.Upgrade41310to41400; +import com.cloud.upgrade.dao.Upgrade41400to41410; import com.cloud.upgrade.dao.Upgrade420to421; import com.cloud.upgrade.dao.Upgrade421to430; import com.cloud.upgrade.dao.Upgrade430to440; @@ -191,6 +192,7 @@ public class DatabaseUpgradeChecker implements SystemIntegrityChecker { .next("4.12.0.0", new Upgrade41200to41300()) .next("4.13.0.0", new Upgrade41300to41310()) .next("4.13.1.0", new Upgrade41310to41400()) + .next("4.14.0.0", new Upgrade41400to41410()) .build(); } diff --git a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41400to41410.java b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41400to41410.java new file mode 100644 index 00000000000..600b3a80448 --- /dev/null +++ b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41400to41410.java @@ -0,0 +1,52 @@ +// 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. +package com.cloud.upgrade.dao; + +import java.io.InputStream; +import java.sql.Connection; + +public class Upgrade41400to41410 implements DbUpgrade { + @Override + public String[] getUpgradableVersionRange() { + return new String[] {"4.14.0.0", "4.14.1.0"}; + } + + @Override + public String getUpgradedVersion() { + return "4.14.1.0"; + } + + @Override + public boolean supportsRollingUpgrade() { + return false; + } + + @Override + public InputStream[] getPrepareScripts() { + return new InputStream[0]; + } + + @Override + public void performDataMigration(Connection conn) { + + } + + @Override + public InputStream[] getCleanupScripts() { + return new InputStream[0]; + } +}