Tracked in Github Issues as https://github.com/canonical/cloud-
init/issues/4094

** Bug watch added: github.com/canonical/cloud-init/issues #4094
   https://github.com/canonical/cloud-init/issues/4094

** Changed in: cloud-init
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/2014226

Title:
  cloud-init crashes with IPv6 routes

Status in cloud-init:
  Expired

Bug description:
  
  I have static routes specified for two networks, and during cloud-init an 
error occurs as it tries to make use of NETMASK1.

    # Network 2
    eth1:
      addresses: # List of IP[v4,v6] addresses to assign to this interface
        - 2001:db8:abcd:abce:fe::1000/96

      routes: # List of static routes for this interface
        - to: 2001:db8:abcd:abce:fe::0/96
          via: 2001:db8:abcd:bbce:fe::2

    # Network 3
    eth2:
      addresses: # List of IP[v4,v6] addresses to assign to this interface
        - 2001:db8:abcd:abcf:fe::1000/96

      routes: # List of static routes for this interface
        - to: 2001:db8:abcd:abcf:fe::0/96
          via: 2001:db8:abcd:bbcf:fe::2

  Traceback (most recent call last):
    File "/usr/lib/python3.6/site-packages/cloudinit/cmd/main.py", line 761, in 
status_wrapper
      ret = functor(name, args)
    File "/usr/lib/python3.6/site-packages/cloudinit/cmd/main.py", line 433, in 
main_init
      init.apply_network_config(bring_up=bring_up_interfaces)
    File "/usr/lib/python3.6/site-packages/cloudinit/stages.py", line 926, in 
apply_network_config
      netcfg, bring_up=bring_up
    File "/usr/lib/python3.6/site-packages/cloudinit/distros/__init__.py", line 
233, in apply_network_config
      self._write_network_state(network_state)
    File "/usr/lib/python3.6/site-packages/cloudinit/distros/__init__.py", line 
129, in _write_network_state
      renderer.render_network_state(network_state)
    File "/usr/lib/python3.6/site-packages/cloudinit/net/sysconfig.py", line 
1011, in render_network_state
      base_sysconf_dir, network_state, self.flavor, templates=templates
    File "/usr/lib/python3.6/site-packages/cloudinit/net/sysconfig.py", line 
1002, in _render_sysconfig
      contents[cpath] = iface_cfg.routes.to_string(proto)
    File "/usr/lib/python3.6/site-packages/cloudinit/net/sysconfig.py", line 
199, in to_string
      netmask_value = str(self._conf["NETMASK" + index])
  KeyError: 'NETMASK1'

  Additional Info:
  1. Using KVM on a private server
  2. See above configuration details that cause an issue. Note in the 
documentation I could only find an example of an ipv4 route, so maybe you could 
enhance the documentation with an example for ipv6 if possible.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/2014226/+subscriptions


-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to