Hi David,This ticket is for the source-list, which is for dns resolver and the 
config is as follows.
  version: 1
  config:
  - type: physical
    name: eth0
  - type: nameserver
    address: ['xx.xx.xx.xx']    sortlist: ['xx.xx.xx.xx', 'xx.xx.xx.xx'] I 
believe the only thing that is needed for cloud-init is to add the keyword 
"sort-list" to the case list, so that it is written to /etc/resolv.conf.
As for source-based routing, there is no config recognized by cloud-init.  It's 
just straight network statements, name, ip, netmask, etc.  The work is done by 
a shell script in the if-up.d directory as follows:
#!/bin/sh
set -e
if [ "$METHOD" = loopback ]; then
    exit 0
elif [ "$METHOD" = dhcp ]; then
    exit 0
elif [ "$METHOD" = static ]; then
    if [ "$IF_GATEWAY" ]; then
echo "exiting..."
        exit 0
    fi
fi
IF_GATEWAY="$(echo "$IF_ADDRESS" | cut -d. -f1-3).254"
ip route flush table "$IFACE"
ip route add default via "$IF_GATEWAY" table "$IFACE"
ip rule del lookup "$IFACE" || true
ip rule add from "$IF_ADDRESS" lookup "$IFACE"

Basically, if the interface is a loopback, dhcp, or already has a
default gateway, it does nothing. For any other interface, it adds a
default route to the route table causing all responses to inbound
traffic to use the same interface to respond on. The email I sent late
last night to your email, discusses what I've been able to find, in
terms of using systemd-networkd, but requires ver 235, as well as some
additional work in netplan and cloud-init to recognize all the values.

P.S. systemd 235, which I saw is proposed for bionic beaver, adds quite
a few nice functions, including "vrf".


      From: David Britton <david.brit...@canonical.com>
 To: jfgibb...@yahoo.com 
 Sent: Wednesday, November 1, 2017 4:50 PM
 Subject: [Bug 1704402] Re: dns-sortlist not recognized in network-config
   
Hi James -- do you have an example #cloud-config that you can attach
that sets up source-based routing (please sanitize first if required)?

Thanks.

-- 
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/1704402

Title:
  dns-sortlist not recognized in network-config

Status in cloud-init:
  Confirmed
Status in cloud-init package in Ubuntu:
  New

Bug description:
  I'm using LXD with Ubuntu images, and cloud-init to do initial setup
  of container.  I'm not sure, but I believe the issue is in cloud-init,
  but would appreciate a pointer to the right location if not.
  Currently using network-config meta data, cloud-init takes the
  following config and converts correctly:

  version: 1
  config:
  - type: physical
    name: eth0
  - type: nameserver
    address: ['xx.xx.xx.xx']
    search: ['example.local', 'example.org']

  However including the following line is not recognized:

    sortlist: ['xx.xx.xx.xx', 'xx.xx.xx.xx']

  Please add support for this standard nameserver option.

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

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1704402

Title:
  dns-sortlist not recognized in network-config

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to