Installing via IPv6 results in invalid netplan yaml

Bug #1751151 reported by Keno Fischer on 2018-02-22
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
netcfg (Ubuntu)
Critical
Mathieu Trudel-Lapierre
nplan (Ubuntu)
Undecided
Unassigned

Bug Description

I installed ubuntu 17.10 using the mini iso. The network is IPv6 only, so I used that (successfully) to do a network install of ubuntu 17.10. However, the resulting system
was unreachable over the network. The installer generated 01-netcfg.yaml looked like:

```
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    enp24s0f0:
      addresses: [ XXXX:XXX:X:XX::XX:XX/112 ]
      gateway6: XXXX:XXX:X:XX::XX:X
      nameservers:
          search: [ XXXXXXXXX.XX ]
          addresses:
              - XXXX:XXX:X:X::X
```

However,

`netplan apply` complains:

`Invalid YAML at //etc/netplan/01-netcfg.yaml line 7 column 23: found unexpected ':'`

This is remedied, by putting the ipv6 address into quotes, i.e.:
```
addresses: [ "XXXX:XXX:X:XX::XX:XX/112" ]
```

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1751151/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Keno Fischer (keno-o) on 2018-02-23
affects: ubuntu → debian-installer (Ubuntu)
tags: added: artful
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Good catch, this is a bug in netcfg.

affects: debian-installer (Ubuntu) → netcfg (Ubuntu)
Changed in netcfg (Ubuntu):
assignee: nobody → Mathieu Trudel-Lapierre (cyphermox)
importance: Undecided → Critical
status: New → Triaged
Changed in nplan (Ubuntu):
status: New → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package netcfg - 1.142ubuntu6

---------------
netcfg (1.142ubuntu6) bionic; urgency=medium

  * IPv6 addresses in netplan YAML usually need to be quoted, let's make sure
    they are always surrounded by double-quotes. (LP: #1751151)

 -- Mathieu Trudel-Lapierre <email address hidden> Sun, 18 Mar 2018 21:24:47 -0400

Changed in netcfg (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Thomas (t.c) wrote :

Hi, I am at Ubuntu 18.04 LTS (complete updated) and also can't apply my 01-netcfg.yaml:

root@bk1:~# cat /etc/netplan/01-netcfg.yaml
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    ens18:
      dhcp4: false
      dhcp6: false
      accept-ra: false
      addresses: [2a01:4f8:XX:XXXX::XX/64]
      gateway6: 2a01:4f8:XX:XXXX::X
      nameservers:
        addresses: addresses: [2a01:4f8:0:1::add:1010, 2a01:4f8:0:1::add:9999, 2a01:4f8:0:1::add:9898]

root@bk1:~# netplan apply
Invalid YAML at //etc/netplan/01-netcfg.yaml line 10 column 22: found unexpected ':'

It seams that the Bug still exist?!

root@bk1:~# apt policy netplan
netplan:
  Installiert: (keine)
  Installationskandidat: 1.10.1-5build1
  Versionstabelle:
     1.10.1-5build1 500
        500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages

Revision history for this message
Thomas (t.c) wrote :

ups, I pasted my modified nameserver line with the duplicate "addresses:" - please ignore this

Revision history for this message
Thomas (t.c) wrote :

ok, I also could add the quotes and now netplan accept the file:

root@bk1:~# cat /etc/netplan/01-netcfg.yaml
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    ens18:
      dhcp4: false
      dhcp6: false
      accept-ra: false
      addresses: [ "2a01:4f8:XX:XXXX::XX/64" ]
      gateway6: "2a01:4f8:XX:XXXX::X"
      nameservers:
        addresses: ["2a01:4f8:0:1::add:1010", "2a01:4f8:0:1::add:9999", "2a01:4f8:0:1::add:9898"]

Changed in nplan (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Daniel Axtens (daxtens) wrote :

Hi!

(I'm going through and trying to clean up some old bugs, so apologies if this is a bit out of the blue.)

I just want to confirm how you got this /etc/netplan/01-netcfg.yaml. If I understand you correctly it was created by the installer and you had to insert the quotes manually. Is that right? Or did you create it manually and it just didn't work until you inserted quotes?

Regards,
Daniel

Daniel Axtens (daxtens) on 2018-07-20
Changed in nplan (Ubuntu):
status: Confirmed → Incomplete
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers