888 Commits

Author SHA1 Message Date
Rohit Yadav
3587bc4b54 Merge remote-tracking branch 'origin/4.10' 2017-07-22 11:09:23 +02:00
Rohit Yadav
ffddd6db09 Merge remote-tracking branch 'origin/4.9' into 4.10 2017-07-22 11:07:42 +02:00
Rohit Yadav
aa8a721c39 CLOUDSTACK-9838: Allow ingress traffic between guest VMs via snat IPs
This enables the firewall/mangle tables rules to ACCEPT instead of RETURN, which
is the same behaviour as observed in ACS 4.5. By accepting the traffic, guest
VMs will be able to communicate tcp traffic between each other over snat public
IPs.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-07-22 10:53:21 +02:00
Rajani Karuturi
4bc7c270fa Updating pom.xml version numbers for release 4.11.0.0-SNAPSHOT
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2017-07-12 12:09:38 +05:30
Rajani Karuturi
4f229d19ad Updating pom.xml version numbers for release 4.10.1.0-SNAPSHOT
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2017-07-10 10:36:24 +05:30
Rajani Karuturi
9d2893d44a Updating pom.xml version numbers for release 4.10.0.0
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
2017-07-03 10:06:43 +05:30
Sigert Goeminne
77da97aad9 CLOUDSTACK-9980: Fix for DNS after network restart with clean up.
Configure.py without arguments gives IndexError.
2017-06-28 12:21:14 +02:00
Rajani Karuturi
d577adeaa8 Merge release branch 4.9 to master
* 4.9:
  Revert "Merge pull request #2084 from shapeblue/passwd-speedup"
2017-06-26 09:59:13 +05:30
Rajani Karuturi
24434beb42 Revert "Merge pull request #2084 from shapeblue/passwd-speedup"
This reverts commit 48f413a9825d0554cf5080b4723688d8c47afe5c, reversing
changes made to 5f35c15b6b3ff49cb49c5563abbef7cc0e21d4a7.
2017-06-26 09:58:33 +05:30
Rajani Karuturi
b9a4cb8770 Merge release branch 4.9 to master
* 4.9:
  vRouter defer configure: Resolve merge conflicts
  vRouter: vr_cfg: style consistency fixes
  vRouter: vr_cfg: Keep the original cfg
  vRouter: prevent fh leakage and use buffered writes in DataBags
2017-06-20 10:14:50 +05:30
Ronald van Zantvoort
330a0c7f2b vRouter defer configure: Resolve merge conflicts 2017-06-07 18:20:02 +02:00
Ronald van Zantvoort
a2eb0f23a9 vRouter: vr_cfg: style consistency fixes 2017-06-07 18:11:33 +02:00
Ronald van Zantvoort
8f5275399e vRouter: vr_cfg: Keep the original cfg 2017-06-07 18:11:33 +02:00
Ronald van Zantvoort
c10c3245d1 vRouter: prevent fh leakage and use buffered writes in DataBags 2017-06-07 18:11:33 +02:00
Rohit Yadav
ed376fcad6 Merge remote-tracking branch 'origin/4.9'
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-06-07 11:21:27 +05:30
Jayapal
065fa1c849 CLOUDSTACK-9669:Advaced zone isolated network egress destination cidr support
CLOUDSTACK-9669:egress destination cidr VR python script changes
    CLOUDSTACK-9669:egress destination API and orchestration changes
    CLOUDSTACK-9669: Added the ipset package in systemvm template
    CLOUDSTACK-9669:Added licence header for new files
    CLOUDSTACK-9669: replacing 0.0.0.0/0 with the network cidr

     ipset member add with 0.0.0.0/0 fails. So 0.0.0.0/0 replaced with the network cidr.
     In source cidr 0.0.0.0/0 is nothing but network cidr.
     updated the default egress all cidr with network cidr
2017-06-06 15:51:00 +05:30
Rajani Karuturi
c3d6b9e182 Merge pull request #2016 from Accelerite/CLOUDSTACK-9835
CLOUDSTACK-9835 : To make management server and SSVM to be in time sync
2017-06-06 15:33:18 +05:30
Rajani Karuturi
48f413a982 Merge pull request #2084 from shapeblue/passwd-speedup
Passwd speedup
2017-06-06 15:32:02 +05:30
Nitesh Sarda
10b25adc46 CLOUDSTACK-9017 : VPC VR DHCP broken for multihomed guest VMs 2017-05-23 17:34:20 +05:30
Rajani Karuturi
8b3cadb55e Merge release branch 4.9 to master
* 4.9:
  Do not set gateway to 0.0.0.0 for windows clients
  CLOUDSTACK-9904: Fix log4j to have @AGENTLOG@ replaced
  ignore bogus default gateway   when a shared network is secondary the default gateway gets overwritten by a bogus one   dnsmasq does the right thing and replaces it with its own default which is not good for us   so check for '0.0.0.0'
  Activate NioTest following changes in CLOUDSTACK-9348 PR #1549
  CLOUDSTACK-9828: GetDomRVersionCommand fails to get the correct version as output Fix tries to return the output as a single command, instead of appending output from two commands
  CLOUDSTACK-3223 Exception observed while creating CPVM in VMware Setup with DVS
  CLOUDSTACK-9787: Fix wrong return value in NetUtils.isNetworkAWithinNetworkB
2017-05-17 11:36:52 +05:30
Rajani Karuturi
cbd3662482 Merge pull request #2055 from shapeblue/sharedisolated
CLOUDSTACK-9887 ignore bogus default gateway
2017-05-17 09:53:39 +05:30
Jayapal
da8a3567a3 CLOUDSTACK-9848: Added exit status checking for the iptables commands 2017-05-09 17:40:02 +05:30
Daan Hoogland
710d3bff3f rat 2017-05-08 07:42:04 +02:00
Daan Hoogland
00add83749 remaining conflicting code for vm_passwd speedup 2017-05-06 22:12:36 +02:00
Remi Bergsma
9a21f56f8a Speedup vm start by making vm_passwd saving much faster
- do not keep passwords in databag (/etc/cloudstack/vmpasswd.json)
- process only the password we get in (vm_password.json) from mgt server
- lookup the correct passwd server instead of adding passwd to all of them

Example:
- 4 tiers and 199 VMs running
- Start vm 200 would cause new passwd from vm_password.json (1) to be merged with /etc/cloudstack/vmpasswd.json (199)
- A curl command was exected foreach password (200) foreach tier (4) resulting in 800 calls
- In fact, since passwds are never cleaned it could very well be even more as the ip address was the key in the json file so until the ip address was reused the original password would remain and be sent to passwd server every time another vm starts.
- This took ~40 seconds

Now we just figure out the right tier and only process the new password resulting in a single curl call.
- takes 0,03 seconds!
2017-05-06 21:48:25 +02:00
Will Stevens
45a96a7f95 remove unnecessary VPN drops 2017-04-27 13:19:25 -04:00
Harikrishna Patnala
8a4f3e53b6 CLOUDSTACK-9835 : Management server and SSVM should be in time sync
Added a new configuration paremetar "ntp.server.list" to configure NTP server ip in NTP settings of SSVM
2017-04-25 13:01:33 +05:30
Daan Hoogland
0db9c980a6 ignore bogus default gateway
when a shared network is secondary the default gateway gets overwritten by a bogus one
  dnsmasq does the right thing and replaces it with its own default which is not good for us
  so check for '0.0.0.0'
2017-04-20 09:36:17 +02:00
Daan Hoogland
f07d729086 CLOUDSTACK-9408 for the move away from download.cloud.com
- commented some occurences of cloud.com as being harmless
  * examples
  * identifiers (internal)
 - changed the URL for vhd-util download
 - changed comments from 'cloud.com' to 'Apache CloudStack'
2017-04-20 11:35:36 +05:30
Will Stevens
bb4087733b changed the order fix to be closer to the original code 2017-03-17 15:07:11 -04:00
Will Stevens
8d4855b4eb CLOUDSTACK-9811: fixed an issue if the dev is not in the databag 2017-03-14 09:23:47 -04:00
Abhinandan Prateek
e303eee8e6 CLOUDSTACK-9828: GetDomRVersionCommand fails to get the correct version as output
Fix tries to return the output as a single command, instead of appending output from two commands
2017-03-09 14:15:45 +05:30
David Mabry
3e54388858 moved logrotate from cron.daily to cron.hourly for vpcrouter in cloud-early-config
(cherry picked from commit 450deed8472c06c4fec88e045bef28091502c638)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-03-03 14:00:43 +05:30
Rajani Karuturi
017c42b625 Merge pull request #1907 from swill/fix_vr_ip
Fix public IPs not being removed from the VR when deprovisionedThis PR replaces #1706.  It does not remove the IP from the database, but it does deprovision the IP correctly from the VR when the public IP is removed.

* pr/1907:
  Fix public IPs not being removed from the VR when deprovisioned

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-28 05:56:03 +05:30
Rajani Karuturi
48cbef6d24 Merge pull request #1922 from Accelerite/vpcApub
CLOUDSTACK-9757: Fixed issue in traffic from additional public subnetAcquire ip from additional public subnet and configure nat on that ip.
After this pick any from that network and access additional public subnet from this vm. Traffic is supposed to go via additional public subnet interface in the VR.

* pr/1922:
  CLOUDSTACK-9757: Fixed issue in traffic from additional public subnet

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-28 05:53:59 +05:30
Rajani Karuturi
fa85151be9 Merge release branch 4.9 to master
* 4.9:
  CLOUDSTACK-9746 system-vm: logrotate config causes critical failures
  CLOUDSTACK-9788: Fix exception listNetworks with pagesize=0
  CLOUDSTACK-8663: Fixed various issues to allow VM snapshots and volume snapshots to exist together
  Fix HVM VM restart bug in XenServer
2017-02-28 05:47:06 +05:30
Rajani Karuturi
b95bf8fcd8 Merge release branch 4.8 to 4.9
* 4.8:
  CLOUDSTACK-9746 system-vm: logrotate config causes critical failures
2017-02-28 05:45:31 +05:30
Rajani Karuturi
f9ef6ca667 Merge pull request #1948 from greenqloud/pr-faster-static-nats
[CLOUDSTACK-9793] Faster IP in subnet checkThis change removes the conversion from IPNetwork to list in one of the router scripts. This makes the router faster at processing static NAT rules, which can prevent timeouts when attaching or detaching IPs.

With the `list` conversion, it has to potentially check a list of 65536 IP strings multiple times. We assume that the comparison implemented in the IPNetwork is far more efficient. We have seen speed-up from 218 seconds to enable static NAT with 18 IPs on the router to 2 or 3 seconds by removing this cast. This also fixes a potential bug where adding IPs to a router time out because the scripts are taking too long. 218 seconds, for example, is beyond the timeout on the KVM agent for script execution, and then all enableStaticNat operations will fail.

* pr/1948:
  CLOUDSTACK-9793: Faster ip in subnet check

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-28 05:33:38 +05:30
Jayapal
baac747089 CLOUDSTACK-9757: Fixed issue in traffic from additional public subnet 2017-02-24 14:50:48 +05:30
Will Stevens
23f64a13a8 Fix public IPs not being removed from the VR when deprovisioned 2017-02-22 13:08:11 -05:00
Joakim Sernbrant
5604b4c59e CLOUDSTACK-9746 system-vm: logrotate config causes critical failures
* rotate both daily and by size by using maxsize in stead of size
* decrease the max size to 10M for rsyslog files
* remove delaycompress for rsyslog files
* increase rotate to 10 for cloud.log
2017-02-22 11:04:52 +01:00
David Mabry
450deed847 moved logrotate from cron.daily to cron.hourly for vpcrouter in cloud-early-config 2017-02-20 09:06:46 -06:00
Stefania
d5c5eb10f8 CLOUDSTACK-9793: Faster ip in subnet check
This change removes an unnecessary conversion from IPNetwork
to list in one of the router scripts. This makes the router
faster at processing static NAT rules, which can prevent
timeouts when attaching or detaching IPs.
2017-02-17 13:20:11 +00:00
Rajani Karuturi
13bfdd71e6 Merge pull request #1741 from swill/strongswanvpn
Updated StrongSwan VPN ImplementationThis PR is a merge of @jayapalu changes in #872 and the changes I had to make to get the functionality working.

I have done pretty extensive testing of this code so far and we are looking to be in pretty good shape.  One thing to note is that a `Diffie-Hellman` group **is required** in order for this feature to work correctly.  It is not highlighted in the tests below, but I have shown that the `PFS` is not required for this feature to work.  In #872 I have shown a more exhaustive set of tests of this code, but I have limited this set of tests to a recommended `IKE` and `ESP` configuration in order to reduce the noise and test the other areas of functionality.

**Test Results**
I am testing this functionality by creating two VPCs with VMs in each and creating a S2S VPN connection between the two VPCs. Then I SSH into a VM in one VPC and I ping the private IP of a VM in the other VPC. Then I tear it down and try a different configuration.

_Setup_

```
VPC 1                          VPC 2
=====                          =====
VPN Gateway                    VPN Gateway
VPN Customer Gateway           VPN Customer Gateway
VPN Connection        <--->    VPN Connection
 - Passive = True               - Passive = False
```

_Legend_
`SKIP` => At least one of the VPN Connections did not come up, so no test was run.
`OK` => The ping test was successful over the S2S VPN connection.
`FAIL` => The ping test failed over the S2S VPN connection.

`Passive` => Specifies if either the `<vpc_1> : <vpc_2>` sides of the VPN Connection is set to passive.
`Conn State` => Specifies the connection status of the `<vpc_1> : <vpc_2>` VPN Connection in the UI.
`Requires Reset` => If the ping test does not result in an `OK`, then a VPN Connection Reset is performed on either `<vpc_1> : <vpc_2>` sides of the VPN Connection based on which side is not showing `Connected`.  The results in the `Status` column is the final result after the reset is performed.

_Results_

```
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| Status | IKE & ESP            | DPD   | Encap | IKE Life | ESP Life | Passive       | Conn State                  | Requires Reset |
+========+======================+=======+=======+==========+==========+===============+=============================+================+
| OK     | aes128-sha1;modp1536 | True  | False | 86400    | 3600     | True : False  | Disconnected : Connected    | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| OK     | aes128-sha1;modp1536 | True  | True  | 86400    | 3600     | True : False  | Disconnected : Connected    | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| OK     | aes128-sha1;modp1536 | True  | False |          | 3600     | True : False  | Disconnected : Connected    | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| OK     | aes128-sha1;modp1536 | True  | False | 86400    |          | True : False  | Disconnected : Connected    | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| OK     | aes128-sha1;modp1536 | True  | False |          |          | True : False  | Disconnected : Connected    | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| OK     | aes128-sha1;modp1536 | True  | False | 86400    | 3600     | False : False | Connected : Connected       | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| OK     | aes128-sha1;modp1536 | True  | False | 86400    | 3600     | True : True   | Disconnected : Disconnected | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| OK     | aes128-sha1;modp1536 | True  | False | 86400    | 3600     | False : True  | Connected : Disconnected    | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| OK     | aes128-sha1;modp1536 | False | False | 86400    | 3600     | False : False | Connected : Connected       | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| OK     | aes128-sha1;modp1536 | False | False | 86400    | 3600     | True : False  | Disconnected : Connected    | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| OK     | aes128-sha1;modp1536 | False | False | 86400    | 3600     | True : True   | Disconnected : Disconnected | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| OK     | aes128-sha1;modp1536 | False | False | 86400    | 3600     | False : True  | Connected : Disconnected    | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| SKIP   | aes128-sha1          | True  | False | 86400    | 3600     | True : False  | Disconnected : Error        | True : False   |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| SKIP   | aes128-sha1          | False | False | 86400    | 3600     | True : False  | Disconnected : Error        | True : False   |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| FAIL   | aes128-sha1          | True  | False | 86400    | 3600     | True : True   | Disconnected : Disconnected | True : True    |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
| SKIP   | aes128-sha1          | True  | False | 86400    | 3600     | False : False | Connected : Error           | False : False  |
+--------+----------------------+-------+-------+----------+----------+---------------+-----------------------------+----------------+
```

* pr/1741:
  complete implementation of the StrongSwan VPN feature

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-14 17:59:17 +05:30
Jayapal
45c3d94d83 CLOUDSTACK-9715: Update somaxconn value to default value 2017-02-13 15:10:10 +05:30
Rajani Karuturi
2d5054f655 Merge release branch 4.9 to master
* 4.9:
  CLOUDSTACK-9770: fix missing ip routes in VR
2017-02-08 15:02:30 +05:30
Wei Zhou
8c69cb1c1f CLOUDSTACK-9770: fix missing ip routes in VR 2017-02-03 17:51:46 +01:00
Rajani Karuturi
8e069ed132 Merge release branch 4.9 to master
* 4.9:
  FIX issue on preshared key if we disable/enable remote access vpn
2017-02-03 06:38:14 +05:30
Rajani Karuturi
c8916792c6 Merge pull request #1890 from ustcweizhou/vpn-preshared-key-issue
[4.9] CLOUDSTACK-9712: FIX issue on preshared key if we disable/enable remote access vpnWay to reproduce the issue
(1) enable remote access vpn
root@r-8349-VM:~# cat /etc/ipsec.d/ipsec.any.secrets
: PSK "mVSx5KDXCPYX7X5DGb2W8yNW"

(2) disable/enable vpn
root@r-8349-VM:~# cat /etc/ipsec.d/ipsec.any.secrets
: PSK "mVSx5KDXCPYX7X5DGb2W8yNW"
: PSK "HeV3dHZpZXt4chhfvhx8D83C"

Expected configuration:
root@r-8349-VM:~# cat /etc/ipsec.d/ipsec.any.secrets
: PSK "HeV3dHZpZXt4chhfvhx8D83C"

* pr/1890:
  FIX issue on preshared key if we disable/enable remote access vpn

Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
2017-02-03 06:37:50 +05:30
Rajani Karuturi
5309c42058 Merge release branch 4.9 to master
* 4.9:
  CLOUDSTACK-9692: Fix password server issue in redundant VRs
2017-02-03 06:32:27 +05:30