cloudstack/systemvm/patches/debian/config/opt/cloud/bin
Will Stevens 3fab75772f Merge pull request #1474 from remibergsma/47_private_gw_initial_config
Handle private gateways more reliablyWhen initialising a VPC router we need to know which IP/device corresponds to a private gateway. This is to solve a problem when stop/starting a VPC router (which gets the private gateway config as a guest network and as a result breaks the functionality). You read it right, the private gateway is sent as type=guest after reboot and type=public initially.

Before this change, you could add a private gw to a running router but you couldn't restart it (it would mix up the tiers). Now the private gateway is detected properly and it works just fine.

Booting without private gateway:
```
root@r-167-VM:~# cat /etc/cloudstack/cmdline.json
{
    "config": {
        "baremetalnotificationapikey": "V2l1u3wKJVan01h8kq63-5Y5Ia3VLEW1v_Z6i-31QIRJXlt5vkqaqf6DVcdK0jP3u79SW6X9pqJSLSwQP2c2Rw",
        "baremetalnotificationsecuritykey": "OXI16srCrxFBi-xOtEwcYqwLlMfSFTlTg66YHtXBBqR7HNN1us3HP5zWOKxfVmz4a3C1kUNLPrUH13gNmZlu4w",
        "disable_rp_filter": "true",
        "dns1": "8.8.8.8",
        "domain": "cs2cloud",
        "eth0ip": "169.254.0.42",
        "eth0mask": "255.255.0.0",
        "host": "192.168.22.61",
        "name": "r-167-VM",
        "port": "8080",
        "privategateway": "None",
        "redundant_router": "false",
        "template": "domP",
        "type": "vpcrouter",
        "vpccidr": "10.0.0.0/24"
    },
    "id": "cmdline"
```

Booting with private gateway:
```
root@r-167-VM:~# cat /etc/cloudstack/cmdline.json
{
    "config": {
        "baremetalnotificationapikey": "V2l1u3wKJVan01h8kq63-5Y5Ia3VLEW1v_Z6i-31QIRJXlt5vkqaqf6DVcdK0jP3u79SW6X9pqJSLSwQP2c2Rw",
        "baremetalnotificationsecuritykey": "OXI16srCrxFBi-xOtEwcYqwLlMfSFTlTg66YHtXBBqR7HNN1us3HP5zWOKxfVmz4a3C1kUNLPrUH13gNmZlu4w",
        "disable_rp_filter": "true",
        "dns1": "8.8.8.8",
        "domain": "cs2cloud",
        "eth0ip": "169.254.2.227",
        "eth0mask": "255.255.0.0",
        "host": "192.168.22.61",
        "name": "r-167-VM",
        "port": "8080",
        "privategateway": "10.201.10.1",
        "redundant_router": "false",
        "template": "domP",
        "type": "vpcrouter",
        "vpccidr": "10.0.0.0/24"
    },
    "id": "cmdline"
```

And:
```
cat cmdline
vpccidr=10.0.0.0/24 domain=cs2cloud dns1=8.8.8.8 privategateway=10.201.10.1 template=domP name=r-167-VM eth0ip=169.254.2.227 eth0mask=255.255.0.0 type=vpcrouter disable_rp_filter=true baremetalnotificationsecuritykey=OXI16srCrxFBi-xOtEwcYqwLlMfSFTlTg66YHtXBBqR7HNN1us3HP5zWOKxfVmz4a3C1kUNLPrUH13gNmZlu4w baremetalnotificationapikey=V2l1u3wKJVan01h8kq63-5Y5Ia3VLEW1v_Z6i-31QIRJXlt5vkqaqf6DVcdK0jP3u79SW6X9pqJSLSwQP2c2Rw host=192.168.22.61 port=8080
```

Logs:
```
2016-02-24 20:08:45,723 DEBUG [c.c.n.r.VpcVirtualNetworkApplianceManagerImpl] (Work-Job-Executor-4:ctx-458d4c52 job-1402/job-1403 ctx-d5355fca) (logid:5772906c) Set privategateway field in cmd_line.json to 10.201.10.1
```

* pr/1474:
  Handle private gateways more reliably
  Add private gateway IP to router initialization config

Signed-off-by: Will Stevens <williamstevens@gmail.com>
2016-05-12 11:02:55 -04:00
..
cs Merge pull request #1474 from remibergsma/47_private_gw_initial_config 2016-05-12 11:02:55 -04:00
baremetal-vr.py Removing "global" declaration from if block 2015-03-16 11:38:13 +01:00
baremetal_snat.sh restore barematel work after merge 2014-10-17 10:24:01 +02:00
bumpup_priority.sh CLOUDSTACK-5779: Moving bumpUpPriority, edithosts.sh, dnsmasq.sh to use routeProxy 2014-01-16 16:03:09 -08:00
checkbatchs2svpn.sh Move the system vm to a separate maven project. 2013-09-20 18:31:02 +08:00
checkrouter.sh make both check lines consistent 2015-12-28 17:06:58 +01:00
checks2svpn.sh Move the system vm to a separate maven project. 2013-09-20 18:31:02 +08:00
cloud-nic.sh Move the system vm to a separate maven project. 2013-09-20 18:31:02 +08:00
configure.py Merge pull request #1472 from remibergsma/47_fix_static_router_master_change 2016-05-12 11:01:55 -04:00
cs_cmdline.py ACL issues 2015-03-16 11:40:10 +01:00
cs_dhcp.py ACL issues 2015-03-16 11:40:10 +01:00
cs_firewallrules.py Pep8 changes that got lost with the strange double push request problem last time 2015-05-26 07:07:43 -04:00
cs_forwardingrules.py ACL issues 2015-03-16 11:40:10 +01:00
cs_guestnetwork.py ACL issues 2015-03-16 11:40:10 +01:00
cs_ip.py CLOUDSTACK-8991 - Process the IPs that have been removed 2015-10-28 19:51:57 +01:00
cs_loadbalancer.py ACL issues 2015-03-16 11:40:10 +01:00
cs_monitorservice.py ACL issues 2015-03-16 11:40:10 +01:00
cs_network_acl.py ACL issues 2015-03-16 11:40:10 +01:00
cs_remoteaccessvpn.py CLOUDSTACK-8690:Added remote access vpn and vpn users configuration 2015-09-09 10:50:50 +05:30
cs_site2sitevpn.py Fix unable to setup more than one Site2Site VPN Connection 2016-01-12 11:24:35 +01:00
cs_staticroutes.py CLOUDSTACK-9266: Make deleting static routes in private gw work 2016-01-30 06:25:00 +01:00
cs_vmdata.py ACL issues 2015-03-16 11:40:10 +01:00
cs_vmp.py ACL issues 2015-03-16 11:40:10 +01:00
cs_vpnusers.py CLOUDSTACK-8690:Added remote access vpn and vpn users configuration 2015-09-09 10:50:50 +05:30
dnsmasq.sh CLOUDSTACK-5779: Moving bumpUpPriority, edithosts.sh, dnsmasq.sh to use routeProxy 2014-01-16 16:03:09 -08:00
edithosts.sh CLOUDSTACK-7974: remove old hostname entry for a VM when adding a VM 2014-12-10 18:25:22 +05:30
get_template_version.sh ACL issues 2015-03-16 11:40:10 +01:00
ilb.sh CLOUDSTACK-6047: Make VR LB script accept a file name 2014-02-21 18:26:42 -08:00
ipassoc.sh CLOUDSTACK-7544: Fixed ip addr del issues in ipassoc 2014-09-15 14:54:13 +05:30
ipsectunnel.sh made iptables for the VPN connection more secure 2014-12-08 19:06:55 +01:00
line_edit.py Fancy line editor for Ian 2015-03-16 11:35:11 +01:00
loadbalancer.sh CLOUDSTACK-6047: Make VR LB script accept a file name 2014-02-21 18:26:42 -08:00
master.py CLOUDSTACK-9015 - Make sure the Backup router can talk to the Master router after a stop/start/reboot 2015-11-12 18:13:51 +01:00
merge.py Handle private gateways more reliably 2016-04-10 20:06:44 +02:00
monitor_service.sh CLOUDSTACK-6714: monitor script echo service command is added with quotes 2014-05-20 14:11:19 +05:30
netusage.sh Added code to configure netusage for vpc and domR devices 2015-03-16 11:35:27 +01:00
passwd_server CLOUDSTACK-7376 passwd_server attempts to start but terminates with the exit code 137 2014-09-17 09:28:44 -07:00
passwd_server_ip Fixed password server, fixed more firewall issues 2015-03-16 11:40:03 +01:00
passwd_server_ip.py CLOUDSTACK-9058 2015-11-12 08:05:57 +00:00
patchsystemvm.sh Remove vpc_router_svcs because they will be the same as any other router (soon) 2015-03-16 11:39:52 +01:00
prepare_pxe.sh restore barematel work after merge 2014-10-17 10:24:01 +02:00
savepassword.sh CLOUDSTACK-8331: have savepassword try all interfaces 2015-03-18 14:40:23 +05:30
set_redundant.py Java: Fixing the redundant flag for the router control nic and the guest network command; 2015-03-16 11:39:15 +01:00
test.sh Add missing license headers from recent branch merge 3c429ee 2015-03-18 11:03:54 +05:30
update_config.py Enhance VR performance by selectively executing tasks instead of brute-forcing 2016-01-18 11:40:59 +01:00
vmdata.py Fix PEP8 compliance 2015-03-16 11:38:07 +01:00
vpc_func.sh Move the system vm to a separate maven project. 2013-09-20 18:31:02 +08:00
vpc_netusage.sh Added code to configure netusage for vpc and domR devices 2015-03-16 11:35:27 +01:00
vpc_passwd_server systemvm: fix socat usage 2015-03-30 13:50:39 +05:30
vpc_snat.sh Move the system vm to a separate maven project. 2013-09-20 18:31:02 +08:00
vpc_staticroute.sh Move the system vm to a separate maven project. 2013-09-20 18:31:02 +08:00
vr_cfg.sh small cleanups 2015-09-26 20:33:21 +02:00