yml yaml file extension

Bug #1815734 reported by Thomas Kriechbaumer
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Netplan
Triaged
Wishlist
Unassigned

Bug Description

netplan currently only accepts *.yaml files.
However, it is quite common for YAML files to have a .yml file extension.
https://en.wikipedia.org/wiki/YAML

I would propose allowing both file extensions when searching for config files, i.e., here:
https://github.com/CanonicalLtd/netplan/blob/b2c6d87503f86e684c8aa693fe2295a0c27768b0/netplan/configmanager.py#L98 (and possible other places)

It would also be nice for netplan to at least give a "No config files found!" error message to avoid endless frustration with sysadmins wondering why their configs are not found and applied.

tranadols (tramadols)
description: updated
Revision history for this message
Thomas Kriechbaumer (w-thomas-q) wrote :

Somebody is defacing the URLs in my initial bug description!

The links I provided are:
https://en.wikipedia.org/wiki/YAML

https://github.com/CanonicalLtd/netplan/blob/b2c6d87503f86e684c8aa693fe2295a0c27768b0/netplan/configmanager.py#L98 (and possible other places)

description: updated
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Sure. This seems like a simple fix / enhancement.

Changed in netplan:
status: New → Triaged
importance: Undecided → Wishlist
Changed in netplan.io (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist
tags: added: bitesize
Revision history for this message
Scott Mcdermott (smemsh) wrote :

just got burned by this. could not figure out why it wouldn't work, spent some time banging head. there's no error emitted, just fails to produce anything.

lack of error is arguably worse than not globbing for the standard extension of yaml files...

Revision history for this message
Lukas Märdian (slyon) wrote :

In a discussion upstream the .yml file extension was rejected, because it isn't part of the YAML standard:
https://github.com/CanonicalLtd/netplan/pull/106

But it was agreed upon, that netplan should warn users if they try to load a valid netplan config from a .yml file and note that they should be using the .yaml file extension.

tags: added: id-5f490e4269e0467242424d46
Lukas Märdian (slyon)
Changed in netplan.io (Ubuntu):
status: Triaged → Invalid
no longer affects: netplan.io (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.