30287 Commits

Author SHA1 Message Date
Rajani Karuturi
7233ac37cd Merge pull request #977 from ustcweizhou/vm-snapshot
[4.10] CLOUDSTACK-8746: VM Snapshotting implementation for KVM

* pr/977:
  Fixes for testing VM Snapshots on KVM. Related to PR 977
  CLOUDSTACK-8746: vm snapshot implementation for KVM

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-01-31 05:58:56 +05:30
Rajani Karuturi
f10c8bfe0c Merge pull request #1700 from wido/ipv6-basic-networking
CLOUDSTACK-9359: IPv6 for Basic NetworkingThis PR is a proposal for adding very basic IPv6 to Basic Networking. The main goal of this PR is that the API returns a valid IPv6 address over which the Instance is reachable.

The GUI will show the IPv6 address after deployment of the Instance.

![screenshot from 2016-10-03 16 34 56](https://cloud.githubusercontent.com/assets/326786/19070024/b06d2de6-8a29-11e6-8fe7-4902e2801ada.png)

If the table VLAN has a proper IPv6 CIDR configured the DirectPodBasedNetworkGuru will calculate the IPv6 Address the Instance will obtain using EUI-64 and SLAAC: https://tools.ietf.org/search/rfc4862

In this case the _vlan_ table contained:

<pre>mysql> select * from vlan \G
*************************** 1. row ***************************
                 id: 1
               uuid: 90e0716c-5261-4992-bb9d-0afd3006f476
            vlan_id: vlan://untagged
       vlan_gateway: 172.16.0.1
       vlan_netmask: 255.255.255.0
        description: 172.16.0.10-172.16.0.250
          vlan_type: DirectAttached
     data_center_id: 1
         network_id: 204
physical_network_id: 200
        ip6_gateway: 2001:980:7936:112::1
           ip6_cidr: 2001:980:7936:112::/64
          ip6_range: NULL
            removed: NULL
            created: 2016-07-19 20:39:41
1 row in set (0.00 sec)

mysql></pre>

It will then log:

<pre>2016-10-04 11:42:44,998 DEBUG [c.c.n.g.DirectPodBasedNetworkGuru] (Work-Job-Executor-1:ctx-1975ec54 job-186/job-187 ctx-0d967d88) (logid:275c4961) Found IPv6 CIDR 2001:980:7936:112::/64 for VLAN 1
2016-10-04 11:42:45,009 INFO  [c.c.n.g.DirectPodBasedNetworkGuru] (Work-Job-Executor-1:ctx-1975ec54 job-186/job-187 ctx-0d967d88) (logid:275c4961) Calculated IPv6 address 2001:980:7936:112:4ba:80ff:fe00:e9 using EUI-64 for NIC 6a05deab-b5d9-4116-80da-c94b48333e5e</pre>

The template has to be configured accordingly:
- No IPv6 Privacy Extensions
- Use SLAAC
- Follow RFC4862

This is also described in: https://cwiki.apache.org/confluence/display/CLOUDSTACK/IPv6+in+Basic+Networking

The next steps after this will be:
- Security Grouping to prevent IPv6 Address Spoofing
- Security Grouping to filter ICMP, UDP and TCP traffic

* pr/1700:
  CLOUDSTACK-676: IPv6 In -and Egress filtering for Basic Networking
  CLOUDSTACK-676: IPv6 Basic Security Grouping for KVM
  CLOUDSTACK-9359: IPv6 for Basic Networking with KVM

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-01-27 05:42:44 +05:30
Rajani Karuturi
4721c53ea0 Merge pull request #1749 from mike-tutkowski/archived_snapshots
CLOUDSTACK-9619: Updates for SAN-assisted snapshotsThis PR is to address a few issues in #1600 (which was recently merged to master for 4.10).

In StorageSystemDataMotionStrategy.performCopyOfVdi we call getSnapshotDetails. In one such scenario, the source snapshot in question is coming from secondary storage (when we are creating a new volume on managed storage from a snapshot of ours thats on secondary storage).

This usually worked in the regression tests due to a bit of "luck": We retrieve the ID of the snapshot (which is on secondary storage) and then try to pull out its StorageVO object (which is for primary storage). If you happen to have a primary storage that matches the ID (which is the ID of a secondary storage), then getSnapshotDetails populates its Map<String, String> with inapplicable data (that is later ignored) and you dont easily see a problem. However, if you dont have a primary storage that matches that ID (which I didnt today because I had removed that primary storage), then a NullPointerException is thrown.

I have fixed that issue by skipping getSnapshotDetails if the source is coming from secondary storage.

While fixing that, I noticed a couple more problems:

1)       We can invoke grantAccess on a snapshot thats actually on secondary storage (this doesnt amount to much because the VolumeServiceImpl ignores the call when its not for a primary-storage driver).
2)       We can invoke revokeAccess on a snapshot thats actually on secondary storage (this doesnt amount to much because the VolumeServiceImpl ignores the call when its not for a primary-storage driver).

I have corrected those issues, as well.

I then came across one more problem:
         When using a SAN snapshot and copying it to secondary storage or creating a new managed-storage volume from a snapshot of ours on secondary storage, we attach to the SR in the XenServer code, but detach from it in the StorageSystemDataMotionStrategy code (by sending a message to the XenServer code to perform an SR detach). Since we know to detach from the SR after the copy is done, we should detach from the SR in the XenServer code (without that code having to be explicitly called from outside of the XenServer logic).

I went ahead and changed that, as well.

JIRA Ticket:
https://issues.apache.org/jira/browse/CLOUDSTACK-9619

* pr/1749:
  CLOUDSTACK-9619: Updates for SAN-assisted snapshots

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-01-27 05:35:06 +05:30
Rajani Karuturi
a4061026b6 Merge pull request #1904 from fmaximus/bugfix/CLOUDSTACK-9729
CLOUDSTACK-9729: Use latest Nuage client.CloudStack root pom change to use Amazon WS 11.1.16
caused our client to fail, as it was depending on classes,
which are not not present anymore.
Latest client version uses Gson instead.

BUG-ID: CLOUDSTACK-9729
Bugfix-for: master

* pr/1904:
  Use latest Nuage client.

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-01-27 05:16:24 +05:30
Wido den Hollander
115d6d5dc7
CLOUDSTACK-676: IPv6 In -and Egress filtering for Basic Networking
This commit implements Ingress and Egress filtering for IPv6 in
Basic Networking.

It allows for opening and closing ports just as can be done with IPv4.

Rules have to be specified twice, once for IPv4 and once for IPv6, for
example:

- 22 until 22: 0.0.0.0/0
- 22 until 22: ::/0

Egress filtering works the same as with IPv4. When no rule is applied all
traffic is allowed. Otherwise only the specified traffic (with DNS being
the exception) is allowed.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2017-01-26 15:36:20 +01:00
Wido den Hollander
84e496b4f9
CLOUDSTACK-676: IPv6 Basic Security Grouping for KVM
This commit implements basic Security Grouping for KVM in
Basic Networking.

It does not implement full Security Grouping yet, but it does:
- Prevent IP-Address source spoofing
- Allow DHCPv6 clients, but disallow DHCPv6 servers
- Disallow Instances to send out Router Advertisements

The Security Grouping allows ICMPv6 packets as described by RFC4890
as they are essential for IPv6 connectivity.

Following RFC4890 it allows:
- Router Solicitations
- Router Advertisements (incoming only)
- Neighbor Advertisements
- Neighbor Solicitations
- Packet Too Big
- Time Exceeded
- Destination Unreachable
- Parameter Problem
- Echo Request

ICMPv6 is a essential part of IPv6, without it connectivity will break or be very
unreliable.

For now it allows any UDP and TCP packet to be send in to the Instance which
effectively opens up the firewall completely.

Future commits will implement Security Grouping further which allows controlling UDP and TCP
ports for IPv6 like can be done with IPv4.

Regardless of the egress filtering (which can't be done yet) it will always allow outbound DNS
to port 53 over UDP or TCP.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2017-01-26 15:36:08 +01:00
Wido den Hollander
c0e7766713
CLOUDSTACK-9359: IPv6 for Basic Networking with KVM
This commit adds the initial functionality for IPv6 in Basic Networking.

When a valid IPv6 CIDR is configured for the POD/VLAN the DirectPodBasedNetworkGuru
will use the EUI-64 calculation to calculate the IPv6 Address the Instance will obtain.

For this it is required that the physical routers in the Layer 2 network (POD/VLAN) send out
Router Advertisements with the same subnet as configured in CloudStack.

A example subnet could be 2001:db8::/64

Using radvd a Linux Router could send out Router Advertisements using this configuration:

  interface eth0
  {

	MinRtrAdvInterval 5;
	MaxRtrAdvInterval 60;
	AdvSendAdvert on;
        AdvOtherConfigFlag off;
        IgnoreIfMissing off;

	prefix 2001:db8::/64 {
	};

        RDNSS 2001:db8:ffff::53 {
        };
  };

A Instance with MAC Address 06:7a:88:00:00:8b will obtain IPv6 address 2001:db8:100::47a:88ff:fe00:8b

Both Windows, Linux and FreeBSD use the same calculation for their IPv6 Addresses, this is specified
in RFC4862 (IPv6 Stateless Address Autoconfiguration).

Under Linux it is mandatory that IPv6 Privacy Extensions are disabled:

$ sysctl -w net.ipv6.conf.all.use_tempaddr=0

Windows should be configured to use the MAC Address as the identifier for the EUI-64/SLAAC calculation.

$ netsh interface ipv6 set privacy state=disabled store=persistent
$ netsh interface ipv6 set global randomizeidentifiers=disabled store=persistent

The IPv6 address is stored in the 'nics' table and is then returned by the API and will be shown in the UI.

Searching for a conflicting IPv6 Address it NOT required as each IPv6 address is based on the MAC Address
of the Instance and therefor unique.

Security Grouping has not been implemented yet and will follow in a upcoming commit.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2017-01-26 15:17:33 +01:00
Simon Weller
6f2a5cf04e Fixes for testing VM Snapshots on KVM. Related to PR 977 2017-01-24 21:48:09 +01:00
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
Frank Maximus
f246de5e93 Use latest Nuage client.
* CloudStack root pom change to use Amazon WS 11.1.16
  caused our client to fail, as it was depending on classes,
  which are not not present anymore.
  Latest client version uses Gson instead.

* increase robustness of nuagevsp tests
  `- test_nuage_internal_dns - move vm2 creation upwards
  `- test_nuage_static_nat - delete vm in test step to avoid sut restriction

BUG-ID: CLOUDSTACK-9729i
Co-Authored-By: Raf Smeets <raf.smeets@nuagenetworks.net>
Bugfix-for: master
2017-01-24 11:38:59 +01:00
Rohit Yadav
9513053f42
Merge pull request #1888 from shapeblue/jre8-only
CLOUDSTACK-9710: Switch to JRE1.8

- Switches Travis to use jdk1.8
- Changes java-version to 1.8
- Change jdk/maven version to 1.8
- Switch to F5/java8 compatible library release
- Switch packaging to use jdk 1.8, and jre 1.8 in init/systemd scripts
- Switch systemvm to openjdk-8-jre

* pr/1888:
  CLOUDSTACK-9710: Switch to JRE1.8

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-01-12 23:02:05 +05:30
Rohit Yadav
e6cc78f531 CLOUDSTACK-9710: Switch to JRE1.8
- Switches Travis to use jdk1.8
- Changes java-version to 1.8
- Change jdk/maven version to 1.8
- Switch to F5/java8 compatible library release
- Switch packaging to use jdk 1.8, and jre 1.8 in init/systemd scripts
- Switch systemvm to openjdk-8-jre

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-01-11 14:04:03 +05:30
Koushik Das
729ae6d186 Merge pull request #1899 from Accelerite/CLOUDSTACK-9650
CLOUDSTACK-9650: Allow starting VMs regardless of cpu/memory cluster.disablethreshold setting

Fixed the scope of configuration flag 'cluster.threshold.enabled' introduced as part of PR#1812 to global

* pr/1899:
  CLOUDSTACK-9650: Allow starting VMs regardless of cpu/memory cluster.disablethreshold setting

Signed-off-by: Koushik Das <koushik@apache.org>
2017-01-11 12:16:34 +05:30
Koushik Das
44a5965248 CLOUDSTACK-9650: Allow starting VMs regardless of cpu/memory cluster.disablethreshold setting
Fixed the scope of configuration flag 'cluster.threshold.enabled' introduced as part of PR#1812 to global
2017-01-10 16:08:59 +05:30
Koushik Das
bc86baeaa0 Signed-off-by: Koushik Das <koushik@apache.org> 2017-01-10 14:46:52 +05:30
Rohit Yadav
57db647179 Merge branch '4.9' 2017-01-06 16:09:56 +05:30
Rohit Yadav
8b6e96bca9 Updating pom.xml version numbers for release 4.9.3.0-SNAPSHOT
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-01-06 10:40:15 +05:30
Rohit Yadav
dfc39c1f08 Updating pom.xml version numbers for release 4.9.2.0
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
4.9.2.0
2017-01-03 12:28:47 +05:30
Rohit Yadav
a20ffe239a Merge branch '4.9'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-01-03 12:25:04 +05:30
Rohit Yadav
41f7eb6290 Merge pull request #1887 from shapeblue/4910-upgrade-fix
schema: Fix upgrade issue for 4.9.1.0->4.9.2.0

* pr/1887:
  schema: Fix upgrade issue for 4.9.1.0->4.9.2.0

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-01-03 12:23:59 +05:30
Rohit Yadav
a3b86c7135 schema: Fix upgrade issue for 4.9.1.0->4.9.2.0
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-01-03 12:20:09 +05:30
Rohit Yadav
1802c490bd README: Revert changes from 86247
Holidays are over :(

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-01-02 13:03:59 +05:30
Rohit Yadav
0db4471be0
Merge branch '4.9' 2016-12-26 21:01:20 +05:30
Rohit Yadav
ee83b02c76 Merge pull request #1863 from shapeblue/xs7-iscsifixtest
Smoke tests xen:iscsi fix

* pr/1863:
  CLOUDSTACK-9662: Fix failing iscsi test

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-26 20:57:11 +05:30
Rohit Yadav
2ce02dc937 CLOUDSTACK-9662: Fix failing iscsi test
Use separate lvcreate command on XenServer7 hosts, that checks and passes
different parameters based on the xenserver release version.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-25 23:53:50 +05:30
Rohit Yadav
ec847a890e Merge pull request #1638 from shapeblue/spring4-java8-only
CLOUDSTACK-9456: Migrate master to Spring 4.xThis changes makes CloudStack use spring 4:

```
- Bump spring-framework version to 4.x and Jetty to version that runs with JDK7
- Bump servet dependency version
- Migrates various xmls to use version independent schema uris
```

Outstanding issue:
    - Testing of various non-standard plugins such as network and storage plugins etc.

Since, this is a big change pinging for review -- @jburwell @karuturi @wido @murali-reddy @abhinandanprateek @DaanHoogland @GaborApatiNagy @JayapalUradi @kishankavala @K0zka @nvazquez @rafaelweingartner @pyr and others

@blueorangutan package

* pr/1638:
  CLOUDSTACK-9456: Update Spring version in maven poms

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-24 09:39:18 +05:30
Rohit Yadav
a9f45dfc5f
Merge branch '4.9' 2016-12-23 17:50:42 +05:30
Rohit Yadav
20986ba512 Merge pull request #1854 from shapeblue/4.9-multiplex-testing
4.9 multiplex testingThis merges several PRs in this PR, this is for speeding up test efforts.

* pr/1854:
  CLOUDSTACK-9688: Fix VR smoke test failure in vpc_vpn
  CLOUDSTACK-9688: Fix failing test_volumes on centos7/kvm
  CLOUDSTACK-9676 Start instance fails after reverting to a VM snapshot, when there are child VM snapshots
  CLOUDSTACK-9612: Fixed issue in restarting redundant network with cleanup Rvr Network with cleanup which is updated from the isolated network is failed. Corrected the column name string issue.
  CLOUDSTACK-9676 Start instance fails after reverting to a VM snapshot, when there are child VM snapshots
  CLOUDSTACK-9673 Exception occured while creating the CPVM in the VmWare Setup over standard vSwitches
  CLOUDSTACK-9617: Fixed enabling remote access after PF or LB  configured on vpn tcp ports
  CLOUDSTACK-9615: Fixed applying ingress rules without ports
  CLOUDSTACK-9639: Unable to create shared network with vLan isolation
  CLOUDSTACK-9597: Should not fetch resource count for removed entity
  CLOUDSTACK-9649: In the management server log there is an error  related to 0.0.0.0 IP address

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-23 17:49:39 +05:30
Murali Reddy
b25bb10c59 CLOUDSTACK-9688: Fix VR smoke test failure in vpc_vpn
The test_vpc_vpn uses a cidr that overlaps with the base test environment's
CIDR causing intermittent failure. This changes the cidr to not overlap
with underlying infra and avoid future failures.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-23 14:46:36 +05:30
Rohit Yadav
cc9e3b2bd4 Merge pull request #1858 from shapeblue/xmas2016
README: Happy Christmas, happy holidays!Here's a screenshot to confirm the UI change:
![screenshot from 2016-12-22 23-42-31](https://cloud.githubusercontent.com/assets/95203/21435538/64d5fdda-c8a0-11e6-9346-bceaa1eca4ab.png)

Pinging for review -- @abhinandanprateek @chipchilders @chiradeep @DaanHoogland  @imduffy15 @K0zka @PaulAngus @nvazquez @terbolous @murali-reddy @NuxRo @wido @mike-tutkowski @swill @resmo @sebgoa @wilderrodrigues @kiwiflyer  @pyr @pdion891 @koushik-das @JayapalUradi  @karuturi @kishankavala @milamberspace @mlsorensen @serverchief @jlk @pdube @syed and many others!

Since this a text/UI change, please accept this without explicit integration test results, of course as long as Travis is green :)

Happy holidays everyone!

* pr/1858:
  README: Happy Christmas, happy holidays!

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-23 12:22:00 +05:30
Rohit Yadav
86247ab3a6 README: Happy Christmas, happy holidays!
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-22 23:41:14 +05:30
Rohit Yadav
cdbe847d29 CLOUDSTACK-9688: Fix failing test_volumes on centos7/kvm
Due to OS/hypervisor/environmental configuration, detaching a disk/device
using libvirt can be successful without updating the domain configuration (xml).
This leads to reattachment failure as the device is blocked until the next
reboot. This fixes a specific environment case by performing stop/start on
the VM only in case of KVM, which will recreate a fresh domain config (xml)
as KVM VMs have transient domain configs (xmls don't persist).

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-22 15:23:00 +05:30
Rohit Yadav
52f224f61d Merge pull request #1827 from sateesh-chodapuneedi/pr-cloudstack-9673
CLOUDSTACK-9673 : Exception occured while creating the CPVM in VMware setup over standard vSwitchesJira
===
CLOUDSTACK-9673 : Exception occured while creating the CPVM in VMware setup over standard vSwitches

Issue
====
Exception occured while creating the CPVM in the VmWare Setup using standard vswitches.
```
StartCommand failed due to Exception: com.vmware.vim25.AlreadyExists
message: [] com.vmware.vim25.AlreadyExistsFaultMsg: The specified key, name, or identifier already exists
```

Fix
===
Ensure synchronization while attempting to create port group such that simultaneous attempts are not made with same port group name on same ESXi host.

Testing
======
Successfully ran manual tests (deploy user instance) on top of latest master commit `17653a86fad67447a4f13e455e336694ad5c1735`.This code change is involved in virtual network creation over VMware standard vSwitches. Existing functional tests covers this functionality.

* pr/1827:
  CLOUDSTACK-9673 Exception occured while creating the CPVM in the VmWare Setup over standard vSwitches

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-22 15:12:16 +05:30
Rohit Yadav
23df5be29e Merge pull request #1828 from sateesh-chodapuneedi/pr-cloudstack-9676
CLOUDSTACK-9676 Start instance fails after reverting to a VM snapshot when there are child VM snapshotsJira
===
CLOUDSTACK-9676 Start instance fails after reverting to a VM snapshot when there are child VM snapshots

Issue
====
Start instance fails after reverting to a VM snapshot, when there is 1 or more child VM snapshots in the snapshot tree of the VM.
Per the code, the method hasSnapshot() is supposed to detect the presence of any snapshot for the VM. But we are checking for only current snapshot instead of checking presence of any snapshot in the snapshot tree.
The failure to detect all snapshots means ACP reconfigures the VM in wrong way assuming there are no snapshots for the VM.
This results in start failure.

Fix
===
Ensure correct detection of VM snapshots in the VM snapshot tree

* pr/1828:
  CLOUDSTACK-9676 Start instance fails after reverting to a VM snapshot, when there are child VM snapshots

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-22 15:11:36 +05:30
Rohit Yadav
0a42f0127e Merge pull request #1764 from exoscale/fix/CLOUDSTACK-9597
CLOUDSTACK-9597: Should not fetch resource count for removed entityFetch the number of resourceCount by domain and account excluding the removed ones.

Signed-off-by: Marc-Aurle Brothier <m@brothier.org>

* pr/1764:
  CLOUDSTACK-9597: Should not fetch resource count for removed entity

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-22 13:31:11 +05:30
Rohit Yadav
746998d162 Merge pull request #1811 from sudhansu7/CLOUDSTACK-9649
CLOUDSTACK-9649: In the management server log there is an error
ISSUE
============
In the management server log there is an error

2016-10-01 00:07:31,670 ERROR [c.c.h.v.r.VmwareResource] (DirectAgent-417:ctx-e8c89b3f strmg-esx-01, cmd: GetRouterAlertsCommand) (logid:7beb3819) Command failed due to Exception: java.io.IOException
Message: There was a problem while connecting to 0.0.0.0:3922

In case of basic zone and VMWare ESXi host, the NIC 2 always gets 0.0.0.0 as IP address. Looks like we are generating an error for connecting through this invalid IP.

2016-10-01 04:37:31,680 DEBUG [c.c.a.m.AgentManagerImpl] (RouterStatusMonitor-1:ctx-8880f9c8) (logid:946838b8) Details from executing class com.cloud.agent.api.routing.GetRouterAlertsCommand: Command failed due to Exception: java.io.IOException
Message: There was a problem while connecting to 0.0.0.0:3922

2016-10-01 04:37:31,680 WARN  [c.c.n.r.VirtualNetworkApplianceManagerImpl] (RouterStatusMonitor-1:ctx-8880f9c8) (logid:946838b8) Unable to get alerts from router r-4-VM Command failed due to Exception: java.io.IOException
Message: There was a problem while connecting to 0.0.0.0:3922

2016-10-01 04:37:31,682 DEBUG [c.c.n.ExternalDeviceUsageManagerImpl] (ExternalNetworkMonitor-1:ctx-913c7bae) (logid:1b926a60) External devices stats collector is running...

Root Cause:
As Link local is not used in basic zone mode (vmware). 0.0.0.0 is just shown as a placeholder address. In getRouterAlerts before sending GetRouterAlertsCommand added check for ip and skip the command if ip is '0.0.0.0'.

* pr/1811:
  CLOUDSTACK-9649: In the management server log there is an error  related to 0.0.0.0 IP address

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-22 13:30:42 +05:30
Rohit Yadav
c7b0345ed2 Merge pull request #1804 from Accelerite/CLOUDSTACK-9639
CLOUDSTACK-9639: Unable to create shared network with vLan isolationDescription:
=========
Create shared network fails with Error.
While creating a shared network it fails to create with Error "The new IP range you have specified has overlapped with the guest network in the zone: XYZ. Please specify a different gateway/netmask"

Steps to Reproduce:
===============
1. Create an isolated network with a subnet eg: 10.1.1.0/24
2. Create a shared network with the same subnet but different VLAN, we should observe this issue.

Expected Behaviour:
===============
It shouldn't restrict the creation of the guest network with the same subnet as long as they are segmented by VLAN.

ACTUAL BEHAVIOR:
===============
It doesn't allow the creation of shared guest networks if there is any isolated guest network using the same subnet although it allows using the same subnet in multiple shared networks.

Cause:
=====
The issue is happening because, when Shared network is getting created we are checking if there is any guest network already implemented with the same CIDR and throwing the error without checking if they are having same VLAN also. Creating the same CIDR shared network with different VLAN should be allowed.

Fix:
===
When creating a shared network, if there is any existing guest network with the same CIDR, we check if they are having the same VLAN, if they are in same VLAN, then we don't allow creating it. If they are in the same CIDR with different VLAN then we allowing to create the network.

* pr/1804:
  CLOUDSTACK-9639: Unable to create shared network with vLan isolation

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-22 13:29:59 +05:30
Sateesh Chodapuneedi
b0535d770d CLOUDSTACK-9676 Start instance fails after reverting to a VM snapshot, when there are child VM snapshots
Issue
====
Start instance fails after reverting to a VM snapshot, when there is 1 or more child VM snapshots in the snapshot tree of the VM.
Per the code that detects the presence of a snapshot, we are checking for only current snapshot instead of checking presence of any snapshot in the snapshot tree.
The failure to detect all snapshots means ACP reconfigures the VM in wrong way assuming there are no snapshots for the VM.
This results in start failure.

Fix
===
Ensure correct detection of VM snapshots in the VM snapshot tree

This closes #1828

Signed-off-by: Sateesh Chodapuneedi <sateesh.chodapuneedi@accelerite.com>
(cherry picked from commit 673bb25b5936d1c54e9210781280e9ddc507c830)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-22 13:29:07 +05:30
Jayapalu
7d678dfcae CLOUDSTACK-9612: Fixed issue in restarting redundant network with cleanup
Rvr Network with cleanup which is updated from the isolated network is failed.
Corrected the column name string issue.

This closes #1781

(cherry picked from commit 0f742e17237fc84d5e86dae9a67c7ef6a0b6c80c)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-22 13:12:12 +05:30
Rohit Yadav
60c4fce690 Merge pull request #1782 from jayapalu/CLOUDSTACK-9617
CLOUDSTACK-9617: Fixed enabling remote access after PF configured on Enabling Remote access Vpn Fails when there is a portforwarding rule of the reserved ports ( 1701 , 500 , 4500) under TCP protocol on Source nat IP

* pr/1782:
  CLOUDSTACK-9617: Fixed enabling remote access after PF or LB  configured on vpn tcp ports

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-22 13:09:19 +05:30
Rohit Yadav
2088f0ad73 Merge pull request #1783 from jayapalu/CLOUDSTACK-9615
CLOUDSTACK-9615: Fixd applying ingress rules without portsWhen ingress rule is applied without ports (port start and port end params are not passed) then API/UI is showing rule got applied but in the VR, iptables rule not got applied.

Fixed this issue in the VR script.

* pr/1783:
  CLOUDSTACK-9615: Fixed applying ingress rules without ports

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-22 12:37:13 +05:30
Rohit Yadav
342162bad7 Merge branch '4.9'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-22 11:59:02 +05:30
Rohit Yadav
a0e36b73ae Merge pull request #1711 from syed/xenserver7
XenServer 7 SupportThis PR adds support for XenServer 7. I have manually done the following tests
- Create a new cluster with XenServer7
- Add Primary storage: Should create an SR on XS7
- Add another XS7 host to the Pool
- Add host2 to Cloudstack
- Create VM1 from template
- Create VM2 from template
- Ping/SSH VM1 to VM2 and vice-versa
- Stop/Delete/Expunge VM2
- Create Data disk
- Attach it to VM1
- Create VM snaphsot of VM1
- Restore VM snapshot of VM1
- Delete VM snapshot of VM1
- Create Volume snapshot of Datadisk
- Create volume snapshot of Root disk
- Create new template from snapshot of root disk
- Create volume from snapshot of datadisk
- Detach datadisk volume
- Delete datadisk volume
- Aquire a public IP
- Create a static nat to VM1
- Live migrate VM1 while traffic on VM
- Delete VM1

* pr/1711:
  [CLOUDSTACK-9662] Add support for XenServer 7

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-22 11:18:57 +05:30
Rohit Yadav
38a955e8ec Merge pull request #1851 from shapeblue/4910to4920upgradepath
schema: Upgrade path from 4.9.1.0 to 4.9.2.0Upgrade paths added so PRs such as #1711 can use it.

* pr/1851:
  schema: Upgrade path from 4.9.1.0 to 4.9.2.0

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-22 11:13:47 +05:30
Rohit Yadav
f1cc4d1f5d schema: Upgrade path from 4.9.1.0 to 4.9.2.0
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-22 11:12:45 +05:30
Rohit Yadav
5b7f35c39f
Merge branch '4.9' 2016-12-22 10:02:24 +05:30
Rohit Yadav
743dd4249c Merge pull request #1839 from shapeblue/CLOUDSTACK-9683
CLOUDSTACK-9683: system.vm.default.hypervisor will pin the hypervisor for VR too with this fix

* pr/1839:
  CLOUDSTACK-9683: system.vm.default.hypervisor will pin the hypervisor for VR too with this fix

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2016-12-22 10:01:52 +05:30
Syed
eabf862ba9 [CLOUDSTACK-9662] Add support for XenServer 7 2016-12-21 16:58:10 -05:00
Sateesh Chodapuneedi
674bb064a3 CLOUDSTACK-9676 Start instance fails after reverting to a VM snapshot, when there are child VM snapshots
Issue
====
Start instance fails after reverting to a VM snapshot, when there is 1 or more child VM snapshots in the snapshot tree of the VM.
Per the code that detects the presence of a snapshot, we are checking for only current snapshot instead of checking presence of any snapshot in the snapshot tree.
The failure to detect all snapshots means ACP reconfigures the VM in wrong way assuming there are no snapshots for the VM.
This results in start failure.

Fix
===
Ensure correct detection of VM snapshots in the VM snapshot tree

Signed-off-by: Sateesh Chodapuneedi <sateesh.chodapuneedi@accelerite.com>
2016-12-22 01:41:33 +05:30
Sateesh Chodapuneedi
32e9e29a17 CLOUDSTACK-9673 Exception occured while creating the CPVM in the VmWare Setup over standard vSwitches
Issue
====
Exception occured while creating the CPVM in the VmWare Setup using standard vswitches.
StartCommand failed due to Exception: com.vmware.vim25.AlreadyExists
message: [] com.vmware.vim25.AlreadyExistsFaultMsg: The specified key, name, or identifier already exists

Fix
===
Ensure synchronization while attempting to create port group such that simultaneous attempts are not made with same port group name on same ESXi host.

Signed-off-by: Sateesh Chodapuneedi <sateesh.chodapuneedi@accelerite.com>
2016-12-22 01:35:10 +05:30