Commit Graph

387 Commits

Author SHA1 Message Date
Marcus Sorensen c02c634945 Merge branch '4.4' into resize-root 2014-03-14 02:27:26 -06:00
Murali Reddy 36541a2f4c adding distributed routing support for KVM OVS
some check style error fixes
2014-03-14 16:56:38 +05:30
Murali Reddy e045883c52 introduce OvsNetworkTopologyGuru that has convinenace functions to
- get the hosts on which VPC spans given vpc id
   - get the VM's in the VPC
   - get the hosts on which a network spans
   - get the VPC's to which a hosts is part of
   - get VM's of a VPC on a hosts

introduces capability to build a physical toplogy representation of a
VPC. This json file is encapsulated in
OvsVpcPhysicalTopologyConfigCommand, and is used to send full topology
to hypervisor hosts. On hypervisor this json config can be used to setup
tunnels, configure bridge, add flow rules etc

Ovs GURU, to use different broasdcast scheme VS://vpcid.gerkey for the
networks in VPC that use distributed routing

each VIF and tunnel interface to carry the network UUID in other/options
config
2014-03-14 16:56:37 +05:30
Marcus Sorensen f52c7430f6 Merge branch 'master' into resize-root 2014-03-13 23:32:05 -06:00
Alena Prokharchyk 6c23e201ad 1) More fixes for the problems found by findBugs
2) Corrected some logging in  MidoNetPublicNetworkGuru - removed .toString method call on the objects in the log body as toString is called on the object by default when use log4j
2014-03-13 16:05:45 -07:00
Kishan Kavala 6d4b979c4d CLOUDSTACK-6122: LXC systemVms run on KVM. If they are not included in the VmState report, MS assumes that system Vms are not running. MS will stop these Vms and spin new ones. So on LXC hosts, KVM Vms also have to be included in the Vmlist 2014-03-11 23:49:28 +05:30
Marcus Sorensen c874e20c24 CLOUDSTACK-6225: Check libvirt version and volume format before
adding flag VIR_STORAGE_VOL_RESIZE_ALLOCATE to resize volume
libvirt call
2014-03-11 11:13:12 -06:00
Anthony Xu ab1d3af460 Use seperate path to sync VM metadata for XS
VM status sync only does VM status sync
2014-03-05 15:44:50 -08:00
Marcus Sorensen e5449e29c9 CLOUDSTACK-6203: KVM Migration fixes. Moved migration to a thread
so we can monitor it and potentially take action to make migration
complete if admin has defined such.
2014-03-05 12:24:04 -07:00
Marcus Sorensen fb0b2eb267 CLOUDSTACK-6192: Return failure on StartCommand and PrepareForMigrationCommand
when connectPhysicalDisk fails, rather than continuing on
2014-03-04 14:18:51 -07:00
Wido den Hollander 1f9649bc3b kvm: Fix a NullPointerException which occurs when storage pool creation fails
Also make the logging around creating a RBD storage pool a bit better when creating
that fails.
2014-03-04 16:03:11 +01:00
Kelven Yang 414b1cbb22 let KVM only report running VM to workaround the problem when KVM still keeps stopped-VM around in some cases 2014-02-28 15:35:59 -08:00
Jayapal cb1c287433 CLOUDSTACK-6183: Unplug the nic when all the ips from the public subnet is released 2014-02-28 16:46:57 +05:30
Min Chen a6f17675d4 CLOUDSTACK-6175:s3.singleupload.max.size option not applicable for
backup snapshot on KVM.
2014-02-26 15:13:49 -08:00
Wido den Hollander abf3c055c2 templates: Add FreeBSD 10 template
With VirtIO enabled on KVM. FreeBSD 10 supports VirtIO for both the
network and the disks. This frees us from IDE and E1000 which should
also improve performance.
2014-02-25 14:56:24 +01:00
Niels de Vos 14689d7810 Gluster should store volumes in qcow2 format
By default all network disks are in RAW format. Gluster works fine with
QCOW2 which has some advantages.

Disks are by default in QCOW2 format. It is possible to run into
a mismatch, where the disk is in QCOW2 format, but QEMU gets started
with format=raw. This causes the virtual machines to lockup on boot.

Failures to start a virtual machine can be verified by checking the log
of the virtual machine, and compare the output of 'qemu-img info'.

In /var/log/libvirt/qemu/<VM>.log find the URL for the drive:

    -drive file=gluster+tcp://...,format=raw,..

Compare this with the 'qemu-img info' output of the same file, mounted
under /mnt/<pool-uuid>/<img-uuid>:

    # qemu-img info /mnt/<pool-uuid>/<img-uuid>
    ...
    file format: qcow2
    ...

This change makes passes the format when creating a disk located on RBD
(RAW only) and Gluster (QCOW2).

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2014-02-25 12:08:46 +01:00
Hugo Trippaers 52c4f00b26 Findbugs: Fix potential NPE 2014-02-24 14:07:33 +01:00
Hugo Trippaers 6b61fd7d09 Fix CID 1186644: ES: Checking String equality using == or != 2014-02-24 14:06:40 +01:00
Marcus Sorensen 4fcd0b1a1f if libvirt fails to attach disks, call disconnectPhysicalDisk to clean up 2014-02-20 15:43:27 -07:00
Niels de Vos fe83a85436 Add support for Primary Storage on Gluster using the libvirt backend
The support for Gluster as Primary Storage is mostly based on the
implementation for NFS. Like NFS, libvirt can address a Gluster environment
through the 'netfs' pool-type.
2014-02-20 14:52:01 +01:00
Sheng Yang 5332f67ae8 CLOUDSTACK-6047: Make sure every commands to VR resource is NetworkElementCommand 2014-02-19 19:46:49 -08:00
Marcus Sorensen dd4f6bfacf Merge branch 'master' into resize-root 2014-02-10 20:12:56 -07:00
Marcus Sorensen 9feb867fa3 CLOUDSTACK-6225: Check libvirt version and volume format before
adding flag VIR_STORAGE_VOL_RESIZE_ALLOCATE to resize volume
libvirt call
2014-03-11 11:14:27 -06:00
Marcus Sorensen 0eb9967354 Merge branch 'master' into resize-root 2014-03-07 17:21:57 -07:00
Marcus Sorensen 4a21da6b79 resizeVolume: add a few root resize integration tests 2014-02-10 02:48:49 -07:00
Marcus Sorensen caf9de61a6 Merge remote-tracking branch 'origin/master' into resize-root 2014-03-04 14:27:10 -07:00
Marcus Sorensen 23c113bff6 CLOUDSTACK-6181: initial support for passing rootdisksize parameter to
deployVirtualMachine. This currently works via 'details[0].rootdisksize=3'
    for example to get a 3G root. I'm not sure that the syntax is correct on the
    details map for deployVirtualMachine (was already implemented), so there's
    an email thread out about that.
2014-03-03 17:16:40 -07:00
Marcus Sorensen df77c4310a CLOUDSTACK-6103: Pass VM iso information along with
PrepareForMigrationCommand, so that destination hypervisor can
mount pool. This further exposed an issue for KVM where iso
was not getting cleaned up upon successful migration, fixed as well.
2014-02-14 00:34:48 -07:00
Laszlo Hornyak bdf50f6d24 Remove assertion
The assertion is built on the assumption that cpuinfo_max_freq is readable by user, which may not be universaly true.
2014-02-10 19:56:54 +01:00
Laszlo Hornyak ab15653d68 Revert "Temporarily ignore getCpuSpeed test"
This reverts commit e4a91d3610.
2014-02-10 19:40:37 +01:00
Laszlo Hornyak e4a91d3610 Temporarily ignore getCpuSpeed test
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-02-09 23:13:55 +01:00
Laszlo Hornyak 55b6b6d50b Boolean expression simplification
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-02-09 19:19:20 +01:00
Laszlo Hornyak d6a6e8dfa5 Minor Boolean expression simplification
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-02-09 19:05:28 +01:00
Laszlo Hornyak 74a3cb4d5e String concatenation cleanup
Replaced string concatenation in loop with StringBuilder

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-02-09 19:01:45 +01:00
Laszlo Hornyak 8e3ae40ba2 removed self-assignment
It must have been a copy-paste from the other constructor.

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-02-09 18:46:36 +01:00
Laszlo Hornyak d22b65f45f replaced Integer reference comparsion with .equals
By default only the Integers between -128..127 are cached (unless overridden by java.lang.Integer.IntegerCache.high system property)
If the inbound or outbound values are higher, the reference comparison won't work.

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-02-09 18:39:03 +01:00
Laszlo Hornyak 3e3ded75f4 safely close resource with java 1.7 resource block
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-02-09 18:27:54 +01:00
Laszlo Hornyak 5e4fec9eca removed unused variables
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-02-09 16:55:27 +01:00
Laszlo Hornyak e52a276104 cleanup in LibvirtComputingResource
- minor resource leak cleaned up
- cpu-speed reading method extracted
- test added
- logging added in case of exception

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-02-09 16:50:10 +01:00
Wido den Hollander 1baebebda6 test: Expand LibvirtDomainXMLParserTest with Interface test 2014-02-06 14:40:40 +01:00
Wido den Hollander 41c7e22eee test: Add test for LibvirtDomainXMLParser
A couple of changes where made to other classes as well to add
some features to allow more extensive testing.
2014-02-06 14:23:25 +01:00
Wido den Hollander 3989d6c481 kvm: Resize volumes using libvirt
This saves us a lot of code and libvirt is probably a better
place to do this.

libvirt-java now has the support we want, so we can now resize volumes
with libvirt.

(C)LVM volumes can't be resized using libvirt, so we have to
invoke a resize script for that.
2014-02-04 14:26:51 +01:00
Wido den Hollander 5ae12f31b7 rbd: Set client timeout to 30 seconds.
By default the client_mount_timeout setting in librados is 300 seconds,
but that causes the connect to the Ceph cluster to block for 5 minutes
if the Ceph cluster is not available.

This patch is not ideal, but it mitigates the problem for now.

At a later point all this librados/librbd code should go back to libvirt
again, but the current versions of libvirt in the distributions are
to old for all the features we require.

For now this should prevent the CloudStack agent blocking for 5 minutes
when the Ceph cluster isn't available.

This is also tracked at the Ceph tracker: http://tracker.ceph.com/issues/6507
2014-02-03 16:07:00 +01:00
Marcus Sorensen 05189361b7 CLOUDSTACK-5968 last patch fixes setting low currentMemory during
overprovision, this one explicitly tells libvirt we dont want a
balloon device (won't use it anyway, and will just suck up a percent
of vm memory)
2014-01-28 11:51:23 -07:00
Marcus Sorensen 1530c162e5 CLOUDSTACK-5968 create vm.memballoon.disable agent parameter 2014-01-28 10:44:44 -07:00
Marcus Sorensen daeea46da0 CLOUDSTACK-5956 remove persist flag during live migration 2014-01-27 11:04:05 -07:00
Laszlo Hornyak 884e8c6510 replaced Long instantiation with parseLong
Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-01-25 16:11:51 +01:00
Sheng Yang 3c955c3659 CLOUDSTACK-5779: Make VmwareResource use VirtualRoutingResource 2014-01-24 19:57:52 -08:00
Sheng Yang 285f23f11b CLOUDSTACK-5779: Generalize calling to execute or create file for KVM 2014-01-24 18:28:25 -08:00
Wido den Hollander dad98ef4de test: Add UnitTest for LibvirtSecretDef 2014-01-23 21:09:25 +01:00