Commit Graph

1113 Commits

Author SHA1 Message Date
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
Likitha Shetty 88b5761647 CLOUDSTACK-6146. [VMware] [ESXi 5.5] Live VM migration of an already migrated VM (with storage) across clusters fails
In vCenter 5.5, once a volume is migrated the VMDKs are renamed to match the name of the VM.
Update volume path for every volume belonging to the VM to the corresponding new disk filename.

Conflicts:

	plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
	plugins/hypervisors/vmware/src/org/apache/cloudstack/storage/motion/VmwareStorageMotionStrategy.java
2014-02-26 13:45:44 +05:30
Likitha Shetty 0926bf57f4 CLOUDSTACK-6146. [VMware] [ESXi 5.5] Live storage migration of an already migrated volume fails
In vCenter 5.5, once a volume is migrated the VMDKs are renamed to match the name of the VM.
If a volume has been renamed upon migration update its volumePath to that of the new disk filename.

Conflicts:

	plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
	vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
2014-02-26 13:45:43 +05:30
Min Chen b484b48201 Provide separate option for Windows Server 2012 R2 as
an OS type when registering template.
2014-02-25 16:09:29 -08:00
Mandar Barve b0c6d47347 - Updated APICommand annotation to add new flags that indicate if API request or response carry sensitive info - Updated all API classes with the new annotation flag values as per the API's sensitivity - Updated server code to check response annotation before audit logging
Signed-off-by: Daan Hoogland <daan@onecht.net>
(cherry picked from commit df270d6387c362b960064ee5123c14782e767a19)
Signed-off-by: Daan Hoogland <daan@onecht.net>
2014-02-25 22:59:10 +01: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
Rajesh Battala f960ada36e CLOUDSTACK-6159 Fixed creating volumes(Root, DataDisk) with uuid in primary store 2014-02-23 09:21:30 +05:30
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
Nitin Mehta c969aa2595 CLOUDSTACK-6134:
If volume already exists for the vm - register the vm in the inventory and start it.
2014-02-18 18:24:33 -08:00
Hugo Trippaers 24309f6001 Prevent a ClassCastException when the answer is not a SetupAnswer (which happends when something goes wrong while connecting) 2014-02-18 12:37:36 +01:00
Sheng Yang 6bde675f87 Remove SetupGuestNetworkAnswer
It's unnecessary and not different from Answer itself.
2014-02-14 18:10:05 -08:00
Sheng Yang 161e7d93ca CLOUDSTACK-5779: Fix missing clean up period for VR 2014-02-14 18:10:00 -08:00
Hugo Trippaers 97bad4f9b3 Fix checkstyle and license issues 2014-02-14 18:37:47 +01:00
Hugo Trippaers d4d49578dc Findbugs : Fix a number of potential NPEs and minor findings 2014-02-14 18:37:45 +01:00
Sander Botman 16aa73c2c8 Fixing some of the scary bugs possible null pointer: created testSetNicDevIdIfCorrectVifIsNotNull
Signed-off-by: Hugo Trippaers <htrippaers@schubergphilis.com>
2014-02-14 18:37:44 +01:00
Likitha Shetty db91e54bf3 CLOUDSTACK-6112. Adding VPC router to a guest network fails with StringIndexOutOfBoundsException. 2014-02-14 17:01:27 +05:30
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
Marcus Sorensen 7064972997 Fix someone's broken push due to bad checkstyle (VMwareGuru.java unused imports) 2014-02-12 16:26:33 -07:00
Likitha Shetty 9f597ef130 CLOUDSTACK-6056. Enabling static NAT rule for a portable public IP fails with error "Failed to enable static nat".
router.extra.public.nics isn't being honoured and so when an ip that is acquired from the additional VLAN range
is being configured it failed.
2014-02-12 15:53:45 +05:30
Anshul Gangwar b86d45b003 CLOUDSTACK-6054: Changes for making vmsync work for hyper-v. Made changes to PingCommand and
StartupCommand to return the state of all vms on the host.
2014-02-11 12:19:41 +05:30
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
Rajesh Battala 7f780f26f9 Fixed agent code to handle untagged public vlan while parsing the vlan id 2014-02-05 23:44:14 +05:30
Devdeep Singh a24263fe81 CLOUDSTACK-6030: Encrypt the primary and secondary smb storage password when it is stored in the db. 2014-02-05 15:44:09 +05:30
Alex Huang 7f34282dfa Removed references to secondarystoragevmmanager from code that doesn't use it. 2014-02-05 01:39:15 +00:00
Min Chen 929099518d Fix trailing whitespace. 2014-02-04 15:42:39 -08:00
Min Chen 39efee285f CLOUDSTACK-6027:CreateVolume from snapshot is failing with S3 on Vmware. 2014-02-04 15:08:28 -08:00
Min Chen 9b21da65d1 CLOUDSTACK-6025:CreateTemplate from snapshot in NFS is failing , after
migarting to S3 datastore.
2014-02-04 11:01:51 -08:00
Daan Hoogland 0839fbce67 CLOUDSTACK-6023 vcpus should not be higher then xen specifies 2014-02-04 18:41:53 +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
Min Chen 30695d7f93 CLOUDSTACK-6019:CreateVolume from snapshot in NFS is throwing Warning
"sync snapshot from cache to region wide store failed for image store
test".
2014-02-03 16:41:04 -08: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
Likitha Shetty 06f79a881c CLOUDSTACK-5994. Hitting IndexOutOfBoundsException in GetVmStatsCommand after upgrade.
To obtain network read/write statistics, multiply sample duration with the
average of the particular performance metric obtained over the sample period.
2014-01-30 18:31:38 +05:30
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