GitHub user remibergsma opened a pull request:

    https://github.com/apache/cloudstack/pull/1474

    47 private gw initial config

    When 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
    ```

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/remibergsma/cloudstack 
47_private_gw_initial_config

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/1474.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1474
    
----

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to