Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static routes existing in ConfigDrive are not applied #62

Open
reith opened this issue Dec 22, 2020 · 3 comments
Open

Static routes existing in ConfigDrive are not applied #62

reith opened this issue Dec 22, 2020 · 3 comments

Comments

@reith
Copy link

reith commented Dec 22, 2020

Hi,

I'm provisioning a Windows image by ConfigDrive with bellow openstack/latest/network_data.json:

{
  "links": [
    {
      "id": "default-windows-eth1",
      "name": "eth1",
      "type": "vif",
      "ethernet_mac_address": "0e:16:9b:84:61:fd",
      "mtu": 1500
    }
  ],
  "networks": [
    {
      "id": "default-windows-eth1",
      "type": "ipv4",
      "link": "default-windows-eth1",
      "ip_address": "10.101.0.234",
      "netmask": "255.255.255.0",
      "routes": [
        {
          "network": "172.19.2.0",
          "netmask": "255.255.255.0",
          "gateway": "10.101.0.1"
        }
      ]
    }
  ],
  "services": [
    {
      "type": "dns",
      "address": "1.1.1.1"
    },
    {
      "type": "dns",
      "address": "8.8.8.8"
    }
  ]
}

I expect a route to 172.19.2.0/24 being set, but it's all I'd get in Windows:

network_data

I read openstack and configdrive tests and looks routes being parsed correctly but I don't see any test targeting routes in cloudbaseinit/tests/osutils/test_windows.py and they are all about static network address setting. Further investigation showed NetworkConfigPlugin itself just set network interface IP addresses and consequently just local routes. There is add_static_route function but looks it's unrelated to my case which datasource is ConfigDrive.

So IIUC ConfigDrive Network Routes are being ignored now. Am I right?

@reith reith changed the title Static routes existing in ConfigDrive is not applied Static routes existing in ConfigDrive are not applied Dec 22, 2020
@reith
Copy link
Author

reith commented Dec 22, 2020

I pushed some unpolished work you can see here. I have no idea about codes trying to handle legacy and new API and my code lacking those. It works for Windows server 2019 at least.

@reith
Copy link
Author

reith commented Feb 9, 2021

Hi,

I would appreciate any thoughts or suggestions about this. Is it totally out of scope of this project? in that case it would be nice to document that cloudbase-init does not handle static routes, except for default gateway. Do you think it's good to cover static routes like cloud-init do?

I love to have this functionality in cloudbase-init rather than our private fork that would diverge us from upcomming developments and I should reach a decision at some point.

@ader1990
Copy link
Member

ader1990 commented Feb 9, 2021

Hello,

Thank you for the contribution. Currently, we use the OpenStack review/gating for the patches, and Github for issue management. Can you add the patch to https://review.opendev.org/?

Here is a good how to for achieving this:
https://www.openstack.org/blog/submit-your-first-openstack-patch-in-three-steps/
https://docs.openstack.org/zaqar/latest/contributor/first_patch.html - you need to replace zaqar with cloudbase-init.

I would gladly get the code that you wrote and put it to gerrit, but because of how licensing works, you are required to sign the CLA.

Thank you,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants