CLOUDSTACK-6007. Restore VM command fails with NPE.
If a VM instance is deployed with startVm=false, then calling restoreVm on the instance fails with NPE because CS tries to expunge a volume that has not been created in primary store.
(cherry picked from commit 92abb9439e7a4f18d79e2a48e72a0ee94d84f477)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
CLOUDSTACK-6018: Increase dnsmasq dhcp-lease-max to 2100

Would able to accomodate one /21 network then.
(cherry picked from commit 50234ea72b29b3e192a3d80b8cb8d69e4309d141)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
CLOUDSTACK-6019:CreateVolume from snapshot in NFS is throwing Warning
"sync snapshot from cache to region wide store failed for image store
test".
(cherry picked from commit b11c13d4a120a6361231ee415082576dac6fe385)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
CLOUDSTACK-6025:CreateTemplate from snapshot in NFS is failing , after
migarting to S3 datastore.(cherry picked from commit a3caea7e0aca15c74362bbe8469070228177c96f)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
CLOUDSTACK-6027:CreateVolume from snapshot is failing with S3 on Vmware.
(cherry picked from commit d7ec9ca815609d95c29b9db09ee1720bc7df4816)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
CLOUDSTACK-6026: UI > create network offering > pass serviceofferingid parameter instead of systemOfferingForRouter parameter to API.
(cherry picked from commit e7ec79b5f34f9f5cbe06653ec1948c7064c5b784)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
stratosphere-ssp plugin: Fix HttpClient4 connection leak

Replaced HttpClient#execute(HttpUriRequest) with
HttpClient#execute(HttpUriRequest,ResponseHandler<T>).
The former requires extra EntityUtils#consume(HttpEntity).
(cherry picked from commit 09e27fd7bf92a7ff723e36c8ca485e54ee00e8c7)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
CLOUDSTACK-5967: GRE tunnel creation is failing

after network orchestrator refactor, only network elements providingg
services as defined by network offering, are invloved network design and
imlement phase. So OVS network element need to be enables as
'Connectivity' service provider to make GRE tunnels work. This fix
introduced 'Ovs' provider as Connectivity service provider.
(cherry picked from commit 2e004878b1da0f7fb5ec12e77babbb626e96c1ef)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
Fixed agent code to handle untagged public vlan while parsing the vlan id
(cherry picked from commit 7df148c762510f669b60edff9d8d690c800b1f95)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
CLOUDSTACK-6031: UI > infrastructure > count > pass listAll=true to all listXXXXXXX API for counting resource.
(cherry picked from commit e0dfe0ab15ee71c2cdf8fe7cce46b73258120a8e)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
CLOUDSTACK-6030: Encrypt the primary and secondary smb storage password when it is stored in the db.
(cherry picked from commit 96d8e3c945b24af4d27429c4bd62b459e807e2a1)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
CLOUDSTACK-6053: While adding a primary or secondary of type smb the password wasn't
encoded. This cause createStoragePool or addImageStore command to fail if special
characters were present. Updated the code to pass user, password and domain as part
of details while adding primary or secondary. Also made changes on server side to
handle it.
(cherry picked from commit f0b861fedeea9e752665a42231f910112c5b8b46)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
CLOUDSTACK-6001: Fixed hyperv vm console not working for 3 minutes after migration.
(cherry picked from commit fb87c85b2a313d75af7cd4b790118fea30a2dd1b)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
CLOUDSTACK-5953: In hypervisor_capabilities, max_guests_limit are
not correct for XS 6.2 or other specific version hypervisor.
(cherry picked from commit bba6b77177a6404f1d27f7adc278b46fe00759f0)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
CLOUDSTACK-6040: Updated the ip addr validation in create port forwarding
(cherry picked from commit 7a71cf33ce103392914ac51cd4689a6f5a340d0a)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
CLOUDSTACK-6046:CreateVolume from snapshot is failing with S3 as
secondary storage and zone-wide primary storage.(cherry picked from commit 900c51103ab1e29b86ea5f76cb73c72b3de51db7)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
CLOUDSTACK-6049: Give priority to cache stores where data object is
already there instead of randomly picking one in case there are multiple
cache stores in the scope.(cherry picked from commit e00241f41d6542cf1c5d93216fed55609cd7746a)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
CLOUDSTACK-6023: Non windows instances are created on XenServer with a vcpu-max above supported xenserver limits

Changed the VCPU max limit to 16 and provided a cluster level configuration parameter for this max limit named xen.vm.vcpu.max
(cherry picked from commit 95e41fdf0da50c165a9317847058fce4efeddbcf)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>
Added Fix for CLOUDSTACK-5875

Added fix for exception and listing. Mentioned details under bug.
Post the fix, simulator works fine.

Signed-off-by: Santhosh Edukulla <Santhosh.Edukulla@citrix.com>
Signed-off-by: Koushik Das <koushik@apache.org>
(cherry picked from commit d31fa09c7e5bb04fcc4594c0352d9b91171e9d1a)

Signed-off-by: Animesh Chaturvedi <animesh@apache.org>