186 Commits

Author SHA1 Message Date
Mike Tutkowski
4c89b5b97a Merge branch 'pr-2081' 2017-10-18 14:25:45 -06:00
dahn
7ca5b535a4 CLOUDSTACK-9899 Url validation disabling (#2074)
* CLOUDSTACK-9899 adding a global setting for not checking URLs from the MS

* CLOUDSTACK-9899 refactor HttpTemplateDownloader contructor cleanup

* CLOUDSTACK-9899 refactor HttpTemplateDownloader.download() cleanup

* CLOUDSTACK-9899 add the new config key to configurable

* CLOUDSTACK-9899 refactor download method

* CLOUDSTACK-9899 less verbose setting comment

* CLOUDSTACK-9899 debug message to indicate checking happened

* CLOUDSTACK-9899 typi flase -> false
2017-10-10 19:56:00 +02:00
Harika Punna
6bb0ca2f85 This feature separates the snapshot creation on primary and its backing up on secondary.
As part of this, a new parameter, which is optional, is added to CreateSnapshotCmd, which seperates the creation and backup.

More details in the FS-
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Separate+creation+and+backup+operations+for+a+volume+snapshot
2017-10-04 14:39:03 +05:30
Wei Zhou
960cb84083 CLOUDSTACK-7984: Collect network statistics for VMs on shared network (KVM implementation) 2017-07-23 17:15:23 +02:00
Rajani Karuturi
278514f623 Merge pull request #1900 from anshul1886/CLOUDSTACK-8862
CLOUDSTACK-8862: Introduced new state attaching for volume. This will…
2017-06-06 15:50:06 +05:30
Rajani Karuturi
6b0e67502c Merge pull request #1992 from Accelerite/CS-9824
CLOUDSTACK-9824:Resource count for Primary storage is considered twice - while creating and while attaching the disk
2017-05-16 11:11:49 +05:30
Mowgli
c2c1f01d2e Merge branch 'master' into CLOUDSTACK-9604 2017-04-26 11:48:56 +05:30
Anshul Gangwar
b766bf7fc9 CLOUDSTACK-8862: Introduced new state attaching for volume. This will make sure that other attach operation on same volume will fail gracefully without calling access calls for managed storage like SolidFire
Also, skipping test_upload_attach_volume as there is no implementation
which supports this.
2017-04-17 15:40:02 +05:30
Sudharma Jain
7348f9412a CLOUDSTACK-9851 travis CI build failure after merge of PR#1953 2017-03-30 09:22:58 +05:30
Suresh Kumar Anaparti
93f5b6e8a3 CLOUDSTACK-9794: Unable to attach more than 14 devices to a VM
Updated hardcoded value with max data volumes limit from hypervisor capabilities.
2017-03-13 16:14:12 +05:30
Anshul And Priyank
ec66256149 CLOUDSTACK-9604: Root disk resize support for VMware and XenServer. 2017-03-09 19:20:38 +05:30
Pranali Mande
616c05e292 CLOUDSTACK-9824:Resource count for Primary storage is considered twice - while creating and while attaching the disk 2017-03-07 17:23:02 +05:30
Rajani Karuturi
fa85151be9 Merge release branch 4.9 to master
* 4.9:
  CLOUDSTACK-9746 system-vm: logrotate config causes critical failures
  CLOUDSTACK-9788: Fix exception listNetworks with pagesize=0
  CLOUDSTACK-8663: Fixed various issues to allow VM snapshots and volume snapshots to exist together
  Fix HVM VM restart bug in XenServer
2017-02-28 05:47:06 +05:30
Rajani Karuturi
d84347ba8c Merge pull request #1838 from anshul1886/CLOUDSTACK-9682
CLOUDSTACK-9682: Block VM migration to a storage which is in maintainenece mode. If

the destination pool is in maintenance mode do not allow a volume to be migrated to
the storage pool. Fixed it for volume migration and vm migration with volume.

* pr/1838:
  CLOUDSTACK-9682: Block VM migration to a storage which is in maintainenece mode. If the destination pool is in maintenance mode do not allow a volume to be migrated to the storage pool. Fixed it for volume migration and vm migration with volume.

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-17 17:48:32 +05:30
Anshul Gangwar
ca84fd4ffd CLOUDSTACK-8663: Fixed various issues to allow VM snapshots and volume
snapshots to exist together

Reverting VM to disk only snapshot in Xenserver corrupts VM

Stale NFS secondary storage on XS leads to volume creation failure from snapshot
2017-02-15 12:56:39 +05:30
Anshul Gangwar
8ef94819da CLOUDSTACK-9682: Block VM migration to a storage which is in maintainenece mode. If
the destination pool is in maintenance mode do not allow a volume to be migrated to
the storage pool. Fixed it for volume migration and vm migration with volume.
2017-02-13 15:29:52 +05:30
Wei Zhou
a2428508e2 CLOUDSTACK-8746: vm snapshot implementation for KVM
(1) add support to create/delete/revert vm snapshots on running vms with QCOW2 format
(2) add new API to create volume snapshot from vm snapshot
(3) delete metadata of vm snapshots before stopping/migrating and recover vm snapshots after starting/migrating
(4) enable deleting of VM snapshot on stopped vm or vm snapshot is not listed in qcow2 image.
(5) enable smoke tests for vmsnaphsots on KVM
2017-01-24 21:47:30 +01:00
Syed
f46651e672 Support Backup of Snapshots for Managed Storage
This PR adds an ability to Pass a new parameter, locationType,
    to the “createSnapshot” API command. Depending on the locationType,
    we decide where the snapshot should go in case of managed storage.

    There are two possible values for the locationType param

    1) `Standard`: The standard operation for managed storage is to
    keep the snapshot on the device. For non-managed storage, this will
    be to upload it to secondary storage. This option will be the
    default.

    2) `Archive`: Applicable only to managed storage. This will
    keep the snapshot on the secondary storage. For non-managed
    storage, this will result in an error.

    The reason for implementing this feature is to avoid a single
    point of failure for primary storage. Right now in case of managed
    storage, if the primary storage goes down, there is no easy way
    to recover data as all snapshots are also stored on the primary.
    This features allows us to mitigate that risk.
2016-10-30 23:19:58 -06:00
Will Stevens
678b28f273 Merge release branch 4.8 to master
* 4.8:
  CLOUDSTACK-6928: fix issue disk I/O throttling not applied
  CLOUDSTACK-6975: Prevent dnsmasq from starting on backup redundant RvR.
2016-05-25 22:54:23 -04:00
Wei Zhou
976b3b7df4 CLOUDSTACK-6928: fix issue disk I/O throttling not applied 2016-05-19 11:26:43 +02:00
Mike Tutkowski
2bd035d199 Support for backend snapshots with XenServer 2016-05-13 01:02:04 -06:00
Will Stevens
9654c990c8 Merge pull request #1365 from shapeblue/4.7-vmware-diskchain
[4.7] vmware: improve support for disks- Improve disk chain usage while attaching, migrating disks
- Gets root disk controller based diskDeviceBusName from volume's chain info

* pr/1365:
  vmware: improve support for disks

Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-05-02 16:58:41 -04:00
David Mabry
0b7cc087f8 Let hypervisor type KVM and Simulator detach root volumes.
Updated test_volumes.py to include a test for detaching and reattaching a root volume from a vm. I also had to update base.py to allow attach_volume to have the parameter deviceid to be passed as needed.
2016-04-18 15:40:36 -05:00
Rohit Yadav
8e4644e413 vmware: improve support for disks
- Improve disk chain usage while attaching, migrating disks
- Gets root disk controller based diskDeviceBusName from volume's chain info
- Refactor and move VirtualMachineDiskInfo to cloud-utils
- Allows mixing of scsi controller types
- Fixes a NPE case with map passed as null, for example in case of detach volume
  command
- Use a osdefault translator that allow use of recent os types added (enums of
  which) are not available in the sdk

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-04-18 22:44:18 +05:30
Nitin Kumar Maharana
55f8b32aa0 CLOUDSTACK-9132: API createVolume takes empty string for name parameter
Added conditions to check if the name is empty or blank.
If it is empty or blank, then it generates a random name.
Made the name field as optional in UI as well as in API.
Added required unit tests.
2016-01-08 13:41:41 +05:30
Remi Bergsma
cdfcea3da2 Merge release branch 4.6 to master
* 4.6:
  [UI] bug fix: Delete added ACL lists is not available for Domain Admin and normal users
  CLOUDSTACK-4787: Allow users to select disk controller for VM/template
  CLOUDSTACK-4787 Allow selection of scsi controller type in vSphere
2015-12-12 22:29:19 +01:00
Daan Hoogland
8c78f89c91 Merge pull request #1132 from shapeblue/4.6-vmware-diskcontrollers
[4.6] CLOUDSTACK-4787 - vmware diskcontrollersSame as #1131 (see this for screenshots etc)

* pr/1132:
  CLOUDSTACK-4787: Allow users to select disk controller for VM/template
  CLOUDSTACK-4787 Allow selection of scsi controller type in vSphere

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-12-12 14:38:28 +01:00
Rohit Yadav
f30fbe9a5c Merge branch '4.6' 2015-12-07 12:44:07 +05:30
Wei Zhou
119b27b2c6 CLOUDSTACK-9101: update volume size after resizevolume 2015-12-03 14:54:45 +01:00
Sateesh Chodapuneedi
6a9956e0f5 CLOUDSTACK-4787 Allow selection of scsi controller type in vSphere
commit #7
    So far only 1 controller (scsi or ide) is supported in Cloudstack for ide or
    scsi, this is existing limitation. Added support for 2nd IDE controller. Support adding IDE
    virtual disk to VM. Also added check if VM is running as IDE virtual disk cannot be attached
    to VM if VM is runnning.If user detaches a virtual disk on lower unit number of controller,
    then subsequent attach operation should find free unit number on the controller and attach
    the virtual disk there.

    commit #6
    Let the controllers of existing VMs continue without flip, current busInfo retrieved from
    chain_info field of volume record from database would be preferred over
    controller settings from all configuration settings.

    commit #5
    Editing global configuration param vmware.root.disk.controller osdefault value results
    in loss of previous root disk controller type. Hence root disk's controller type for legacy
    VMs is unknow post that modificaiton by user. If VM is stop/start then we could get this
    infromation from bus info of existing volume. But if user resets VM and then try to start VM.
    The existing bus info would be lost. Hence existing disk info is not available to depend on.
    Using lsilogic or generic scsi controller for ROOT disk of legacy VMs if reset.

    commit #4
    Avoid adding additional (>1) scsi controllers to system vms. While attaching volume to legacy VM
    don't use osdefault optoin which applicable only for VM created with the option enabled, use
    legacy data disk controller type (lsilogic)

    commit #3
    If root disk's controller type is scsi and data disk controller type condenses
    to any of scsi sub-types then data disk controller type would fall back to root disk controller itself. This
    ensures data volumes would be accessible in all cases as controller of root volume would be reliable
    and it means VM has the supported controller. It also avoids mix of scsi controller sub-types in a user instance.
    Also translating disk controller type scsi to lsilogic.

    commit #2
    Support auto detection of recommended virtual disk controller type for specific guest OS.

    commit #1
    Support granual controller types. Add support for controller types in template registration as well.

    Fix white spaces.
    Removed stale HEAD merge lines
    Removed tail of merge lines
    Fixed VmwareResource, removing storage commands that moved to VmwareStorageProcessor.
    removed stale code of controller that is present in processor
    Fixed check style errors.
    Fixed injection.
    Tested with Linux and windows templates. Unable to run iso based tests due to few bugs in register iso area.

    Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>

(cherry picked from commit a4cc987a6f66f20c434942956fffe5951df09e43)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-11-27 18:39:41 +05:30
Rajani Karuturi
256263492f CLOUDSTACK-9080: Resource limits for Primary arent respected during attach.
primary store resource limit check is not performed while attaching a
volume to a vm. Added them same.
Also added a marvin test case to verify the same.
2015-11-24 11:59:31 +05:30
Daan Hoogland
2fb01b67ad CID 1338016: multi catch instead of pokemon 2015-11-16 18:33:32 +01:00
Rajani Karuturi
29dfeac857 CLOUDSTACK-8889: delete volume doesnt decrement primary store resource count
Primary Storage count for an account does not decrease when a Data Disk
is deleted belonging to the account unless the VM to which volume
belonged is destroyed

The resource counts are updated even before the disk is actually deleted
resulting in the same value.
Moved the resource counts updation to after the expunge operation as
thats when the disk is actually deleted.

all the tests in test/integration/component/test_ps_limits.py now pass
2015-10-26 17:40:27 +05:30
Rajani Karuturi
8bc0294014 Revert "Merge pull request #714 from rafaelweingartner/master-lrg-cs-hackday-003"
This reverts commit cd7218e241a8ac93df7a73f938320487aa526de6, reversing
changes made to f5a7395cc2ec37364a2e210eac60720e9b327451.

Reason for Revert:

noredist build failed with the below error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project cloud-plugin-hypervisor-vmware: Compilation failure
[ERROR] /home/jenkins/acs/workspace/build-master-noredist/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java:[484,12] error: non-static variable logger cannot be referenced from a static context
[ERROR] -> [Help 1]

even the normal build is broken as reported by @koushik-das on dev list
http://markmail.org/message/nngimssuzkj5gpbz
2015-08-31 11:27:57 +05:30
Rafael Weingartner
3818257a68 Solved jira ticket: CLOUDSTACK-8750 2015-08-28 22:35:08 -03:00
Mike Tutkowski
b1905c2040 CLOUDSTACK-8698: Retrieve a new device ID, if needed 2015-08-05 13:58:22 -06:00
Daan Hoogland
bb613baa2b findbugs: repeated condition seems c&p error the tested states sugest that EXPUNGED should be the last one
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes #491
2015-06-19 15:26:53 +03:00
Rajani Karuturi
bd71fcb650 Fixed two coverity reported issues
Dereference after null check
Dm: Dubious method used

This closes #219
2015-05-01 16:08:26 +05:30
Rajani Karuturi
0b8355920e Merge branch 'volume-upload' into master
This closes #206
2015-04-29 11:12:53 +05:30
Rajani Karuturi
75ae90b073 volume-upload: added account level secondary storage resource limit checks 2015-04-24 15:48:44 +05:30
Rajani Karuturi
f172fbef8a Bug-Id: CS-39350 Able to upload Volume greater than the Resource limit defined for Primary Storage.
Reviewed-By: Harikrishna Patnala <harikrishna.patnala@citrix.com>
2015-04-20 13:01:19 +05:30
Rajani Karuturi
4f35d3611a volume upload: fixed the error message incase of wrong image format 2015-04-16 17:43:46 +05:30
Koushik Das
4338bea070 volume upload: cannot delete a volume in NotUploaded state
Volume deletion is not allowed in NotUploaded or UploadInProgress states, added validation in delete volume API for same
2015-04-14 16:08:54 +05:30
Rohit Yadav
a07497b373 server: fix NPE case in VolumeApiServiceImpl
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit df934c954106a618f8b0aca7e7dfbac890d78244)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-13 15:47:51 +05:30
Sanjay Tripathi
5f59091418 CLOUDSTACK-8350: Volume attachment failed when user stops the VM during attaching DISK. 2015-03-27 15:26:32 +05:30
Rajani Karuturi
018023c1ef volume upload: added validation for file formats
merged TemplateUtils and ImageStoreUtil to a singe ImageStoreUtil
also added a unittest for ImageStoreUtil
2015-03-20 16:25:13 +05:30
Rajani Karuturi
d5dffb5dc9 volume upload: added md5 checksum validation
also fixed the issue wherein the successful uploads where also moving to
error state as the channelinactive is called after the end of successful
upload as well.
added a fileuploaded boolean to check when the channel is inactive.
2015-03-18 12:20:51 +05:30
Rajani Karuturi
b16520bcec volume upload: added max size check for temaplte/volume post upload
used the existing configuration variables max.template.iso.size and
storage.max.volume.upload.size for templates and volumes respectively.
2015-03-03 17:27:40 +05:30
Rajani Karuturi
dd1a8da977 volume upload: Volume entry created in DB even though GetUpload* API fails with "No ssvm present" error
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2015-02-27 17:42:32 +05:30
Rajani Karuturi
b616894c21 volume upload: fixed issues during request validation
adding the encoded metadata to the signature
2015-02-17 11:50:58 +05:30