Visitar URL original
CLOUDSTACK-8220: Let's have a separate XenServer 6.5 resource · enterdevstudio/cloudstack@cf7a8cc · GitHub
Skip to content

Commit cf7a8cc

Browse files
committed
CLOUDSTACK-8220: Let's have a separate XenServer 6.5 resource
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> (cherry picked from commit 06437da) Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent d2bf210 commit cf7a8cc

7 files changed

Lines changed: 125 additions & 6 deletions

File tree

‎plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/discoverer/XcpServerDiscoverer.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
import com.cloud.hypervisor.xenserver.resource.XenServer620SP1Resource;
5757
import com.cloud.hypervisor.xenserver.resource.XenServerConnectionPool;
5858
import com.cloud.hypervisor.xenserver.resource.Xenserver625Resource;
59+
import com.cloud.hypervisor.xenserver.resource.XenServer650Resource;
5960
import com.cloud.resource.Discoverer;
6061
import com.cloud.resource.DiscovererBase;
6162
import com.cloud.resource.ResourceStateAdapter;
@@ -411,7 +412,7 @@ else if (prodBrand.equals("XenServer") && prodVersion.equals("6.0.2"))
411412
else if (prodBrand.equals("XenServer") && prodVersion.equals("6.1.0"))
412413
return new XenServer610Resource();
413414
else if (prodBrand.equals("XenServer") && prodVersion.equals("6.5.0"))
414-
return new Xenserver625Resource();
415+
return new Xenserver650Resource();
415416
else if (prodBrand.equals("XenServer") && prodVersion.equals("6.2.0")) {
416417
if (hotfix != null && hotfix.equals(XenserverConfigs.XSHotFix62ESP1004)) {
417418
return new Xenserver625Resource();

‎plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,9 +1346,9 @@ protected VM createVmFromTemplate(Connection conn, VirtualMachineTO vmSpec, Host
13461346
if (vmSpec.isEnableDynamicallyScaleVm() && !isDmcEnabled(conn, host)) {
13471347
s_logger.warn("Host " + host.getHostname(conn) + " does not support dynamic scaling, so the vm " + vmSpec.getName() + " is not dynamically scalable");
13481348
}
1349-
vmr.memoryStaticMin = vmSpec.getMaxRam();
1349+
vmr.memoryStaticMin = vmSpec.getMinRam();
13501350
vmr.memoryStaticMax = vmSpec.getMaxRam();
1351-
vmr.memoryDynamicMin = vmSpec.getMaxRam();;
1351+
vmr.memoryDynamicMin = vmSpec.getMinRam();;
13521352
vmr.memoryDynamicMax = vmSpec.getMaxRam();
13531353

13541354
vmr.VCPUsMax = (long) vmSpec.getCpus();
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
package com.cloud.hypervisor.xenserver.resource;
20+
21+
import com.cloud.resource.ServerResource;
22+
import com.cloud.utils.exception.CloudRuntimeException;
23+
import com.cloud.utils.script.Script;
24+
import org.apache.log4j.Logger;
25+
26+
import javax.ejb.Local;
27+
import java.io.File;
28+
import java.util.ArrayList;
29+
import java.util.List;
30+
31+
@Local(value=ServerResource.class)
32+
public class XenServer650Resource extends Xenserver625Resource {
33+
private static final Logger s_logger = Logger.getLogger(XenServer650Resource.class);
34+
35+
public XenServer650Resource() {
36+
super();
37+
}
38+
39+
protected List<File> getPatchFiles() {
40+
List files = new ArrayList();
41+
String patch = "scripts/vm/hypervisor/xenserver/xenserver65/patch";
42+
String patchfilePath = Script.findScript("", patch);
43+
if (patchfilePath == null) {
44+
throw new CloudRuntimeException("Unable to find patch file " + patch);
45+
}
46+
File file = new File(patchfilePath);
47+
files.add(file);
48+
return files;
49+
}
50+
}

scripts/vm/hypervisor/xenserver/xenserver62/cloud-plugin-storage renamed to scripts/vm/hypervisor/xenserver/cloud-plugin-storage

File renamed without changes.

‎scripts/vm/hypervisor/xenserver/vmops‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,8 @@ def default_network_rules(session, args):
791791
util.pread2(['iptables', '-F', vmchain_default])
792792

793793
vmipset = vm_name
794+
if len(vmipset) > 28:
795+
vmipset = vmipset[0:27]
794796
#create ipset and add vm ips to that ip set
795797
if create_ipset_forvm(vmipset) == False:
796798
logging.debug(" failed to create ipset for rule " + str(tokens))

‎scripts/vm/hypervisor/xenserver/xenserver62/patch‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
# to you under the Apache License, Version 2.0 (the
66
# "License"); you may not use this file except in compliance
77
# with the License. You may obtain a copy of the License at
8-
#
8+
#
99
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
10+
#
1111
# Unless required by applicable law or agreed to in writing,
1212
# software distributed under the License is distributed on an
1313
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -34,7 +34,7 @@ ovs-vif-flows.py=..,0755,/etc/xapi.d/plugins
3434
cloudstack_plugins.conf=..,0644,/etc/xensource
3535
cloudstack_pluginlib.py=..,0755,/etc/xapi.d/plugins
3636
ovstunnel=..,0755,/etc/xapi.d/plugins
37-
cloud-plugin-storage=,0755,/etc/xapi.d/plugins
37+
cloud-plugin-storage=..,0755,/etc/xapi.d/plugins
3838
systemvm.iso=../../../../../vms,0644,/opt/xensource/packages/iso
3939
id_rsa.cloud=../../../systemvm,0600,/root/.ssh
4040
network_info.sh=..,0755,/opt/cloud/bin
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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+
# This file specifies the files that need
19+
# to be transferred over to the XenServer.
20+
# The format of this file is as follows:
21+
# [Name of file]=[source path],[file permission],[destination path]
22+
# [destination path] is required.
23+
# If [file permission] is missing, 755 is assumed.
24+
# If [source path] is missing, it looks in the same
25+
# directory as the patch file.
26+
# If [source path] starts with '/', then it is absolute path.
27+
# If [source path] starts with '~', then it is path relative to management server home directory.
28+
# If [source path] does not start with '/' or '~', then it is relative path to the location of the patch file.
29+
vmops=..,0755,/etc/xapi.d/plugins
30+
vmopspremium=..,0755,/etc/xapi.d/plugins
31+
vmopsSnapshot=..,0755,/etc/xapi.d/plugins
32+
xen-ovs-vif-flows.rules=..,0644,/etc/udev/rules.d
33+
ovs-vif-flows.py=..,0755,/etc/xapi.d/plugins
34+
cloudstack_plugins.conf=..,0644,/etc/xensource
35+
cloudstack_pluginlib.py=..,0755,/etc/xapi.d/plugins
36+
ovstunnel=..,0755,/etc/xapi.d/plugins
37+
cloud-plugin-storage=..,0755,/etc/xapi.d/plugins
38+
systemvm.iso=../../../../../vms,0644,/opt/xensource/packages/iso
39+
id_rsa.cloud=../../../systemvm,0600,/root/.ssh
40+
network_info.sh=..,0755,/opt/cloud/bin
41+
setupxenserver.sh=..,0755,/opt/cloud/bin
42+
make_migratable.sh=..,0755,/opt/cloud/bin
43+
setup_iscsi.sh=..,0755,/opt/cloud/bin
44+
pingtest.sh=../../..,0755,/opt/cloud/bin
45+
router_proxy.sh=../../../../network/domr/,0755,/opt/cloud/bin
46+
cloud-setup-bonding.sh=..,0755,/opt/cloud/bin
47+
kill_copy_process.sh=..,0755,/opt/cloud/bin
48+
setup_heartbeat_sr.sh=..,0755,/opt/cloud/bin
49+
setup_heartbeat_file.sh=..,0755,/opt/cloud/bin
50+
check_heartbeat.sh=..,0755,/opt/cloud/bin
51+
xenheartbeat.sh=..,0755,/opt/cloud/bin
52+
launch_hb.sh=..,0755,/opt/cloud/bin
53+
upgrade_snapshot.sh=..,0755,/opt/cloud/bin
54+
cloud-clean-vlan.sh=..,0755,/opt/cloud/bin
55+
cloud-prepare-upgrade.sh=..,0755,/opt/cloud/bin
56+
swift=..,0755,/opt/cloud/bin
57+
swiftxen=..,0755,/etc/xapi.d/plugins
58+
s3xen=..,0755,/etc/xapi.d/plugins
59+
add_to_vcpus_params_live.sh=..,0755,/opt/cloud/bin
60+
ovs-pvlan=..,0755,/etc/xapi.d/plugins
61+
ovs-pvlan-dhcp-host.sh=../../../network,0755,/opt/cloud/bin
62+
ovs-pvlan-vm.sh=../../../network,0755,/opt/cloud/bin
63+
ovs-pvlan-cleanup.sh=../../../network,0755,/opt/cloud/bin
64+
ovs-get-dhcp-iface.sh=..,0755,/opt/cloud/bin
65+
ovs-get-bridge.sh=..,0755,/opt/cloud/bin
66+
cloudlog=..,0644,/etc/logrotate.d

0 commit comments

Comments
 (0)