[Bug 1975678] Re: Netplan generates the wrong YAML value when setting activation-mode=off
** Changed in: netplan.io (Ubuntu Impish) Importance: Undecided => Low ** Changed in: netplan.io (Ubuntu Jammy) Importance: Undecided => Low ** Changed in: netplan.io (Ubuntu Impish) Status: New => Triaged ** Changed in: netplan.io (Ubuntu Jammy) Status: New => Triaged -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1975678 Title: Netplan generates the wrong YAML value when setting activation- mode=off To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1975678/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1975678] Re: Netplan generates the wrong YAML value when setting activation-mode=off
** Tags removed: rls-ff-incoming rls-kk-incoming -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1975678 Title: Netplan generates the wrong YAML value when setting activation- mode=off To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1975678/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1975678] Re: Netplan generates the wrong YAML value when setting activation-mode=off
** Tags added: fr-2415 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1975678 Title: Netplan generates the wrong YAML value when setting activation- mode=off To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1975678/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1975678] Re: Netplan generates the wrong YAML value when setting activation-mode=off
A quick workaround seems to be quoting the parameters like this: netplan set "ethernets.eth0.activation-mode='off'" ** Changed in: netplan.io (Ubuntu Kinetic) Importance: Medium => Low ** Changed in: netplan.io (Ubuntu Focal) Importance: Medium => Low -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1975678 Title: Netplan generates the wrong YAML value when setting activation- mode=off To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1975678/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1975678] Re: Netplan generates the wrong YAML value when setting activation-mode=off
This seems to be due to the (old) Python YAML parser being in conflict with libnetplan's actual C YAML parser. Apparently pyyaml interprets "off" as a boolean ('False') by default in yaml.safe_load(value) (`set_tree = self.parse_key(key, yaml.safe_load(value))`), while it is supposed to be an actual string ("off") for activation-mode. Looks like it was broken ever since netplan set was introduced (v0.101) and just recently got fixed via https://github.com/canonical/netplan/pull/254 (https://github.com/canonical/netplan/commit/bdb4f9846c8f40275c09a28bed04d8436cbbeffc to be specific) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1975678 Title: Netplan generates the wrong YAML value when setting activation- mode=off To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1975678/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1975678] Re: Netplan generates the wrong YAML value when setting activation-mode=off
** Changed in: netplan.io (Ubuntu Kinetic) Status: New => Triaged ** Changed in: netplan.io (Ubuntu Kinetic) Importance: Undecided => Medium ** Changed in: netplan.io (Ubuntu Focal) Status: New => Triaged ** Changed in: netplan.io (Ubuntu Focal) Importance: Undecided => Medium ** Tags added: rls-ff-incoming rls-kk-incoming -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1975678 Title: Netplan generates the wrong YAML value when setting activation- mode=off To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1975678/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1975678] Re: Netplan generates the wrong YAML value when setting activation-mode=off
** Description changed: - When setting activation-mode=off, netplan generates the incorrect value - in the YAML file (activation-mode: false), causing it to fail due to - incorrect syntax. + When setting activation-mode=off on Ubuntu 20.04/Ubuntu Core 20, netplan + generates the incorrect value in the YAML file (activation-mode: false), + causing it to fail due to incorrect syntax. $ sudo netplan set ethernets.eth0.activation-mode=off Traceback (most recent call last): - File "/usr/sbin/netplan", line 23, in - netplan.main() - File "/usr/share/netplan/netplan/cli/core.py", line 50, in main - self.run_command() - File "/usr/share/netplan/netplan/cli/utils.py", line 247, in run_command - self.func() - File "/usr/share/netplan/netplan/cli/commands/set.py", line 55, in run - self.run_command() - File "/usr/share/netplan/netplan/cli/utils.py", line 247, in run_command - self.func() - File "/usr/share/netplan/netplan/cli/commands/set.py", line 126, in command_set - self.write_file(subtree, hint + '.yaml', self.root_dir) - File "/usr/share/netplan/netplan/cli/commands/set.py", line 193, in write_file - libnetplan.netplan_parse(tmpp) - File "/usr/share/netplan/netplan/libnetplan.py", line 64, in netplan_parse - raise Exception(err.contents.message.decode('utf-8')) + File "/usr/sbin/netplan", line 23, in + netplan.main() + File "/usr/share/netplan/netplan/cli/core.py", line 50, in main + self.run_command() + File "/usr/share/netplan/netplan/cli/utils.py", line 247, in run_command + self.func() + File "/usr/share/netplan/netplan/cli/commands/set.py", line 55, in run + self.run_command() + File "/usr/share/netplan/netplan/cli/utils.py", line 247, in run_command + self.func() + File "/usr/share/netplan/netplan/cli/commands/set.py", line 126, in command_set + self.write_file(subtree, hint + '.yaml', self.root_dir) + File "/usr/share/netplan/netplan/cli/commands/set.py", line 193, in write_file + libnetplan.netplan_parse(tmpp) + File "/usr/share/netplan/netplan/libnetplan.py", line 64, in netplan_parse + raise Exception(err.contents.message.decode('utf-8')) Exception: /tmp/netplan-set_o73ewgp4/etc/netplan/50-cloud-init.yaml:4:24: Error in network definition: Value of 'activation-mode' needs to be 'manual' or 'off' - activation-mode: false -^ + activation-mode: false + ^ -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1975678 Title: Netplan generates the wrong YAML value when setting activation- mode=off To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1975678/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1975678] Re: Netplan generates the wrong YAML value when setting activation-mode=off
** Also affects: netplan.io (Ubuntu Impish) Importance: Undecided Status: New ** Also affects: netplan.io (Ubuntu Jammy) Importance: Undecided Status: New ** Also affects: netplan.io (Ubuntu Focal) Importance: Undecided Status: New ** Also affects: netplan.io (Ubuntu Kinetic) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1975678 Title: Netplan generates the wrong YAML value when setting activation- mode=off To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1975678/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs