602 Commits

Author SHA1 Message Date
ustcweizhou
6745f98487 CLOUDSTACK-9999: vpc tiers do not work if vpc has more than 8 tiers (#2180)
In the VR, deviceid of eth1X should be 1X (eth10->10, eth11->11), not 1.
2017-08-13 01:19:51 +02:00
Rohit Yadav
ccf2f52041 Merge branch '4.10' 2017-08-04 20:46:05 +02:00
Rohit Yadav
ddd8462022 Merge branch '4.9' into 4.10 2017-08-04 20:45:45 +02:00
Slair1
a5778139c2 CLOUDSTACK-9801: IPSec VPN does not work after vRouter reboot or recreate (#1966)
This makes sure IP address is active.

After a vRouter is recreated (e.g. reboot via CloudStack UI) and Remote Access VPN enabled, VPN won't work anymore. Here is the abbreviated output of "ipsec auto -status" while we were having the issue:

root@r-10-VM:~# ipsec auto --status
000 using kernel interface: netkey
000 interface lo/lo 127.0.0.1
000 interface lo/lo 127.0.0.1
000 interface eth0/eth0 169.254.1.45
000 interface eth0/eth0 169.254.1.45
000 %myid = (none)
After this commit, the following occurs and VPNs work:


root@r-10-VM:~# ipsec auto --status
000 using kernel interface: netkey
000 interface lo/lo 127.0.0.1
000 interface lo/lo 127.0.0.1
000 interface eth0/eth0 169.254.1.45
000 interface eth0/eth0 169.254.1.45
000 interface eth1/eth1 xxx.xxx.xxx.172
000 interface eth1/eth1 xxx.xxx.xxx.172
000 interface eth2/eth2 192.168.1.1
000 interface eth2/eth2 192.168.1.1
000 %myid = (none)

eth1 interface IP is masked, but now ipsec sees all the interfaces and VPN works.

Looks like this bug was introduced by Pull Request #1423

It added code to start ipsec (cloudstack/systemvm/patches/debian/config/opt/cloud/bin/configure.py)

if vpnconfig['create']:
    logging.debug("Enabling remote access vpn on "+ public_ip)
    CsHelper.start_if_stopped("ipsec")
2017-08-04 20:43:54 +02:00
Frank Maximus
1414d20852 CLOUDSTACK-9749: Disable password service on ilb systemvm (#1912)
Fix cloud-password-srvr correctly.
Made sure it runs on VPC VR, but not on Internal LB
2017-08-03 22:38:25 +02:00
Nitesh Sarda
64d09c737a CLOUDSTACK-9017 : VPC VR DHCP broken for multihomed guest VMs
(cherry picked from commit 10b25adc460f89d4d98ee0c6090a4f785aa088a6)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-01 20:40:25 +02:00
Jayapal
5eb63975f7 CLOUDSTACK-9715: Update somaxconn value to default value
(cherry picked from commit 45c3d94d83cc70a80f493f2de62406853f06d6ac)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-01 20:40:25 +02:00
Will Stevens
c206098783 Fix public IPs not being removed from the VR when deprovisioned
(cherry picked from commit 23f64a13a85b89518860eb3600ed7652ebbc89ba)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-01 20:40:25 +02:00
Stefania
73c30f1baa 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.

(cherry picked from commit d5c5eb10f8a4fb80aa8b9182290948755cdd6026)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-01 20:40:25 +02:00
Jayapal
980be4dfc9 CLOUDSTACK-9757: Fixed issue in traffic from additional public subnet
(cherry picked from commit baac747089ef48ea6627a6aacf27156222862352)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-08-01 20:40:25 +02:00
Rohit Yadav
e9f526e221 Merge branch '4.9' into 4.10
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-07-28 10:49:34 +02:00
Slair1
471b68698a CLOUDSTACK-10016: VPC VR doesn't respond to DNS requests from remote access vpn clients (#2201)
When enabling remote access VPN, a new interface is created upon client connecting via VPN. The DNS service (dnsmasq) is set only to listen on interfaces that are active when it starts. Thus VPN users are provided the VR's IP address for DNS resolution, but it is not actually listening for DNS requests.
2017-07-28 10:27:28 +02:00
Rohit Yadav
c1e5cb32d0 Merge remote-tracking branch 'origin/4.9' into 4.10
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2017-07-23 13:30:04 +02:00
Will Stevens
c566aba838 we should not need to take down the service every time an IP is configured 2017-07-23 13:20:36 +02:00
Slair1
27b0c65909 Gather all S2S vpn statuses before outputting 2017-07-23 13:07:36 +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
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
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