930 Commits

Author SHA1 Message Date
Wei Zhou
c0a0aec0f9 Merge pull request #732 from ustcweizhou/revert-volume-snapshot-master
Guys, can you review it? things need to be discussed:
(1) this supports KVM/QCOW2 only. Anyone want to implement for other Hypervisor/format ?
(2) The original data volume (on primary storage) will be removed.
(3) The script uses the default timeout in libvirtComputingResource. Do we need to add one in global configuration (like copy.volume.wait or backup.snapshot.wait, create.volume.from.snapshot.wait)
(4) In scripts/storage/qcow2/managesnapshot.sh, I use "qemu-img convert -f qcow2 -O qcow2" to copy the snapshot from secondary to primary (hence there is no base image file), instead of "cp -f", this is because convert is faster than cp in my testing.

* pr/732:
  CLOUDSTACK-5863: revert volume snapshot for KVM/QCOW2

Signed-off-by: Wei Zhou <w.zhou@tech.leaseweb.com>
2015-09-01 16:18:40 +02: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
Wei Zhou
92344c006d CLOUDSTACK-5863: revert volume snapshot for KVM/QCOW2 2015-08-24 11:01:50 +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
Remi Bergsma
2f858a7d08 clean-ups in the file
- replace tabs with 4 spaces
- removed trailing spaces
- fixed indenting
- made if; then look the same
2015-08-11 14:55:16 +02:00
Remi Bergsma
ee9b644e28 this query had no -P port specified so did not work 2015-08-11 14:51:11 +02:00
Remi Bergsma
8a1e79f518 make sane defaults for MySQL settings
In dev environments, there is no /etc/cloudstack/management/db.properties file
That forces you to specify all parameters on the command line. This commit
sets some defaults, like port 3306, user root and localhost.

When available, it will still get settings from the config file and it will
also allow you to override it on the command line. So it is fully backwards
compatible.
2015-08-11 14:51:11 +02:00
Pierre-Luc Dion
3381154faf initial dockerization commit. 1. update injectkeys.sh to work into restricted container 2. move previous dockerfiles into tools/docker 3. dockerfiles for management-server on centos and marvin
CLOUDSTACK-8249

Signed-off-by: Pierre-Luc Dion <pdion891@apache.org>
2015-08-01 08:30:16 -04:00
Frank Louwers
d8f37c5e17 Sorry about the typo
Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>

This closes #601
2015-07-23 08:36:05 +02:00
Frank Louwers
4705d75d4a CLOUDSTACK-8650: Fix securitygroups ingress FW for protocol any and 0.0.0.0/0
Change way 0.0.0.0/0 + all is handles, as per feedback in Slack channel

Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>
2015-07-23 08:36:05 +02:00
Ilya Musayev
469d9ebed4 CLOUDSTACK-8624: Added the support for mysql db port and lowered the requiremnts for available disk capacity to 2.1GB VS original 5GB as it was too excessive. 2015-07-10 07:24:41 +05:30
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
Wido den Hollander
3e3c11ffca CLOUDSTACK-8559: IP Source spoofing should not be allowed
We did not verify if the packets leaving an Instance had the correct
source address.

Any IP packet not matching the Instance IP(s) will be dropped
2015-06-15 15:05:53 +02:00
miguelaferreira
e983246cd4 Set the url accordingly when installing a system vm template
The script that installs the system vm templates sets the uuid column
for the template being installed, however it does not set the respective
url column. This commit changes that.

Signed-off-by: Remi Bergsma <apache@remi.nl>

This closes #348
2015-06-02 16:00:15 +02:00
Rohit Yadav
274222769a CLOUDSTACK-8252: Ignore VLAN 4095 which is n/a on linux
VLAN id 4095 is commonly used as a 'tag passthrough' in virtualization environments
(VMware, specifically). This vlan id is incompatible with Linux, but we can
allow the admin to manually configure the bridge if the same passthrough is
desired.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit aee35c96a8157e36b1237dc537bb5b01e1657d61)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-05-22 13:26:06 +01:00
Anshul Gangwar
aa7ae1b918 CLOUDSTACK-8416: added support for FIPS compliant checksum. It will now support md5, sha1, sha224, sha256, sha384 and sha512 checksums.
In same checksum parameter user can pass any of the above algorithms hash
This closes #196
2015-04-30 14:38:44 +05:30
Rohit Yadav
840c0a0974 CLOUDSTACK-8401: Fix KVM's SG script to properly cleanup old network rules
- Router VMs don't have a chain rule with -def suffix, this fixes name and
  properly removes VR vms not running on a host
- Before trying to remove dnats, filter empty/None elements from list
- destroy_ebtables_rules should check what kind of action is request to be
  performed (-A for add or -D for removed) and execute based on that
- Before executing any command, log it for debugging purposes
- Method to cleanup bridge, may be used in future

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 39255121154cca214328e93093db65f968b8c9f8)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-25 03:14:05 +02:00
Rohit Yadav
acd9a251d3 CLOUDSTACK-4611: cleanup_rules using ebtables rules from /proc/modules
The SG python script depends on ebtables-save which is not available on Debian
based distros (Ubuntu and Debian for example). The commit uses /proc/modules
to find available bridge tables (one of nat, filter or broute) and then
find VMs that need to be removed. Further it uses set() to remove duplicate VMs
so we don't try to remove a VM's rules more than once leading to unwanted errors
in the log.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit d66677101c7770b5c4b8c39064eba5ee94d124c6)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-25 03:13:58 +02: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
KC Wang
581f3b79a3 findbugs and PMD fixes
This closes #168

Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2015-04-15 11:30:04 +05:30
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
KC Wang
01864ef77c CLOUDSTACK-6697: bigswitch networking plugin update
1. provide compatibility with the Big Cloud Fabric (BCF) controller
   L2 Connectivity Service in both VPC and non-VPC modes
2. virtual network terminology updates: VNS --> BCF_SEGMENT
3. uses HTTPS with trust-always certificate handling
4. topology sync support with BCF controller
5. support multiple (two) BCF controllers with HA
6. support VM migration
7. support Firewall, Static NAT, and Source NAT with NAT enabled option
8. add VifDriver for Indigo Virtual Switch (IVS)

This closes #151

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-09 13:02:02 +05:30
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
Star Guo
8ed833a13b scripts: add ip set interface up because in CentOS7 the interface will not auto up
This closes #97

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-03-10 10:19:04 +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
843c0f891b scripts: use cloudmanagementserver.keystore instead of cloud.keystore
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit f70afa1375dd353a68c3ee9be941a605025cfc04)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-02-28 17:06:27 +05:30
Marcus Sorensen
9bf2626e57 CLOUDSTACK-8263: KVM - use virsh instead of libvirt for resizing qcow2, as libvirt bindings are insufficient
Change-Id: I08246219cb1469a46dc6a9ec76a8c3a67b0b8bf6
2015-02-17 18:09:41 -08:00
Marcus Sorensen
ed8184a5b2 CLOUDSTACK-8263: KVM - notify qemu process of resized volume for libvirt-resized storage
Change-Id: Iddd8bb068855d3565075d3ecf7c6c0f074d00e1a
2015-02-17 14:25:55 -08:00
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
Vincent Bernat
3ea8a1187a CLOUDSTACK-7195: log wide exceptions in security_group.py
Some try/except in security_group.py catch a lot of exceptions. There
was already one fixed in CLOUDSTACK-1052. Here is another one. We use
logging.exception() to log those exceptions.

Signed-off-by: Vincent Bernat <Vincent.Bernat@exoscale.ch>
Signed-off-by: Pierre-Luc Dion <pdion891@apache.org>
2014-12-05 17:24:27 -05:00
Rohit Yadav
518853ab43 packaging: updated hardcoded jasypt version to 1.9.2
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 43f39a1ec37de08e5b8e97dfd74a853c0aae76c7)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2014-12-04 04:04:30 +05:30
Edison Su
0e3aebbb9d CLOUDSTACK-5446:
delete all the leftover snapshots on primary storage in case of snapshot
errors, after a new backup snapshot is finished
2014-11-19 15:53:06 -08: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
Rajesh Battala
67ff7dac82 CLOUDSTACK-7654 fixed issues with zip format templates. 2014-10-07 12:39:09 +05:30
Frank Zhang
01dada100a CLOUDSTACK-6278
Baremetal Advanced Networking support
2014-10-06 16:03:19 -07:00
Hugo Trippaers
6687727b76 Frank forgot the license header 2014-09-19 10:14:38 +02:00
Frank Zhang
8b89494a35 CLOUDSTACK-6278
Baremetal Advanced Networking support
2014-09-18 16:54:37 -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