25389 Commits

Author SHA1 Message Date
Rohit Yadav
031d7a9c43 CLOUDSTACK-8402: Depend on openjdk 1.7 for both CentOS 6 and 7
This commit forces rpms to depend on java-1.7.0-openjdk which is available
on both CentOS 6 and CentOS 7, also the version that ACS 4.5 supports.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-29 16:50:40 +02:00
Koushik Das
795f3814f6 CLOUDSTACK-8426: Use a separate thread pool for VR reboot in case of out-of-band movement
Using a cached thread pool for VR reboot task

(cherry picked from commit 1a719afb516164915b973f548c37814b448f0349)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-29 16:50:40 +02:00
Koushik Das
6378d37c5e CLOUDSTACK-8425: Job framework: Same internal job can execute simultaneously
The same internal job was simultaneously getting executed by 2 worked threads.
The fix is to ensure that job gets scheduled for execution from a single place.

(cherry picked from commit 6dfb8ab03ed05747941a89b4079ff23d25f4d8fd)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-29 16:50:40 +02:00
Likitha Shetty
27b7e49b39 CLOUDSTACK-8412. VM migration with storage fails.
Update MigrateWithStorageCommand to avoid JSON deserialization error.

(cherry picked from commit 04365601dac6d4dfa396e5c86ab7e698906dfb44)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-29 16:50:40 +02:00
Likitha Shetty
6c649ce3ae CLOUDSTACK-8411. Unable to delete an uploaded volume after CCP fails to attach the volume to a VM.
Correctly update the status of an uploaded volume upon failure to attach it to a VM.

(cherry picked from commit 10a106f5d86a7f6786b94a7298a5c63c32eab66b)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-29 16:50:40 +02:00
Likitha Shetty
e1db982d6b CLOUDSTACK-8410. ESXi host stuck disconnects frequently.
During ping task, while scanning and updating status of all VMs on the host that are stuck in a transitional state
and are missing from the power report, do so only for VMs that are not removed.

(cherry picked from commit de7173a0ed6434d1809d0471fe8f28bd339f208e)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-29 16:50:40 +02:00
Remi Bergsma
f8b7251b88 return a state instead of null
When a full cluster is down or unreachable,
CloudStack currently reports everything the
same as the last known state, which is usually
Up. When it cannot reach a host and cannot
reach another host in the same cluster either,
it returns null and says "I don't know". This
prevents it from reporting the problem. Now,
we return an Alert or Disconnected state so
proper action can be taken.

Also logging was added, so we know what part
of the code put it to Alert or Disconnected.
2015-04-29 15:05:02 +02:00
Rohit Yadav
e02d787f30 kvm: add VMXNET3 nic adapter to nic models
Linux kernel supports vmxnet3, allowing it in KVM plugin would allow us to
run ESX hosts on KVM hosts using CloudStack with vmxnet3 nic which can be
passed as VM's nicAdapter detail

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-28 18:09:29 +02:00
Abhinandan Prateek
9ccfc381e5 adding simulator test to increase coverage 2015-04-28 17:02:02 +05:30
Rohit Yadav
ea7fd37783 CLOUDSTACK-8424: Add cpu features if guest.cpu.features is set
This improvements checks for "guest.cpu.features" property which is a space
separated list of cpu features that is specific for a host. When added, it
will add  <feature policy='require' name='{{feature-you-listed}}'/> in the
<cpu> section of the generated vm spec xml.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-28 13:16:04 +02:00
Santhosh Edukulla
86943da26e Fixed few coverity issues
Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
(cherry picked from commit 0a9742f91462867cc9d5f9321a13a73483fcf149)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-27 14:43:48 +02:00
Likitha Shetty
db379bf0e8 CLOUDSTACK-8405: Restore VM results in deletion of data disk.
Dont evict template when a delete command has been sent to VMware resource for deletion of volume.

(cherry picked from commit f45e6b94edf3af1feaf4613daf292e5bb8ba7758)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-27 14:29:37 +02:00
Abhinandan Prateek
681d8c0518 adding more simulator based tests to travis 2015-04-27 13:56:54 +05:30
Milamber
445bc36ed9 Update L10N resource files on 4.5 branch (with 4.5 translation strings from Transifex) 2015-04-25 23:30:29 +02:00
Milamber
a95d4e1d6d Fix some typos. Thanks Atalanttore (from Transifex) 2015-04-25 23:18:10 +02:00
Rohit Yadav
3925512115 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>
2015-04-25 03:02:10 +02:00
Rohit Yadav
d66677101c 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>
2015-04-25 02:58:12 +02:00
Ilia Shakitko
50dd37fcc9 GetUsageRecordsCmd - NewInputFormat for START_DATE and END_DATE (with time; backward capabile)
This closes #191

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-25 02:49:21 +02:00
Laszlo Hornyak
cc900bfa22 CLOUDSTACK-8335: removed libvirt.org repository
The only artifact resolved from libvirt.org was org.libvirt:libvirt:0.5.1
this artifact is now available from maven's default central repository

This closes #180

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 9cf31b07144302d053192265f9dfb731a2daefe9)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-24 17:00:10 +02:00
Rohit Yadav
3e8b12bbb1 CLOUDSTACK-8399: Allow changing hvm flag in updateTemplate API
This allows changing the hvm flag for a template after the template has been
registered.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-23 15:27:43 +02:00
Rohit Yadav
d91d161107 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

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-23 14:08:17 +02:00
Rohit Yadav
f26ae6eb39 CLOUDSTACK-7493: ignore errors on removal of iptables chains that don't exist
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-23 14:04:32 +02:00
Rohit Yadav
5cba410937 vpn_l2tp: fix variable assignment, fails L2TP VPN
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-23 14:04:32 +02:00
Rohit Yadav
c71339569d RemoteAccessVpn: fix regression preshared key is not sent to UI/clients
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-23 14:04:32 +02:00
Rohit Yadav
64ab3554a1 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.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-21 17:33:18 +02:00
Rohit Yadav
f4cbc4c010 xenserver: remove unwanted vmops.orig file (created during a past merge)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-21 12:58:39 +02:00
Milamber
6a7a9caf62 Fix some typo
Thanks Atalanttore from Transifex way
2015-04-19 15:18:53 +01:00
Milamber
376b27a430 Update L10N resource files on 4.5 branch (with 4.5 translation strings from Transifex) 2015-04-19 10:09:12 +01:00
Milamber
208a5655be Closed typo issue (from Transifex by Atalanttore)
No blank space between "Duration" and "(in sec)"
2015-04-19 09:00:12 +01:00
Likitha Shetty
48c1ffd740 CLOUDSTACK-8108. vCenter admin name is logged in clear text.
Revert back to TRACE logging while retrieving and recycling VMware context from the context pool.

(cherry picked from commit 0f224c858fd3612c66632ba3476bfc3f1f71e1df)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-17 15:58:30 +02:00
Likitha Shetty
8aabab8a56 CLOUDSTACK-8119. [VMware] Cannot attach more than 8 volumes to a VM.
(cherry picked from commit b1bca2a2c02d0f0f5e3435fe2587334ae107495d)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-17 15:54:03 +02:00
Likitha Shetty
4708a0b40d CLOUDSTACK-8119. [VMware] Cannot attach more than 8 volumes to a VM.
While attaching a new disk to an instance, the unit number on the controller key should be the lowest unit number
that is not in use. And in case the controller type is SCSI it shouln't be the reserved SCSI unit number.

(cherry picked from commit f420dd55fb5c4ec40aec0232618b2162c6d2f88c)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-17 15:48:48 +02:00
Likitha Shetty
326bb3e0a4 CLOUDSTACK-8320. Upon a failed migration, a dummy volume is created which remains in 'Expunging' state.
Set destination volume path as NULL while duplicating volume during migration.
If migration fails, destination volume will be marked as removed. And if migration succeeds, volume path will be rightly updated.

(cherry picked from commit d30d5644bb59898ac60884280bd0767bf429ede8)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-17 15:42:02 +02:00
Likitha Shetty
55f2e45d14 CLOUDSTACK-8319. For both 'MigrateVolume' and 'MigrateVMWithVolumes, ensure VM's vconfiguration files are migrated along with VM's root volume.
(cherry picked from commit bdd28a45ed1cc8046c63d0e840e54975e5b74ab5)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-17 15:42:02 +02:00
Likitha Shetty
89dbd1ea1b CLOUDSTACK-8318. Storage vMotion support for VMFS.
MigrateVMWithVolumes-
1. If ESXi host version is below 5.1, ensure destination datastore(s) is mounted on the source host, then migrate the storage and then finally migrate the VM.
If destination storage(s) is not mounted on the source host,
- In case of NFS storage mount the storage(s).
- In case of VMFS storage fail the request for migration.
2. If EXi host version is 5.1 or above, simultaneously migrate the VM and its storage to the destination host and storage(s) respectively for both NFS and VMFS storage.

(cherry picked from commit adc836cc5eadb0b05aefa6fcdcf8c03841282609)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-17 15:39:14 +02:00
Likitha Shetty
9565ad2f9c CLOUDSTACK-8134. Worker VMs don't have MS id set in vCenter annotation 'cloud.vm.workertag'.
Correctly register node info for a newly created VMware context.

(cherry picked from commit 13bdc1cef4ee0fae2f263777317c170302c49689)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-17 15:34:43 +02:00
Remi Bergsma
9a8ee5664f CLOUDSTACK-6543 Sort domain lists in UI
As recently discussed on the dev list:
This sorts the domain lists based on their path.
Especially handy when having a lot of domains,
like in a public cloud.

Cherry-picked to 4.5 branch since commit exists in 4.4 and master branch.

(cherry picked from commit befa28251d0e250f07c52a9a2cd4441cc8bd86d8)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-17 15:18:16 +02:00
Rohit Yadav
c9fd57fff3 kvm: fallback to eu.ceph.com mvn repo as ceph.com is down
As suggested by Wido on the dev ML changing the repo to eu.ceph.com to avoid
build failures. Will revert if ceph.com is up again.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-16 17:28:20 +05:30
Rohit Yadav
24435dd6bc server: NPE checks and improved case checking
- pool allocation checks for both root and data disks
- NPE checks to not add null object in collection or try to migrate null VM
- HA work tries need to increment and be given up when max retries are crossed
- VM creation should check IP address format for IPv4 and IPv6
- If userdata is not supported by a network, then fail early if userdata, ssh key,
  or password enabled template is passed/used

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-16 17:28:20 +05:30
Rohit Yadav
752d784d92 vmware: support vmfs as local storage pool type
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-16 17:10:43 +05:30
MS
b34202a84e CLOUDSTACK-8387 - Close mgmt server peer socket on failure, without relying on autoclose 2015-04-15 09:50:32 -07:00
MS
fde2615c33 CLOUDSTACK-8387 - Close mgmt server peer socket on failure, without relying on autoclose 2015-04-15 08:43:37 -07:00
MS
cb7bcf23fe CLOUDSTACK-8387 - Don't autoclose new mgmt server peer connections as soon as they open 2015-04-15 08:18:24 -07:00
Wido den Hollander
940622c32f CLOUDSTACK-8313: Allow overprovisioning of local storage pools
(cherry picked from commit 9836ccdcf3b339718676847c1cfaee80cbffc1ca)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-15 11:47:34 +05:30
Remi Bergsma
43def30b60 kvm: improve CentOS 7 support
CentOS 7 does not ship with ifconfig anymore. We should use ip commands instead.
This also works on older versions, like CentOS 6 and Ubuntu 12.x/14.x, that we
support.

(cherry picked from commit ac06ec02eb442a4cc218b21e95f8d9a2a9ccb446)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Conflicts:
	plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/IvsVifDriver.java
2015-04-15 11:47:34 +05:30
Rohit Yadav
65a91c5bff packaging: add net-tools dependency on kvm agent
net-tools packages installs ifconfig on centos systems that don't have it
like centos7.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-14 16:46:22 +05:30
Rohit Yadav
d361bf6847 server: ignore params signatureversion and expires when validating API args
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-14 15:32:16 +05:30
Remi Bergsma
cb43f25446 disable foreign key checks when altering them
Upgrades from 4.4 where not working properly due to errors like this:
ERROR 1833 (HY000): Cannot change column 'id': used in a foreign key constraint 'fk_global_load_balancing_rules_region_id' of table 'cloud.global_load_balancing_rules'

The disabling of the checks is for the current session only, so it's safe.

In the 4.4 branch, this file used to be at:
client/target/utilities/scripts/db/db/schema-442to450.sql

It's now moved. We need to edit it in 4.4 and 4.5 to have it effective.

This closes #164

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 8f4abbc7bd65e7a7cad67ba64b29d745aa0869c0)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-14 14:53:12 +05:30
Rene Moser
5f154b91ba CreateVMSnapshot: fix typo in API description
This closes #161

(cherry picked from commit 4a424500f3689b3fddc21750cb841239107b2a46)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-14 00:59:49 +05:30
Rene Moser
78f4acd9d5 CLOUDSTACK-6885: fix logrotate on VR to depend on size
In 6ac06e5e5e3ceed4a3e3a86ea5f82ffb59c266f2 logrotate was changed to run hourly.
Some logrotate configs still have set `daily` only which results in logs not
rotated hourly. The only way to ensure the log is rotated is to use size.

This closes #162

(cherry picked from commit 0ada08aa85b305ef931298654f7b41a7db28b03b)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-04-14 00:51:38 +05:30