436 Commits

Author SHA1 Message Date
Rajani Karuturi
c95b47b740 Merge pull request #1824 from jayapalu/SGipset
CLOUDSTACK-9657: Fixed security group ipset issues with long vm name
2017-05-19 14:05:51 +05:30
Daan Hoogland
70ef0788c9 CLOUDSTACK-9408: Fix download urls in sql and scripts
This fixes the agreed upon url on download.cloudstack.org in various
sql files and misc scripts.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-04-20 12:33:33 +05:30
Jayapal
43a991d2eb CLOUDSTACK-9821: Fixed issue in deploying vm in basic zone 2017-03-06 19:01:15 +05:30
Jayapal
1cff18fcfa CLOUDSTACK-9657: Fixed security group ipset issues with long vm name 2017-02-24 15:20:04 +05:30
Jayapal
175c8d83b8 CLOUDSTACK-8871: fixed issue with the xenserver 6.2 ipset nethash 2017-02-20 18:34:13 +05:30
Rohit Yadav
2ce02dc937 CLOUDSTACK-9662: Fix failing iscsi test
Use separate lvcreate command on XenServer7 hosts, that checks and passes
different parameters based on the xenserver release version.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-25 23:53:50 +05:30
Syed
eabf862ba9 [CLOUDSTACK-9662] Add support for XenServer 7 2016-12-21 16:58:10 -05:00
Sverrir Berg
751d3552dc patchviasocket improve error handling
more detailed error if host file not found or cannot be opened
using mkstemp and mkdtemp for improved security
improve resource cleanup in error conditions in unit test
2016-05-20 15:42:34 +00:00
Sverrir A. Berg
0acd3c12a2 Convert patchviasocket to python (removes perl dependency for KVM agent)
As requested here: https://github.com/apache/cloudstack/pull/1495

No scripts are using perl so that install requirement can be removed.
The new scripts are using standard python packages only.
Includes extensive unit test.
2016-05-20 15:42:34 +00:00
Boris Schrijver
5c0366c99e CLOUDSTACK-9062: Improve S3 implementation.
The S3 implementation is far from finished, this commit focusses on the bases.

 - Upgrade AWS SDK to latest version.
 - Rewrite S3 Template downloader.
 - Rewrite S3Utils utility class.
 - Improve addImageStoreS3 API command.
 - Split various classes for convenience.
 - Various minor improvements and code optimalisations.

A side effect of the new AWS SDK is that it, by default, uses the V4 signature. Therefore I added an option to specify the Signer, so it stays compatible with previous versions.
2015-11-19 15:29:10 +01:00
Remi Bergsma
ca860348dc Merge pull request #1033 from Carles-Figuerola/centos-7-redhat-release
CLOUDSTACK-9029: Proper support to identify CentOS 7 version numberhttps://issues.apache.org/jira/browse/CLOUDSTACK-9029

* pr/1033:
  CLOUDSTACK-9029: Proper support to identify CentOS 7 version number

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-09 16:54:38 +01:00
Carles Figuerola
3ce420c367 CLOUDSTACK-9029: Proper support to identify CentOS 7 version number 2015-11-04 11:21:47 -06:00
Remi Bergsma
5fed4f41d7 Rename xapi plugins for s3 and swift to make them work after renaming the calls
Renaming introduced in a8212d9ef458dd7ac64b021e6fa33fcf64b3cce0

This PR is to address comments in PR #970
2015-10-27 14:07:29 +01:00
Remi Bergsma
87fdb521f0 CLOUDSTACK-8443: don't try to fix co-mounted cgroups
This setting works on CentOS 6 / RHEL 6 but does nothing, as
"cpu" cgroup is not mounted. On CentOS 7 / RHEL 7 systemd does
mount cgroups and "cpu" is co-mounted with "cpuacc". Hence, if
we specify "cpu" then this results in an error because it can
only use them both, or none.

By removing the setting, we rely on the default of qemu, which
is:
cgroup_controllers = ["cpu", "devices", "memory", "blkio", "cpuacct", "net_cls"]

Only if they are really mounted, they will be used. So, this will
work on both version 6 and 7.

The 'fix script' didn't work well, as after a reboot you'd still have qemu
throwing errors. Now we can handle the co-mountedcgroups.
2015-08-24 15:49:40 +02:00
radu-stefanache
c7a3ad4dc0 More typos 2015-08-20 13:04:29 +01:00
Remi Bergsma
d1cb4c7d50 RHEL 7 and CentOS 7 need the same fix 2015-08-19 16:30:24 +02:00
Remi Bergsma
14013d5d1b fixing white space and formatting 2015-08-19 16:24:44 +02:00
wilderrodrigues
efa34361df CLOUDSTACK-8607 - Changed update script to return exit code based on the result
- Changed location of the update_host_passwd script
   - Updated the patch files for XenServer
   - Updated the script path on LibvirtComputing class
   - Removed the hostIP from the LibvirtUpdateHostPasswordCommandWrapper execute() method
2015-07-03 14:29:57 +02:00
wilderrodrigues
0dd02ce043 CLOUDSTACK-8607 - Adding support to update host passwd on XenServer hypervisors
- Adding update_host_passwd to VRScripts
   - Add accessor method to host password on CitrixResourceBase
   - Add implementation to CitrixUpdateHostPasswordCommandWrapper
   - Improve testUpdateHostPasswordCommand() unit test on CitrixRequestWrapperTest
   - Add line to patch files on xenserver directory

Concerning the LibVirt change:

   - I forgot to assing the return of the getDefaultHypervisorScriptsDir() method to the hypervisorScriptsDir variable
2015-07-03 10:24:44 +02:00
wilderrodrigues
47c7a1083f CLOUDSTACK-8607 - Adding update_host_passwd.sh script
- Modifying the LibvirtUpdateHostPasswordCommandWrapper in order to execute the script on the host
   - Adding the script path to LibvirtComputingResource
   - Adding the host IP address as an instance variable on UpdateHostPasswordCommand
   - Improving the Unit Test (LibvirtComputingResourceTest) to get it covering the new code
2015-07-02 14:54:51 +02:00
Jayapal
59e6596fef Fixed issue in adding vm SG rules on vm reboot for xenserver 6.5
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #479
2015-06-18 13:32:00 +03:00
Rohit Yadav
496ffcad83 CLOUDSTACK-8395: vmops plugin should work on both XS 6.5 and 6.2
This fixes the issue of Security Groups not working in case of XenServer 6.5;
- Uses nethash ipset data-structure to store CIDRs (efficient than iphash and
  avoids overflow errors in case users add /8 /4 ingress/egress cidrs)
- Support for ipset versions both on 6.2 and 6.5, both have different outputs. This
  fixes the issue of destroy_network_rules_for_vm failing
- Implements defensive filtering of list, instead of popping last item without
  checking if it's None or empty
- Greps using names that are 'quoted' to avoid bash errors
- Before setting up new network rule, tries to clean and remove old ipset entry
- Idents, whitespace and naming fixes

PS. This is my 1000th commit to the 🐵 project :)

This closes #186

(cherry picked from commit d91d161107e20ffc8ec088ee55f99d6743330946)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	scripts/vm/hypervisor/xenserver/vmops
2015-04-23 14:15:36 +02:00
Rohit Yadav
2a14f78248 xenserver: remove unwanted vmops.orig file (created during a past merge)
scripts: filter output instead of popping string from list
This is a defensive enhancement for KVM SG script that filters out empty string
instead of popping last item which may or may not be an empty string.

Squashed commits:
(cherry picked from commit f4cbc4c010947a41c1e296b46822531e7f2bc1c9)
(cherry picked from commit 64ab3554a14afa48bb33839631ed4f8e71945874)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-21 17:41:16 +02:00
Remi Bergsma
7bce656b40 make sure sync cannot block reboot
The recent discussed improvement has the risk that if 'sync' hangs, the reboot may be delayed in the same way as the 'reboot' command would do. To work around, we're adding a 5 second timeout. If it cannot sync in 5 seconds, it will not succeed anyway and we should proceed the reset.

@snuf: Could we use your OVM3 heartbeat script for other hypervisors as well? One way to do it seems like a nice idea :-)
2015-04-09 12:18:21 +02:00
Remi Bergsma
c59308b0ee write logfile just before rebooting the host
As discussed with @wido @pyr and @nuxro added an extra log line.

Tested it and it logs fine (tested to local disk) when syncing first:
Apr  3 15:31:23 mcctest2 heartbeat: kvmheartbeat.sh system because it was unable to write the heartbeat to the storage

By the way, it did also log to the agent.log but this extra log has the benefit of ending up in the system log so you'll probably find it easier there. Existing logs:
2015-04-03 15:27:23,943 WARN  [kvm.resource.KVMHAMonitor] (Thread-24:null) write heartbeat failed: timeout, retry: 0
2015-04-03 15:28:23,944 WARN  [kvm.resource.KVMHAMonitor] (Thread-24:null) write heartbeat failed: timeout, retry: 1
2015-04-03 15:29:23,946 WARN  [kvm.resource.KVMHAMonitor] (Thread-24:null) write heartbeat failed: timeout, retry: 2
2015-04-03 15:30:23,948 WARN  [kvm.resource.KVMHAMonitor] (Thread-24:null) write heartbeat failed: timeout, retry: 3
2015-04-03 15:31:23,950 WARN  [kvm.resource.KVMHAMonitor] (Thread-24:null) write heartbeat failed: timeout, retry: 4
2015-04-03 15:31:23,950 WARN  [kvm.resource.KVMHAMonitor] (Thread-24:null) write heartbeat failed: timeout; reboot the host

This closes #145

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-04 14:17:37 +05:30
Remi Bergsma
2b41f98346 reboot much faster in case of storage failure
When storage cannot be reached, it does not make sense to reboot as it will try to flush buffers, umount NFS mounts, etc. This will not work and thus cause a long delay. With this change, the box will reboot immediately (like pressing the reset button).
2015-04-01 19:45:16 +02:00
Funs
c27c69438b hypervisors: add OVM3 plugin that supports OVM 3.2.1/3.3.x
This is a plugin that puts in ovm3 support ranging from 3.3.1 to 3.3.2. Basic
functionality is in here, advanced networking etc..

Snapshots only work when a VM is stopped now due to the semantics of OVM's raw
image implementation (so snapshots should work on a storage level underneath the
hypervisor shrug)

This closes #113

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-12 11:33:42 +05:30
Jayapal
619f014255 CLOUDSTACK-8298: Update copying large size VR config file in xenserver
When there is large size VR configuration (aggregate commands) copying data to VR using vmops plugin was failed
 because of the ARG_MAX size limitation. The configuration data size is around 300KB.

 Updated this to create file in host by scp with file contents. This will create file in host.
 Then copy the file from the host to VR using hte vmops createFileInDomr method.

  In host file get created in /tmp/ with name VR-<UUID>.cfg, once it copied to VR this file will be removed.
2015-03-04 11:52:10 +05:30
Rohit Yadav
06437dadf5 CLOUDSTACK-8220: Let's have a separate XenServer 6.5 resource
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-06 14:44:10 +05:30
Remi Bergsma
4e1527e87a use directIO flags when dd'ing template
This makes sure dom0 in xenserver doesn't get hammered
when copying templates. It doesn't make sense to use
the cache of dom0 as the template does not fit in
memory. The directIO flags prevent it from trying.
2014-12-15 16:36:35 +01:00
Pierre-Luc Dion
5306e43d56 CLOUDSTACK-7887: change int to str into swiftxen 2014-11-12 19:21:37 -05:00
Sanjay Tripathi
6a6d4d876f CLOUDSTACK-7868: Failed storage.PrimaryStorageDownloadCommand leaves corrupt VDIs in primary storage. 2014-11-08 13:43:56 +05:30
Anthony Xu
fbe205b9dd remove unused XS plugins 2014-10-21 10:53:48 -07:00
Daan Hoogland
6e1e56d399 CLOUDSTACK-7527 reboot faster by writing to /proc/sysrq-trigger
(cherry picked from commit d04f59a30d130dbb83f162af6e67334fe2c9cef0)
2014-09-18 12:51:42 +02:00
Daan Hoogland
dec9133dcd CLOUDSTACK-7184: xenheartbeat gets passed timeout and interval
(cherry picked from commit 4d065b9a3a336d59902c266202c1094509c007d2)

Conflicts:
	plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/discoverer/XcpServerDiscoverer.java
	plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
	server/src/com/cloud/configuration/Config.java
	server/src/com/cloud/configuration/ConfigurationManagerImpl.java
	server/src/com/cloud/resource/DiscovererBase.java
2014-09-18 12:51:10 +02:00
Kishan Kavala
4f3de024de Add script to ensure cgroups are not co-mounted in rhel7/lxc. If required, script will unmount co-mounted cgroups and remount them seperately 2014-09-11 14:34:40 +05:30
Anthony Xu
bd6f03aa95 iptreemap is not supported in new ipset, use iphash instead 2014-08-25 11:22:30 -07:00
Brenn Oosterbaan
7c92bac4a3 CLOUDSTACK-7345 changed dd blocksize to 128k when using NFS.
Signed-off-by: Daan Hoogland <daan@onecht.net>
(cherry picked from commit 8b7130fa65a3ce010a54015b3350b94b56414462)
2014-08-14 10:10:13 +02:00
Joris van Lieshout
37baddd721 dd with direct io is less impacting on Dom0 kernel resources
Signed-off-by: Daan Hoogland <daan@onecht.net>
(cherry picked from commit c4b78c3aaa8df20c8e892b9d5108d8f34f96ed0c)
2014-08-12 13:17:02 +02:00
Frank.Zhang
88f866645b fix iptables chain name too long (must be under 30 chars) 2014-07-18 17:31:06 -07:00
Anthony Xu
733102c742 change XS log file name from vmops.log to cloud.log 2014-07-15 11:07:15 -07:00
Murali Reddy
cdb3dc97b5 CLOUDSTACK-6749: [OVS] xe network-param-get with
param-key=is-ovs-vpc-distributed-vr-network alway returns error

fixing unnecessary errors in the logs
2014-06-13 16:02:31 +05:30
Tim Mackey
a8212d9ef4 Cleanup of Xen and XenServer terms. Cloned xen plugin creating a xenserver plugin, then removed xen plugin
Signed-off-by: Tim Mackey <tmackey@gmail.com>
Signed-off-by: Sebastien Goasguen <runseb@gmail.com>
2014-06-07 04:50:23 -04:00
Murali Reddy
9105c779e9 CLOUDSTACK-6685: OVS distributed firewall: source CIDR mismatch while
populating ingress & egress network ACL

fix ensures propoer values for nw_src and nw_dst are popoluated
depending on the ingress or egress acl
2014-05-15 16:44:30 +05:30
Murali Reddy
63f6888588 CLOUDSTACK-6668: OVS distributed routing: ensure bridge is deleted when
last VM from the VPC is deleted on a host

OVS distributed routing: ensure bridge is deleted when last VM from the
VPC is deleted on a host. This fix ensures that bridge is
destroyed.
2014-05-14 16:41:56 +05:30
Harikrishna Patnala
807b6d2c4c CLOUDSTACK-6544: [Automation] Failed to create template for ROOT volume in Xen, with Exception: callHostPlugin failed 2014-05-08 15:59:39 +05:30
Murali Reddy
55111e2284 CLOUDSTACK-6609: OVS distributed routing: ensure tunnels are created if
not created already when OvsVpcPhysicalTopologyConfigCommand update is
recived

Currently if the tunnel creation fails, there is no retry logic. Fix
ensures OvsVpcPhysicalTopologyConfigCommand updates as an opputiunity to ensure
proper tunnels are established between the hosts.
2014-05-08 15:58:16 +05:30
Murali Reddy
2df5df1b68 CLOUDSTACK-6592: OVS distributed routing: make populate flooding rules
transactional

creats a file with all openflow rules updates and using ovs-ofctl file
option updates the brige in one go
2014-05-07 20:05:32 +05:30
Murali Reddy
9e98cbf1c1 CLOUDSTACK-6564: OVS distributed routing: use file based OF rule updates
use ovs-ofctl replace flows by file name option to update the OF rules
instead of sequenetially configuring the rules.
2014-05-02 18:54:30 +05:30
Murali Reddy
213a68dc39 CLOUDSTACK-6507: ensure sequence numbers are honoured while processing
OvsVpcPhysicalTopologyConfigCommand and OvsVpcRoutingPolicyConfigCommand

fix ensures only latest updates are applied (new openflow rules) to the
bidge enabled for distributed routing.
2014-04-25 15:02:19 +05:30