30058 Commits

Author SHA1 Message Date
John Burwell
c66cf1c60d Merge release branch 4.9 to master
* 4.9:
  CLOUDSTACK-9502: DS template copies don’t get deleted in VMware ESXi with multiple clusters and zone wide storage
2016-11-16 23:23:09 -05:00
John Burwell
20b43767d7 Merge pull request #1676 from nvazquez/dstemplates49
CLOUDSTACK-9502: DS template copies dont get deleted in VMware ESXi with multiple clusters and zone wide storage (include CLOUDSTACK-9386 into 4.9 release branch)Include #1560 into 4.9 release branch

* pr/1676:
  CLOUDSTACK-9502: DS template copies don’t get deleted in VMware ESXi with multiple clusters and zone wide storage

Signed-off-by: John Burwell <meaux@cockamamy.net>
2016-11-16 22:15:50 -05:00
John Burwell
becec33c2e Merge release branch 4.9 to master
* 4.9:
  CLOUDSTACK-8830: Fix for vm snapshots in Vmware, could not create vm snapshot until 12 minutes after vm creation due to vCenter sent null name on snpashot recent task
2016-11-16 09:45:46 -05:00
John Burwell
74639b305f Merge pull request #1677 from nvazquez/vmsnapshot12min
CLOUDSTACK-8830 - [Vmware] VM snapshot fails for 12 min after instance creation (Targeted for 4.9)Continuing work by @maneesha-p in #798

This closes #798

* pr/1677:
  CLOUDSTACK-8830: Fix for vm snapshots in Vmware, could not create vm snapshot until 12 minutes after vm creation due to vCenter sent null name on snpashot recent task

Signed-off-by: John Burwell <meaux@cockamamy.net>
2016-11-16 09:43:54 -05:00
Rajani Karuturi
363896571b Merge pull request #1578 from nlivens/nuage_vsp_internal_dns
CLOUDSTACK-9401 : Support for Internal DNS in Nuage VSP pluginSupporting Internal Dns by using Dns service provider as Virtual Router but Dhcp provider will be NuageVsp. The idea is here is to keep using Internal Dns service of cloudstack when network provider is some other vendor.

A sample network offering will be like below one:-
Service Provider
DHCP NuageVsp
DNS VirtualRouter/VpcVirtualRouter
UserData VirtualRouter/VpcVirtualRouter
Virtual Networking NuageVsp
SourceNat NuageVsp
StaticNat NuageVsp
NetworkAcl/Firewall NuageVsp

* pr/1578:
  CLOUDSTACK-9401 : Marvin tests for Internal DNS verification with NuageVsp
  CLOUDSTACK-9401 : Support for Internal DNS in Nuage VSP plugin

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2016-11-16 11:04:02 +05:30
Prashanth Manthena
a97d54f306 CLOUDSTACK-9401 : Marvin tests for Internal DNS verification with NuageVsp 2016-11-15 16:53:11 +01:00
Eric Waegeman
4e6c7e179a CLOUDSTACK-9401 : Support for Internal DNS in Nuage VSP plugin 2016-11-14 14:39:48 +01:00
Rohit Yadav
3fa461693c
Merge branch '4.9' 2016-11-09 14:54:20 +05:30
Rohit Yadav
cda19b77f7
Merge pull request #1751 from shapeblue/4.9-centos7agentsystemdfix
systemd: Fix semicolon missing in b75e69While forward merging PR #1728, and resolving merge issues a semi-colon was
not added causing cloudstack-agent to fail to start. This fixes the
issue of running agent on centos7.

Since, this is failing testing against centos7/kvm and an urgent merge is necessary. This affects both 4.9 and master branches.

* pr/1751:
  systemd: Fix semicolon missing in b75e69

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-09 14:53:43 +05:30
Rohit Yadav
cf825eb044 systemd: Fix semicolon missing in b75e69
While forward merging PR #1728, and resolving merge issues a semi-colon was
not added causing cloudstack-agent to fail to start. This fixes the
issue of running agent on centos7.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-09 14:44:01 +05:30
Rohit Yadav
96a2602148
Merge branch '4.9' 2016-11-09 12:22:53 +05:30
Rohit Yadav
8b786d1fb2
Merge pull request #1743 from wido/CLOUDSTACK-8326
CLOUDSTACK-8326: Always fill UDP checksums in DHCP replies in VRIn some cases the UDP checksums in packets from DHCP servers are
incorrect. This is a problem for some DHCP clients that ignore
packets with bad checksums. This patch inserts an iptables rule
to ensure DHCP servers always send packets with correct checksums.

Due to this bug DHCP offers are sometimes not accepted by Instances.

The end-result without this fix is no connectivity for the Instance
due to the lack of a IPv4 address.

Signed-off-by: Wido den Hollander <wido@widodh.nl>

* pr/1743:
  CLOUDSTACK-8326: Always fill UDP checksums in DHCP replies in VR

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-09 12:18:03 +05:30
Wido den Hollander
fa56d0b3e6
CLOUDSTACK-8326: Always fill UDP checksums in DHCP replies in VR
In some cases the UDP checksums in packets from DHCP servers are
incorrect. This is a problem for some DHCP clients that ignore
packets with bad checksums. This patch inserts an iptables rule
to ensure DHCP servers always send packets with correct checksums.

Due to this bug DHCP offers are sometimes not accepted by Instances.

The end-result without this fix is no connectivity for the Instance
due to the lack of a IPv4 address.

This is also commited in OpenStack:
- https://github.com/projectcalico/felix/issues/40
- https://review.openstack.org/148718
- https://bugzilla.redhat.com/show_bug.cgi?id=910619

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2016-11-08 18:41:37 +01:00
Rohit Yadav
495f7bb1f5
Merge branch '4.9' 2016-11-08 15:21:00 +05:30
Rohit Yadav
c09fc27255
Merge branch '4.8' into 4.9 2016-11-08 15:20:45 +05:30
Rohit Yadav
b704cefc1f
Merge branch '4.7' into 4.8 2016-11-08 15:20:07 +05:30
Rohit Yadav
0279ac20e4 Merge pull request #1744 from greenqloud/4.7
CLOUDSTACK-9183: bash: /opt/cloud/bin/getRouterAlerts.sh: No such file or directory

* pr/1744:
  CLOUDSTACK-9183: bash: /opt/cloud/bin/getRouterAlerts.sh: No such file or directory

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-08 15:19:28 +05:30
Rohit Yadav
4845b0a5e7
Merge branch '4.9' 2016-11-08 15:04:20 +05:30
Rohit Yadav
6f609e6946
Merge pull request #1713 from wido/CLOUDSTACK-9552
CLOUDSTACK-9552: Allow egress TCP/53 implicitly in Basic NetworkingAllow DNS queries over TCP when egress filtering is configured.

When using DNSSEC more and more queries are done over TCP and this
requires 53/TCP to be allowed.

Signed-off-by: Wido den Hollander wido@widodh.nl

* pr/1713:
  CLOUDSTACK-9552: Allow egress TCP/53 implicitly in Basic Networking

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-08 15:01:51 +05:30
Rajani Karuturi
5511065fc2 Merge release branch 4.9 to master
* 4.9:
  SSVM downloader now handles redirects properly.
2016-11-04 16:41:59 +05:30
Rajani Karuturi
f19a1631a5 Merge pull request #1746 from greenqloud/pr-iso-follow-redirects-4.9
SSVM downloader now handles redirects properly.New version of #1607, opened against 4.9 so it can be forward merged.

**Original Description**
Previously it was using the HttpClient to make an initial request to an ISO. This would follow redirects. Then it would make another request using built-in Java URL and InputStream, which doesn't follow redirects. This results in the ISO getting stuck at 0% forever and also causing DOS effects.

* pr/1746:
  SSVM downloader now handles redirects properly.

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2016-11-04 16:41:38 +05:30
Rohit Yadav
cdb4945205
Merge branch '4.9' 2016-11-03 16:57:45 +05:30
Rohit Yadav
240f44392c
Merge branch '4.8' into 4.9 2016-11-03 16:55:47 +05:30
Rohit Yadav
c0a6fc2bfb
Merge pull request #1714 from yvsubhash/CLOUDSTACK-9553
CLOUDSTACK-9553 Usage event is not getting recorded for snapshots in a specific scenario

* pr/1714:
  CLOUDSTACK-9553 Usage event is not getting recorded for snapshots in a specific scenario

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-03 16:55:21 +05:30
Rohit Yadav
41c71576c0
Merge branch '4.9' 2016-11-03 16:52:34 +05:30
Rohit Yadav
e2e5cdb74f
Merge branch '4.8' into 4.9 2016-11-03 16:52:08 +05:30
Rohit Yadav
41ed00a8ca Merge pull request #1715 from yvsubhash/CLOUDSTACK-9554
CLOUDSTACK-9554 Juniper Contrail plug-in is publishing events to wronJuniper Contrail plug-in is publishing events to message bus instead of event bus

* pr/1715:
  CLOUDSTACK-9554 Juniper Contrail plug-in is publishing events to wrong message bus

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-03 16:50:16 +05:30
Rohit Yadav
b59db0dc06 Merge pull request #1705 from nemo9cby/CLOUDSTACK-9465
Made the changes to improve logging.CLOUSTACK-9465 Several log refactoring/improvement suggestions.

There are two scenarios of logging which needs refactoring/improvement:

Method invocation replaced by variable

This means that in the logging code, the method invocation is pre-defined as a variable. for simplicity,          the method invocation should be replaced by the variable.

Delete variable which must be null

The variable in the logging code is null, there is no need to put the variable there.

* pr/1705:
  Made the changes to improve logging.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-03 16:48:21 +05:30
Rohit Yadav
96213f9096
Merge branch '4.9' 2016-11-03 09:14:59 +05:30
Rohit Yadav
25b6990e22
server: Fix build regression caused by 32a39
A constructor signature has changed between 4.8 and 4.9+ branches which caused
failure in a unit test introduced by PR #1694. This fixes the unit test by
passing null as the additional parameter (the test does not need instantiated
object).

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-03 09:14:35 +05:30
Rohit Yadav
0a2798c6be
Merge branch '4.9' 2016-11-02 23:12:28 +05:30
Rohit Yadav
b75e695815
Merge pull request #1728 from shapeblue/4.9_9551
CLOUDSTACK-9551: Move java tmp dir to cloudstack-agent's path to avoidMove java tmp dir to cloudstack-agent's path to avoid noexec on /tmp

* pr/1728:
  CLOUDSTACK-9551: Move java tmp dir to cloudstack-agent's path to avoid noexec on /tmp

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-02 23:10:39 +05:30
Rohit Yadav
19951346ad
Merge branch '4.8' into 4.9 2016-11-02 23:03:31 +05:30
Rohit Yadav
68f22e2a43
Merge pull request #1694 from shapeblue/kvm-no-storage-failfast
CLOUDSTACK-9509: Host Connects Without StorageKVM hosts on shared storage failure was accepted by mgmt server with the
host state as Up, even though there was no primary/shared storage available on
it. This patch offers a quick fix by throwing an exception in the storage monitor
which connects storage pool on host. The failure is trapped by agent manager
that disconnects the agent without any investigation.

Based on Lab tests, KVM agent may take upto 2 minutes to attempt NFS mount when
the storage is inaccessible (firewalled, or shutdown) before returning back with
an error. It is safe to assume that this won't add pressure on mgmt server due to
several reconnection attempts, and KVM agent would retry reconnection every 2
minutes.

For such KVM hosts, where failure happens due to storage issues; they will be
briefly put in Alert state but will be mostly be in Connecting state during which
the KVM host attempts to mount/reconfigure NFS storage pool.

/cc @jburwell @karuturi
@blueorangutan package

* pr/1694:
  CLOUDSTACK-9509: Host Connects Without Storage

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-02 22:57:51 +05:30
Rajani Karuturi
f7733b4a0e Merge pull request #1600 from syed/snapshot-archive-pr
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) `Primary`: The standard operation for managed storage is to
keep the snapshot on the device (primary). For non-managed storage, this will
give an error as this option is only supported for managed storage

2) `Secondary`: 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.
```

* pr/1600:
  Support Backup of Snapshots for Managed Storage

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2016-11-02 14:43:43 +05:30
Rohit Yadav
f71aadb80e
Merge pull request #1732 from mike-tutkowski/use_sf_sdk_for_java
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-01 21:40:48 +05:30
jeff
7a4220f172 SSVM downloader now handles redirects properly.
Previously it was using the HttpClient to make an initial request
to an ISO. This would follow redirects. Then it would make
another request using built-in Java URL and InputStream, which
doesn't follow redirects. This results in the ISO getting stuck
at 0% forever and also causing DOS effects.
2016-11-01 10:48:53 +00:00
Rohit Yadav
8339fa0809
Merge branch '4.9' 2016-11-01 14:07:56 +05:30
Rohit Yadav
305400b7b9
Merge branch '4.8' into 4.9 2016-11-01 14:05:43 +05:30
Rohit Yadav
84e282596e Merge pull request #1701 from shapeblue/vr-destroy-ui-allow
CLOUDSTACK-9534: Allow VR to be destroy in UI when in running stateThis allows us to destroy a VR that is in running state from the UI. This action is possible via cloudmonkey/APIs, and would be useful for anyone who wants to simply destroy a VR from the UI without having to stop it first.

As this is a pure UI fix, manual testing would be needed but no regression integration testing is necessary.
/cc @jburwell @karuturi

@blueorangutan package

Screenshot:

![screenshot from 2016-10-05 18-25-49](https://cloud.githubusercontent.com/assets/95203/19113882/398e8a8e-8b29-11e6-8e99-8f28def2e527.png)

* pr/1701:
  CLOUDSTACK-9534: Allow VR to be destroy in UI when in running state

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-01 14:04:58 +05:30
Rohit Yadav
2c436a4f1e Merge pull request #1712 from shapeblue/metrics-view-context-filtering
CLOUDSTACK-9550: Use context to filter items in a metrics viewUse available context to filter a metrics view based on zone, cluster, host
in the context object. This fixes metrics view filtering when metrics view is
viewed via Zone->Compute and Storage-> for a resource.

/cc @jburwell @karuturi -- this is a pure UI fix, one manual test LGTM would be required.

* pr/1712:
  CLOUDSTACK-9550: Use context to filter items in a metrics view

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-11-01 14:02:55 +05:30
Ólafur Stefán Arnarsson
420d06f4d3 CLOUDSTACK-9183: bash: /opt/cloud/bin/getRouterAlerts.sh: No such file or directory 2016-10-31 21:44:15 +00:00
Mike Tutkowski
3475ef29f0 Making use of the new SolidFire SDK for Java 2016-10-31 08:09:39 -06:00
Wido den Hollander
8ea75f1a85
CLOUDSTACK-9552: Allow egress TCP/53 implicitly in Basic Networking
Allow DNS queries over TCP when egress filtering is configured.

When using DNSSEC more and more queries are done over TCP and this
requires 53/TCP to be allowed.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2016-10-31 09:57:25 +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
Marc-Aurèle Brothier
0f89a8939f CLOUDSTACK-9544: Check access on account trying to generate user API keys
This fixes CVE-2016-6813

Signed-off-by: Marc-Aurèle Brothier <m@brothier.org>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit 158497d68a92ab1e1f864a77371ea1de5c4dc5bb)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-10-28 11:45:38 +05:30
Rohit Yadav
054a7178e0 Merge branch '4.9' 2016-10-28 11:44:01 +05:30
Rohit Yadav
fcee71f35b Merge branch '4.8' into 4.9 2016-10-28 11:43:16 +05:30
Rohit Yadav
ec1d1e50c5 Merge pull request #1742 from shapeblue/cve-2016-6813
CLOUDSTACK-9544: Check access on account trying to generate user API keysThis is to merge Marc's fix on 4.8+ branches.

Tests run:
$ nosetests --with-xunit --xunit-file=test-results.xml --with-marvin --marvin-config=../marvin-cfgs/adv-kvm.cfg  -s -a tags=role --zone=Sandbox-simulator --hypervisor=Simulator  test/integration/component/test_accounts.py

==== Marvin Init Started ====

=== Marvin Parse Config Successful ===

=== Marvin Setting TestData Successful===

==== Log Folder Path: /tmp//MarvinLogs//Oct_27_2016_22_44_32_GVC833. All logs will be available here ====

=== Marvin Init Logging Successful===

==== Marvin Init Successful ====
=== TestName: test_user_cannot_renew_other_keys | Status : SUCCESS ===

=== TestName: test_user_key_renew_same_account | Status : SUCCESS ===

=== TestName: test_updateAdminDetails | Status : SUCCESS ===

=== TestName: test_updateDomainAdminDetails | Status : SUCCESS ===

=== TestName: test_updateUserDetails | Status : SUCCESS ===

===final results are now copied to: /tmp//MarvinLogs/test_accounts_90CDC2===

* pr/1742:
  CLOUDSTACK-9544: Check access on account trying to generate user API keys

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-10-28 11:31:25 +05:30
Marc-Aurèle Brothier
158497d68a CLOUDSTACK-9544: Check access on account trying to generate user API keys
This fixes CVE-2016-6813

Signed-off-by: Marc-Aurèle Brothier <m@brothier.org>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-10-27 22:15:49 +05:30