3091 Commits

Author SHA1 Message Date
Wilder Rodrigues
942aa17d0c CLOUDSTACK-9067 - Replaces hardcoded paths with the VRScripts constants. 2015-11-18 13:12:45 +01:00
Remi Bergsma
219da64027 Merge pull request #935 from nvazquez/from4.5.1
CLOUDSTACK-8956: NSX/Nicira Plugin does not support NSX v4.2.1JIRA Ticket: https://issues.apache.org/jira/browse/CLOUDSTACK-8956

### Description of the problem:
Prior to version 4.2. Nicira/VmWare NSX used a variation of Open vSwitch as means of integrating SDN into hypervisor layer. Cloudstack NiciraNVP plugin was written to support OVS as a bridge to NSX.
In version 4.2 VMware introduced NSX vSwitch as a replacement for OVS in ESX hypervisors. It is a fork of distributed vSwitch leveraging one of the recent features of ESX called opaque networks. Because of that change the current version of NiciraNVP plugin doesnt support versions of NSX-MH above 4.2 specifically in Vsphere environment. Proposed fix will analyze a version of NVP/NSX API and use proper support for ESX hypervisors.

vSphere hypervisor mode operations when NV is deployed onto NSX managed network changes:
* Current mode. A portgroup = UUID of CS VM NIC is created on a local standard switch of the Hypervisor where VM is starting. VM nic is attached to that port group.
* New mode. No additional port group is created on a HW. No port group cleanup is needed after VM/NIC is destroyed. VM is attached to 1st port group having the following attributes:
** opaqueNetworkId string "br-int
** opaqueNetworkType string "nsx.network"

If portgroup with such attributes is not found a deployment should fail with exception.

### VMware vSphere API version from 5.1 to 5.5:
Since vSphere API version 5.5, [OpaqueNetworks](https://www.vmware.com/support/developer/converter-sdk/conv55_apireference/vim.OpaqueNetwork.html) are introduced.
Its description says:
> This interface defines an opaque network, in the sense that the detail and configuration of the network is unknown to vShpere and is managed by a management plane outside of vSphere. However, the identifier and name of these networks is made available to vSphere so that host and virtual machine virtual ethernet device can connect to them.

In order to connect a vm's virtual ethernet device to the proper opaque network when deploying a vm into a NSX managed network, we first need to look for a particular opaque network on hosts. This opaque network's id has to be **"br-int"** and its type **"nsx.network"**.

Since vSphere API version 5.5 [HostNetworkInfo](https://www.vmware.com/support/developer/converter-sdk/conv55_apireference/vim.host.NetworkInfo.html#opaqueNetwork) introduces a list of available opaque networks for each host.
If NSX API version >= 4.2 we look for a [OpaqueNetworkInfo](https://www.vmware.com/support/developer/converter-sdk/conv55_apireference/vim.host.OpaqueNetworkInfo.html) which satisfies:
* opaqueNetworkId = "br-int"
* opaqueNetworkType = "nsx.netork"

If that opaque network is found, then we need to attach vm's NIC to a virtual ethernet device which support this, so we use [VirtualEthernetCardOpaqueNetworkBackingInfo](https://www.vmware.com/support/developer/converter-sdk/conv55_apireference/vim.vm.device.VirtualEthernetCard.OpaqueNetworkBackingInfo.html) setting:
* opaqueNetworkId = "br-int"
* opaqueNetworkType = "nsx.netork"

* pr/935:
  CLOUDSTACK-8956: Remove assert(false) on opaque network and ping method on NiciraNvpApiVersion
  CLOUDSTACK-8956: Deploy VM on NSX managed network changes if NSX Api Version >= 4.2: has to connect to "br-int" of "nsx.network" type
  CLOUDSTACK-8956: Log NSX Api Version
  CLOUDSTACK-8956: Add VMware Api v5.5 and change pom.xml to use VMware Api v5.5

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-18 13:11:25 +01:00
Remi Bergsma
95ae7963d5 Merge pull request #801 from nlivens/updated-nuage-vsp-plugin
CLOUDSTACK-8832 : Update Nuage VSP plugin to work with Nuage VSP release 3.2

* pr/801:
  CLOUDSTACK-8832 : Update Nuage VSP plugin to work with Nuage VSP release 3.2

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-18 12:09:09 +01:00
Wilder Rodrigues
1cf57f74d7 CLOUDSTACK-9067 - Fomatting the code of HypervDirectConnectResource class 2015-11-17 15:58:22 +01:00
Rajani Karuturi
a723988aec CLOUDSTACK-8885: added blocked connection listener for rabbitmqeventbus
When rabbitmq connections are blocked(for example when rabbitmq is
server is out of space), all the cloudstack threads which does any
action and publishes to rabbitmq(for example login, launch vm etc.) are
all blocked.

Added a blocked connection listener to handle this and unblock the
parent thread.
2015-11-17 16:04:16 +05:30
Rajani Karuturi
693a001c63 updating rabbitmq amqp client to 3.5.4 from 3.4.2 2015-11-17 16:04:16 +05:30
nvazquez
b20c5be1ce CLOUDSTACK-8956: Remove assert(false) on opaque network and ping method on NiciraNvpApiVersion 2015-11-16 11:29:31 -08:00
nvazquez
e1d1a40325 CLOUDSTACK-8956: Deploy VM on NSX managed network changes if NSX Api Version >= 4.2: has to connect to "br-int" of "nsx.network" type 2015-11-16 11:29:30 -08:00
nvazquez
2386ae5e5a CLOUDSTACK-8956: Log NSX Api Version 2015-11-16 11:29:30 -08:00
Daan Hoogland
3d5f09357b use equals instead of comparison operators on strings 2015-11-16 18:30:36 +01:00
Daan Hoogland
9a798c537e findbugs: instead of !=, use string utils 2015-11-16 18:30:36 +01:00
Daan Hoogland
962d4b4afe CLOUDSTACK-9046 renamed enums in kvm plugin 2015-11-16 13:41:14 +00:00
Remi Bergsma
1f53f2a93e Updating pom.xml version numbers for release 4.7.0-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-15 18:54:13 +01:00
Remi Bergsma
b38c3bed0c Updating pom.xml version numbers for release 4.6.1-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-13 21:27:57 +01:00
Remi Bergsma
e31ade03c6 Updating pom.xml version numbers for release 4.6.0
Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-10 15:45:34 +01:00
Remi Bergsma
0b4cc5de87 Merge pull request #986 from wido/kvm-libvirt-unittests
Add Unit Tests for Libvirt/KVM storage codeThese classes were not covered by Unit Tests and this commit
adds some tests for their basic functionality.

* pr/986:
  Add Unit Tests for Libvirt/KVM storage code

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-02 17:53:31 +01:00
Remi Bergsma
9c90eff87f Merge pull request #1015 from DaanHoogland/pr/975
CLOUDSTACK-8964: Ovm3HypervisorGuru answer fix and snapshot to volume implementation.some clean up of code after the fix from #975

* pr/1015:
  CLOUDSTACK-8964 side effect isolation  extract side effect away to emphasize the main commandDelegation objective
  host delegation logging for XenServerGuru.java
  Getting volume from snapshot working again... odd
  simple change to prevent failure and keep OVM3 snapshots working

This closes #975

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-11-02 13:37:19 +01:00
Bharat Kumar
4849368c94 CLOUDSTACK-8852 Database shows that management server is UP when it is actually stopped from the CCP GUI
This was happening as the stop method in clusterMnanagerImpl was not getting callled. Added shutdown hooks to all sub contexts,
    this enables spring to call the stop mehtods of the beans when management server is shutting down.

Conflicts:
	framework/spring/module/src/main/java/org/apache/cloudstack/spring/module/web/CloudStackContextLoaderListener.java
2015-11-02 15:26:39 +05:30
Wido den Hollander
602231132d kvm: Add UnitTests for LibvirtUtilitiesHelper
These were lacking, but this helper is used in various places
inside the KVM code.

Some simple tests to verify the helper is doing what we expect it
to do.
2015-10-30 12:34:00 +01:00
Daan Hoogland
fc18d1e8b1 CLOUDSTACK-8964 side effect isolation
extract side effect away to emphasize the main commandDelegation
objective
2015-10-30 09:00:47 +01:00
Mike Tutkowski
7d1dc97423 CLOUDSTACK-8985: Deleted volume's removed column not updated 2015-10-27 15:04:15 -06:00
Nick Livens
645f8758df CLOUDSTACK-8832 : Update Nuage VSP plugin to work with Nuage VSP release 3.2 2015-10-27 14:56:57 +01:00
Wido den Hollander
7568f2123c Add Unit Tests for Libvirt/KVM storage code
These classes were not covered by Unit Tests and this commit
adds some tests for their basic functionality.
2015-10-27 13:21:28 +01:00
Daan Hoogland
5a134a6fe6 unit test for interface patterns in libvirt compute resource 2015-10-24 00:57:01 +02:00
Funs Kessen
c4afb76d8c host delegation logging for XenServerGuru.java 2015-10-23 20:09:06 +02:00
Daan Hoogland
f1ea27ed37 Merge branch 'pr/966' into interfacePatternCheck 2015-10-23 17:10:03 +02:00
Funs Kessen
6db4b7b0be Getting volume from snapshot working again... odd 2015-10-23 16:50:26 +02:00
Funs Kessen
66fed462b6 simple change to prevent failure and keep OVM3 snapshots working 2015-10-23 15:58:40 +02:00
David Mabry
e1a401c023 Added support for KVM teamd devices to LibvirtComputingResource.java. This will allow users to utilze teamd nic teaming devices named team*. 2015-10-22 10:19:50 -05:00
Wido den Hollander
d413b2c375 CLOUDSTACK-8879: Depend in rados-java 0.2.0
This should fix the CloudStack Agent from crashing when it has to
handle more then 16 RBD snapshots on one Volume.
2015-09-25 11:01:03 +02:00
Boris Schrijver
80cb3adad0 Added isEmpty() check to prevent nullPointerException. 2015-09-23 15:07:16 +02:00
Koushik Das
86325cbc95 Merge pull request #792 from koushik-das/CLOUDSTACK-8826
CLOUDSTACK-8826: XenServer - Use device id passed as part of attach volume API properly

If device id passed as part of API and available then use it otherwise fallback on XS to automatically assign one.
For ISO device id used is 3 and it is processed before any other entry to avoid conflict.

Signed-off-by: Koushik Das <koushik@apache.org>
2015-09-22 15:43:42 +05:30
Koushik Das
f5b9a96d24 CLOUDSTACK-8826: XenServer - Use device id passed as part of attach volume API properly
If device id passed as part of API and available then use it otherwise fallback on XS to automatically assign one.
For ISO device id used is 3 and it is processed before any other entry to avoid conflict.
2015-09-21 17:09:14 +05:30
wilderrodrigues
6e426fa46d Revert "Merge pull request #825 from borisroman/charset"
This reverts commit a44e2bff7ec0c1548d89722c40488746454adce1, reversing
changes made to 06cefaf493423c953a95ee92482a2d0a20a21095.

We are reverting the PR #825 because it breaks Master.
2015-09-15 14:58:18 +02:00
Daan Hoogland
a44e2bff7e Merge pull request #825 from borisroman/charset
Replaced all occurences of Charset.forName(UTF-8) with StringUtils.getPreferredCharset().

* pr/825:
  Replaced all occurences of Charset.forName(UTF-8) with StringUtils.getPreferredCharset().

Signed-off-by: Daan Hoogland <daan@onecht.net>
2015-09-15 13:38:18 +02:00
Boris Schrijver
71929fdedd Replaced all occurences of Charset.forName(UTF-8) with StringUtils.getPreferredCharset(). 2015-09-15 12:00:33 +02:00
Wido den Hollander
4f409a7c17 CLOUDSTACK-8645: Improve logging of RBD functionality in KVM
A simple commit which changes a couple of log lines.
2015-09-15 10:10:04 +02:00
Satoru Nakaya
e8c5ed4e3d CLOUDSTACK-8838: Allow ensX enoX enpX enxX format for nics in CentOS 7 2015-09-13 22:13:30 +09:00
Wido den Hollander
28d18dce00 Merge pull request #776 from exoscale/fix/firewall-sysctl
sysctl: don't modify /etc/sysctl.confTo configure firewall rules, CloudStack modifies `/etc/sysctl.conf` and
execute those modifications. This may be harmful for several reasons:

 1. `/etc/sysctl.conf` may be managed by some configuration management
    system. Such a system will constantly restore the previous version.

 2. `/etc/sysctl.conf` may contain additional properties that have been
    changed later by some system administrator (for example, once a
    firewall has been configured, forwarding may have been activated
    while it is disabled in `/etc/sysctl.conf`). Executing the file
    again at a later time may disrupt the system.

 3. Entries are added again and again. `/etc/sysctl.conf` will contain
    the same directives repeated several times.

Using a configuration file is not needed as `sysctl` is able to directly
modify sysctl values with `-w` flag.

Signed-off-by: Vincent Bernat <Vincent.Bernat@exoscale.ch>

* pr/776:
  sysctl: don't modify /etc/sysctl.conf

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2015-09-09 10:29:20 +02:00
Rajani Karuturi
b69a69def7 Fixing findbugs error due to PR #755 merge
issue: Boxing/unboxing to parse a primitive
2015-09-07 10:40:55 +05:30
Remi Bergsma
1077f86144 Merge pull request #766 from kmccormick/CLOUDSTACK-8678
CLOUDSTACK-8678: Reserve RAM for KVM host OSUse host.reserved.ram.mb agent property to modify total system RAM
before reporting to management server.

* pr/766:
  CLOUDSTACK-8678: Reserve RAM for KVM host OS

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-09-05 09:10:58 +02:00
Rajani Karuturi
5881035e7b Merge pull request #755 from karuturi/CLOUDSTACK-8647-2
Cloudstack:8647 LDAP Trust AD and AutoimportToday, CloudStack can automatically import LDAP users based on the configuration to a domain or an account. However, any new users in LDAP aren't automatically reflected. The admin has to manually import them again.
This feature enables admin to map LDAP group/OU to a CloudStack domain and any changes are reflected in ACS as well.
FS: https://cwiki.apache.org/confluence/display/CLOUDSTACK/WIP%3A+LDAP%3A+Trust+AD+and+Auto+Import

testcases output:
```
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running groovy.org.apache.cloudstack.ldap.NoLdapUserMatchingQueryExceptionSpec
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.216 sec - in groovy.org.apache.cloudstack.ldap.NoLdapUserMatchingQueryExceptionSpec
Running groovy.org.apache.cloudstack.ldap.LdapManagerImplSpec
log4j:WARN No appenders could be found for logger (org.apache.cloudstack.ldap.LdapManagerImpl).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
using type:
using type: null
using type: TEST
using type: TEST TEST
using name:
using name: null
using accountType: -1
using accountType: 1
using accountType: 3
using accountType: 4
using accountType: 5
using accountType: 6
using accountType: 20000
using accountType: -500000
Tests run: 29, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.387 sec - in groovy.org.apache.cloudstack.ldap.LdapManagerImplSpec
Running groovy.org.apache.cloudstack.ldap.LdapListUsersCmdSpec
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.041 sec - in groovy.org.apache.cloudstack.ldap.LdapListUsersCmdSpec
Running groovy.org.apache.cloudstack.ldap.LdapAddConfigurationCmdSpec
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.019 sec - in groovy.org.apache.cloudstack.ldap.LdapAddConfigurationCmdSpec
Running groovy.org.apache.cloudstack.ldap.LdapUserSpec
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.021 sec - in groovy.org.apache.cloudstack.ldap.LdapUserSpec
Running groovy.org.apache.cloudstack.ldap.LdapAuthenticatorSpec
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.082 sec - in groovy.org.apache.cloudstack.ldap.LdapAuthenticatorSpec
Running groovy.org.apache.cloudstack.ldap.LdapConfigurationVOSpec
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec - in groovy.org.apache.cloudstack.ldap.LdapConfigurationVOSpec
Running groovy.org.apache.cloudstack.ldap.OpenLdapUserManagerSpec
Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.094 sec - in groovy.org.apache.cloudstack.ldap.OpenLdapUserManagerSpec
Running groovy.org.apache.cloudstack.ldap.LdapDeleteConfigurationCmdSpec
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec - in groovy.org.apache.cloudstack.ldap.LdapDeleteConfigurationCmdSpec
Running groovy.org.apache.cloudstack.ldap.LdapUserResponseSpec
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec - in groovy.org.apache.cloudstack.ldap.LdapUserResponseSpec
Running groovy.org.apache.cloudstack.ldap.LdapUserManagerFactorySpec
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.027 sec - in groovy.org.apache.cloudstack.ldap.LdapUserManagerFactorySpec
Running groovy.org.apache.cloudstack.ldap.ADLdapUserManagerImplSpec
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.012 sec - in groovy.org.apache.cloudstack.ldap.ADLdapUserManagerImplSpec
Running groovy.org.apache.cloudstack.ldap.LdapCreateAccountCmdSpec
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.168 sec - in groovy.org.apache.cloudstack.ldap.LdapCreateAccountCmdSpec
Running groovy.org.apache.cloudstack.ldap.LdapImportUsersCmdSpec
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.063 sec - in groovy.org.apache.cloudstack.ldap.LdapImportUsersCmdSpec
Running groovy.org.apache.cloudstack.ldap.LinkDomainToLdapCmdSpec
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.019 sec - in groovy.org.apache.cloudstack.ldap.LinkDomainToLdapCmdSpec
Running groovy.org.apache.cloudstack.ldap.LdapSearchUserCmdSpec
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 sec - in groovy.org.apache.cloudstack.ldap.LdapSearchUserCmdSpec
Running groovy.org.apache.cloudstack.ldap.LdapListConfigurationCmdSpec
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec - in groovy.org.apache.cloudstack.ldap.LdapListConfigurationCmdSpec
Running groovy.org.apache.cloudstack.ldap.NoSuchLdapUserExceptionSpec
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec - in groovy.org.apache.cloudstack.ldap.NoSuchLdapUserExceptionSpec
Running groovy.org.apache.cloudstack.ldap.LdapConfigurationResponseSpec
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec - in groovy.org.apache.cloudstack.ldap.LdapConfigurationResponseSpec
Running groovy.org.apache.cloudstack.ldap.LdapConfigurationSpec
asserting for provider configuration: openldap
asserting for provider configuration: microsoftad
asserting for provider configuration:
asserting for provider configuration:
asserting for provider configuration: xyz
asserting for provider configuration: MicrosoftAd
asserting for provider configuration: OpenLdap
asserting for provider configuration: MicrosoftAD
Tests run: 19, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.053 sec - in groovy.org.apache.cloudstack.ldap.LdapConfigurationSpec
Running groovy.org.apache.cloudstack.ldap.LdapContextFactorySpec
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.099 sec - in groovy.org.apache.cloudstack.ldap.LdapContextFactorySpec
Running groovy.org.apache.cloudstack.ldap.LdapConfigurationDaoImplSpec
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.027 sec - in groovy.org.apache.cloudstack.ldap.LdapConfigurationDaoImplSpec
Running groovy.org.apache.cloudstack.ldap.LdapUtilsSpec
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec - in groovy.org.apache.cloudstack.ldap.LdapUtilsSpec

Results :

Tests run: 156, Failures: 0, Errors: 0, Skipped: 0
```

* pr/755:
  CLOUDSTACK-8647: linkdomaintoldap shouldnt fail when createuseraccount fails
  CLOUDSTACK-8647 removed duplicate key in create sql of ldap_trust_map
  CLOUDSTACK-8647: string formatting
  CLOUDSTACK-8647: updated with review comments
  CLOUDSTACK-8647: unittests for LdapAuthenticatorSpec
  CLOUDSTACK-8647: formatted LdapAuthenticatorSpec
  CLOUDSTACK-8647: UI for trust AD feature
  CLOUDSTACK-8647 added unittests for new methods  in ldapmanager
  CLOUDSTACK-8647 unittests for LinkDomainToLdap api command
  CLOUDSTACK-8647: fixed unittests
  CLOUDSTACK-8647 support for assigning and admin to linked ldap domain
  CLOUDSTACK-8647 added nested group enabled config in ldap
  CLOUDSTACK-8647 added account_type to the linkDomainToLdap API
  CLOUDSTACK-8647 changed the authentication flow
  CLOUDSTACK-8647 added new api linkLdapToDomain
  CLOUDSTACK-8647: added cmd and response class for the new api

Signed-off-by: Rajani Karuturi <rajani.karuturi@citrix.com>
2015-09-05 09:30:17 +05:30
Vincent Bernat
f2b8f2eade sysctl: don't modify /etc/sysctl.conf
To configure firewall rules, CloudStack modifies `/etc/sysctl.conf` and
execute those modifications. This may be harmful for several reasons:

 1. `/etc/sysctl.conf` may be managed by some configuration management
    system. Such a system will constantly restore the previous version.

 2. `/etc/sysctl.conf` may contain additional properties that have been
    changed later by some system administrator (for example, once a
    firewall has been configured, forwarding may have been activated
    while it is disabled in `/etc/sysctl.conf`). Executing the file
    again at a later time may disrupt the system.

 3. Entries are added again and again. `/etc/sysctl.conf` will contain
    the same directives repeated several times.

Using a configuration file is not needed as `sysctl` is able to directly
modify sysctl values with `-w` flag.

Signed-off-by: Vincent Bernat <Vincent.Bernat@exoscale.ch>
2015-09-04 14:31:09 +02:00
Kevin McCormick
99d20234d4 CLOUDSTACK-8678: Reserve RAM for KVM host OS
Use host.reserved.ram.mb agent property to modify total system RAM
before reporting to management server.

Remove dom0ram variable and its min/max calculation. Just reserve a
default of 1GB, unless overridden by host.reserved.mem.mb property.
2015-09-03 10:07:22 -07:00
Rajani Karuturi
53a441faf6 CLOUDSTACK-8647: linkdomaintoldap shouldnt fail when createuseraccount fails
Incase create useraccount fails with any runtime exception,
linkdomaintoldap api shouldnt fail. It just will not return the admin id
as it didnt create the account.
added test cases to verify this as well.
2015-09-03 18:05:50 +05:30
Rohit Yadav
dd9ba48efa Merge pull request #753 from shapeblue/master-CLOUDSTACK-8762
CLOUDSTACK-8762: Check to confirm disk activity before starting a VMImplements a VM volume/disk file activity checker that checks if QCOW2 file
has been changed before starting the VM. This is useful as a pessimistic
approach to save VMs that were running on faulty hosts that CloudStack could
try to launch on other hosts while the host was not cleanly fenced. This is
optional and available only if you enable the settings in agent.properties
file, on per-host basis.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* pr/753:
  CLOUDSTACK-8762: Check to confirm disk activity before starting a VM

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-09-02 14:55:54 +05:30
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
Rajani Karuturi
26fea34d16 CLOUDSTACK-8647: string formatting 2015-09-01 14:29:40 +05:30
Rajani Karuturi
ca8b37535a CLOUDSTACK-8647: updated with review comments
made domainId compulsory in api LinkDomainToLdapCmd
used accountServive from BaseCmd in LinkDomainToLdapCmd
changed the allowed account type values to 0 and 2
2015-09-01 10:44:30 +05:30
Mike Tutkowski
c5a0d5e01c Support live migration on older version of Libvirt 2015-08-31 22:06:51 -06:00