888 Commits

Author SHA1 Message Date
dean.close
38b3bdd488 CLOUDSTACK-6975: Prevent dnsmasq from starting on backup redundant RvR. 2016-05-09 11:34:47 +01:00
Nuno Tavares
c269097a27 This patch addresses two issues:
On redundant VR setups, the primary resolver being handed out to instances is the guest_ip (primary IP for the VR). This might lead to problems upon failover, at least while the DHCP lease doesn't update (because the primary resolver will be checked first until times out, however it'll be gone upon failover).

If Global Setting use_ext_dns is true, we don't want the VR to be the primary resolver at all.
2016-05-08 22:47:55 +02:00
Will Stevens
29ba71f2db Merge pull request #1463 from DaanHoogland/CLOUDSTACK-9336
CLOUDSTACK-9336 surround the execution of baremetal-vr.py with condition

* pr/1463:
  CLOUDSTACK-9336 surround the execution of baremetal-vr.py with condition

Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-05-04 10:29:15 -04:00
Rene Moser
1889e399dd systemvm, logrotate: remove daily explicitly as it is ignored
If the size directive is used, logrotate will ignore the daily, weekly, monthly,
and yearly directives.

remove cloud-cleanup

This script does not do anything because it fails due missing /var/log/cloud directory. Logrotate is used for this functionality.
2016-05-04 00:23:30 +02:00
Remi Bergsma
ebb7cb690d Resolve conflict as forceencap is already in master 2016-04-30 21:09:33 +02:00
Anshul Gangwar
7db5f1833e CLOUDSTACK-9164: Prevent firefox's quick search from opening in VM console 2016-04-25 11:37:43 +05:30
Will Stevens
37afba05f4 Merge release branch 4.8 to master
* 4.8:
  CLOUDSTACK-9172 Added cross zones check to delete template and iso
  Check the existence of 'forceencap' parameter before use
  systemvm: set default umask 022 in injectkeys.sh
2016-04-21 16:32:36 -04:00
Will Stevens
c2fc0c4cd3 Merge release branch 4.7 to 4.8
* 4.7:
  CLOUDSTACK-9172 Added cross zones check to delete template and iso
  Check the existence of 'forceencap' parameter before use
  systemvm: set default umask 022 in injectkeys.sh
2016-04-21 16:31:49 -04:00
Will Stevens
a7fef86bb3 Merge pull request #1402 from remibergsma/forceencap_check
Check the existence of 'forceencap' parameter before useCheck the existence of 'forceencap' parameter before use.

Error seen:

```
Traceback (most recent call last):
  File "/opt/cloud/bin/update_config.py", line 140, in <module>
    process_file()
  File "/opt/cloud/bin/update_config.py", line 54, in process_file
    finish_config()
  File "/opt/cloud/bin/update_config.py", line 44, in finish_config
    returncode = configure.main(sys.argv)
  File "/opt/cloud/bin/configure.py", line 1003, in main
    vpns.process()
  File "/opt/cloud/bin/configure.py", line 488, in process
    self.configure_ipsec(self.dbag[vpn])
  File "/opt/cloud/bin/configure.py", line 544, in configure_ipsec
    file.addeq(" forceencaps=%s" % CsHelper.bool_to_yn(obj['encap']))
KeyError: 'encap'
```

* pr/1402:
  Check the existence of 'forceencap' parameter before use

Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-04-21 16:30:16 -04:00
Remi Bergsma
53de78f642 Check the existence of 'forceencap' parameter before use 2016-04-19 11:11:19 +02:00
Slair1
7b9b328f30 CLOUDSTACK-9342: Site to Site VPN PFS not being set correctly
Bug in code set PFS to the same value (yes/no) as DPD.

file.addeq(" pfs=%s" % CsHelper.bool_to_yn(obj['dpd']))
2016-04-15 12:00:16 -05:00
Will Stevens
0dcaf197b4 Merge release branch 4.8 to master
* 4.8:
  speedup iptables by prefetching the variables
2016-04-12 10:11:08 -04:00
Will Stevens
f8e71b0235 Merge release branch 4.7 to 4.8
* 4.7:
  speedup iptables by prefetching the variables
2016-04-12 10:10:17 -04:00
kollyma
0a01e82c23 speedup iptables by prefetching the variables 2016-04-11 20:58:03 +02:00
Remi Bergsma
f4f9b3ab4e Handle private gateways more reliably 2016-04-10 20:06:44 +02:00
Wilder Rodrigues
78bbd498e7 CLOUDSTACK-9287 - Fix RVR public interface 2016-04-09 21:14:41 +02:00
Wilder Rodrigues
c41edc1fe6 CLOUDSTACK-9287 - Refactor the interface state configuration
- This also refactors the CsAddress in order to offer better readability in a couple of methods.
2016-04-09 21:14:25 +02:00
Remi Bergsma
6a767732f9 CLOUDSTACK-9287 - Bring up the private gw interface on state change to master 2016-04-09 21:14:10 +02:00
Remi Bergsma
057b54aa3e CLOUDSTACK-9287 - Make sure private gw interface is not used for default gw 2016-04-09 21:13:47 +02:00
Wilder Rodrigues
d93b008deb CLOUDSTACK-9287 - Put private gateway interface down on backup router 2016-04-09 21:13:35 +02:00
Remi Bergsma
b9feb39e17 apply static routes on change to master state 2016-04-07 20:57:58 +02:00
Remi Bergsma
3636ad1114 lower the time we wait for interfaces to appear
They might never appear.. for example when we have entries in
/etc/cloudstack/ips.json that haven't been plugged yet. Waiting
this long makes everything horribly slow (every vm, interface,
static route, etc, etc, will hit this wait, for every device).
2016-04-07 20:52:33 +02:00
dahn
2a88b11132 CLOUDSTACK-9336 surround the execution of baremetal-vr.py with condition 2016-04-05 13:28:39 +02:00
Boris Schrijver
30741a3309 Split the cidr lists so we won't hit the iptables-resture limits 2016-02-05 21:11:59 +01:00
Boris Schrijver
709be45cf0 Check the existence of 'forceencap' parameter before use 2016-02-05 21:06:53 +01:00
Boris Schrijver
18d5cd2855 Do not load previous firewall rules as we replace everyhing anyway 2016-02-05 21:04:06 +01:00
Boris Schrijver
eb9706b655 Wait for dnsmasq to finish restart 2016-02-05 12:02:58 +01:00
Boris Schrijver
69e9348900 Remove duplicate spaces, and thus duplicate rules. 2016-02-05 12:02:57 +01:00
Boris Schrijver
b857f79fcb Restore iptables at once using iptables-restore instead of calling iptables numerous times 2016-02-05 12:02:57 +01:00
Boris Schrijver
0f75042566 Add iptables copnversion script.
Source: https://raw.githubusercontent.com/sl0/conv/master/iptables_converter.py
2016-02-05 12:02:57 +01:00
Remi Bergsma
7017a829ea Merge release branch 4.8 to master
* 4.8:
  Display hostname the VPC router runs on
  CLOUDSTACK-9266: Make deleting static routes in private gw work
  CLOUDSTACK-9264: Make /32 static routes for private gw work
2016-02-04 09:27:40 +01:00
Remi Bergsma
be89f64731 Merge release branch 4.7 to 4.8
* 4.7:
  Display hostname the VPC router runs on
  CLOUDSTACK-9266: Make deleting static routes in private gw work
  CLOUDSTACK-9264: Make /32 static routes for private gw work
2016-02-04 09:26:53 +01:00
Remi Bergsma
a243339faa Merge pull request #1386 from remibergsma/fix-del-private-gw-route
CLOUDSTACK-9266: Make deleting static routes in private gw workThe to-be-deleted static routes were removed from the json file, instead of putting them there with revoke=true. The script that parses the json now doesn't find it and thus does not delete it.

Example after adding/removing some:
```
root@r-3-VM:/var/cache/cloud# cat /etc/cloudstack/staticroutes.json
{
    "1.2.3.0/24": {
        "gateway": "172.16.0.1",
        "ip_address": "172.16.0.2",
        "network": "1.2.3.0/24",
        "revoke": true
    },
    "1.2.3.4/32": {
        "gateway": "172.16.0.1",
        "ip_address": "172.16.0.2",
        "network": "1.2.3.4/32",
        "revoke": true
    },
    "1.2.33.3/32": {
        "gateway": "172.16.0.1",
        "ip_address": "172.16.0.2",
        "network": "1.2.33.3/32",
        "revoke": true
    },
    "1.22.2.2/32": {
        "gateway": "172.16.0.1",
        "ip_address": "172.16.0.2",
        "network": "1.22.2.2/32",
        "revoke": true
    },
    "10.1.2.1/32": {
        "gateway": "172.16.0.1",
        "ip_address": "172.16.0.2",
        "network": "10.1.2.1/32",
        "revoke": true
    },
    "10.1.200.0/25": {
        "gateway": "172.16.0.1",
        "ip_address": "172.16.0.2",
        "network": "10.1.200.0/25",
        "revoke": true
    },
    "10.11.12.13/32": {
        "gateway": "172.16.0.1",
        "ip_address": "172.16.0.2",
        "network": "10.11.12.13/32",
        "revoke": true
    },
    "172.16.1.3/32": {
        "gateway": "172.16.0.1",
        "ip_address": "172.16.0.2",
        "network": "172.16.1.3/32",
        "revoke": true
    },
    "172.16.15.14/32": {
        "gateway": "172.16.0.1",
        "ip_address": "172.16.0.2",
        "network": "172.16.15.14/32",
        "revoke": false
    },
    "172.16.17.0/25": {
        "gateway": "172.16.0.1",
        "ip_address": "172.16.0.2",
        "network": "172.16.17.0/25",
        "revoke": false
    },
    "id": "staticroutes"
}
```

This results in:
```
root@r-3-VM:/var/cache/cloud# ip route show
default via 192.168.23.1 dev eth1
169.254.0.0/16 dev eth0  proto kernel  scope link  src 169.254.1.67
172.16.0.0/24 dev eth2  proto kernel  scope link  src 172.16.0.2
172.16.15.14 via 172.16.0.1 dev eth2
172.16.17.0/25 via 172.16.0.1 dev eth2
192.168.23.0/24 dev eth1  proto kernel  scope link  src 192.168.23.4
```

Two static routes left, the rest deleted:
```
172.16.15.14 via 172.16.0.1 dev eth2
172.16.17.0/25 via 172.16.0.1 dev eth2
```

That also matches the UI:

<img width="1327" alt="screen shot 2016-01-30 at 06 34 06" src="https://cloud.githubusercontent.com/assets/1630096/12693933/83e67d80-c71b-11e5-9241-9f478522b7a4.png">

* pr/1386:
  CLOUDSTACK-9266: Make deleting static routes in private gw work

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-02-04 09:13:00 +01:00
Remi Bergsma
a40415604a CLOUDSTACK-9266: Make deleting static routes in private gw work 2016-01-30 06:25:00 +01:00
Remi Bergsma
78c43669e5 CLOUDSTACK-9264: Make /32 static routes for private gw work 2016-01-29 19:25:29 +01:00
Remi Bergsma
e93fd548d6 Merge release branch 4.8 to master
* 4.8:
  CLOUDSTACK-9256 add unique key for static routes in json
2016-01-26 17:07:37 +01:00
Remi Bergsma
48672c7e4a Merge release branch 4.7 to 4.8
* 4.7:
  CLOUDSTACK-9256 add unique key for static routes in json
2016-01-26 17:07:04 +01:00
Remi Bergsma
782d5d73f5 Merge pull request #1364 from remibergsma/CLOUDSTACK-9256
CLOUDSTACK-9256 add unique key for static routes in jsonStatic routes that are being set do not show up in the static_routes.json file. The reason for this is that the index that is used, is the gateway address, which is not unique. Hence stuff is overwritten and lost.

Ping @borisroman @wilderrodrigues @DaanHoogland

* pr/1364:
  CLOUDSTACK-9256 add unique key for static routes in json

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-26 17:06:21 +01:00
Remi Bergsma
43ab98d823 Updating pom.xml version numbers for release 4.9.0-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-26 15:12:20 +01:00
Remi Bergsma
32fcc47117 Updating pom.xml version numbers for release 4.8.1-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-26 09:39:00 +01:00
Remi Bergsma
a4ac9d3fff Updating pom.xml version numbers for release 4.7.2-SNAPSHOT
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-26 09:33:56 +01:00
Remi Bergsma
8c60ad214f Merge release branch 4.7 to 4.8
* 4.7:
  CLOUDSTACK-9254: Make longer names display pretty
  CLOUDSTACK-9245 - Deletes ACL items when destroying the VPC or deleting the ACL itself
  CLOUDSTACK-9245 - Formatting NetworkACLServiceImpl class
  CLOUDSTACK-9245 - Formatting VpcManagerImpl class
  CLOUDSTACK-9245 - Formatting NetworkACLManagerImpl class
  More VR performance!
2016-01-26 08:39:28 +01:00
Remi Bergsma
62fc6fef97 CLOUDSTACK-9256 add unique key for static routes in json 2016-01-25 17:17:55 +01:00
Remi Bergsma
3d2bb285f0 Merge pull request #1356 from borisroman/4.7-vr-performance-wip
More VR performance!Ping @remibergsma

Integration tests runnning now!

* pr/1356:
  More VR performance!

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-23 19:16:48 +01:00
Boris Schrijver
3eceb60f5c More VR performance! 2016-01-21 11:51:03 +01:00
Remi Bergsma
62f218b7bd Updating pom.xml version numbers for release 4.8.0
Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-20 23:43:35 +01:00
Remi Bergsma
6f9215cf39 Merge release branch 4.7 to master
* 4.7:
  Refactor public ip retrieval into method
  CLOUDSTACK-9244 Fix setting up RFC1918 routes
  CLOUDSTACK-9239 throw exception on deprecated command
  Enhance VR performance by selectively executing tasks instead of brute-forcing
  CLOUDSTACK-9236: Load Balancing Health Check button displayed when non-NetScaler offering is used
2016-01-20 14:18:09 +01:00
Remi Bergsma
ed23ac627a Merge pull request #1346 from borisroman/4.7-vr-performance
Enhance VR performanceWill post integration test results soon!

Ping @wilderrodrigues @remibergsma

* pr/1346:
  Enhance VR performance by selectively executing tasks instead of brute-forcing

Signed-off-by: Remi Bergsma <github@remi.nl>
2016-01-20 14:17:37 +01:00
Daan Hoogland
91f7fc05b6 Refactor public ip retrieval into method 2016-01-19 23:02:26 +01:00
Remi Bergsma
d601570053 CLOUDSTACK-9244 Fix setting up RFC1918 routes 2016-01-19 18:29:31 +01:00