[Bug 1924883] [NEW] Error when resetting netplan

Masato Yoshida 1924883 at bugs.launchpad.net
Sun Apr 18 01:37:36 UTC 2021


Public bug reported:

Create and set Brgidge of oepn vswich with netplan.
With the following settings, there is no problem with the network settings at boot time.
When changing the settings, the netplan command causes an error and the settings cannot be changed.

The cause is that the ovs-vsctl command is used to delete-> register when resetting.
An error occurs because the hwaddr ":" is passed to the command as it is.


/etc/netplan/01-netcfg.yaml
-----------------------------------------------------
network:
  ethernets:
    enp1s0:
      dhcp4: no
      dhcp6: no
  bridges:
    br-ex:
      addresses:
        - 192.168.0.1/24
        - 172.16.0.1/24
      gateway4: 192.168.0.254
      nameservers:
        search: [ develop.local ]
        addresses:
          - 192.168.0.254
      interfaces:
        - enp1s0
      openvswitch:
        other-config:
          hwaddr: 52:54:00:c7:8d:f3
  version: 2
-----------------------------------------------------


netplan apply
-----------------------------------------------------
ovs-vsctl: 52:54:00:c7:8d:f3: unexpected ":" parsing set of 1 or more strings
Traceback (most recent call last):
  File "/usr/sbin/netplan", line 23, in <module>
    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 257, in run_command
    self.func()
  File "/usr/share/netplan/netplan/cli/commands/apply.py", line 55, in run
    self.run_command()
  File "/usr/share/netplan/netplan/cli/utils.py", line 257, in run_command
    self.func()
  File "/usr/share/netplan/netplan/cli/commands/apply.py", line 154, in command_apply
    NetplanApply.process_ovs_cleanup(config_manager, old_files_ovs, restart_ovs, exit_on_error)
  File "/usr/share/netplan/netplan/cli/commands/apply.py", line 315, in process_ovs_cleanup
    apply_ovs_cleanup(config_manager, ovs_old, ovs_current)
  File "/usr/share/netplan/netplan/cli/ovs.py", line 168, in apply_ovs_cleanup
    clear_setting(t, iface, setting, val)
  File "/usr/share/netplan/netplan/cli/ovs.py", line 94, in clear_setting
    _del_dict(type, iface, split[1], split[2], value)
  File "/usr/share/netplan/netplan/cli/ovs.py", line 52, in _del_dict
    subprocess.check_call([OPENVSWITCH_OVS_VSCTL, 'remove', type, iface, column, key, value])
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/ovs-vsctl', 'remove', 'Bridge', 'br-ex', 'other-config', 'hwaddr', '52:54:00:c7:8d:f3']' returned non-zero exit status 1.
-----------------------------------------------------

ovs-vsctl list Bridge br-ex
-----------------------------------------------------
_uuid               : c3959c3c-459c-4cbd-956b-58464e59a35c
auto_attach         : []
controller          : [ba3026ab-8079-4ca3-b0d0-4027cc76900b]
datapath_id         : "0000525400c78df3"
datapath_type       : system
datapath_version    : "<unknown>"
external_ids        : {netplan="true", "netplan/global/set-fail-mode"=standalone, "netplan/mcast_snooping_enable"="false", "netplan/other-config/hwaddr"="52:54:00:c7:8d:f3", "netplan/rstp_enable"="false"}
fail_mode           : secure
flood_vlans         : []
flow_tables         : {}
ipfix               : []
mcast_snooping_enable: false
mirrors             : []
name                : br-ex
netflow             : []
other_config        : {hwaddr="52:54:00:c7:8d:f3", mac-table-size="50000"}
ports               : [5fc15fc7-f29d-4268-bc41-722b7809db0a, 7479d3a6-1ee0-418d-8bc0-2353853c0b3d, 7b7ea0dc-e70a-46e1-9c7f-07afa0dac5e2]
protocols           : [OpenFlow10, OpenFlow13, OpenFlow14]
rstp_enable         : false
rstp_status         : {}
sflow               : []
status              : {}
stp_enable          : false
-----------------------------------------------------

Change line 52 in /usr/share/netplan/netplan/cli/ovs.py.
subprocess.check_call([OPENVSWITCH_OVS_VSCTL, 'remove', type, iface, column, key, value]) -> subprocess.check_call([OPENVSWITCH_OVS_VSCTL, 'remove', type, iface, column, key, '"%s"' % (value)])

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: netplan.io 0.101-0ubuntu3~20.04.2 [modified: usr/share/netplan/netplan/cli/ovs.py]
ProcVersionSignature: Ubuntu 5.4.0-70.78-generic 5.4.94
Uname: Linux 5.4.0-70-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.16
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: LXQt
Date: Sun Apr 18 10:22:39 2021
InstallationDate: Installed on 2021-04-10 (7 days ago)
InstallationMedia: Ubuntu-Server 20.04.2 LTS "Focal Fossa" - Release amd64 (20210201.2)
SourcePackage: netplan.io
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: netplan.io (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug focal uec-images

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to netplan.io in Ubuntu.
Matching subscriptions: foundations-bugs
https://bugs.launchpad.net/bugs/1924883

Title:
  Error when resetting netplan

Status in netplan.io package in Ubuntu:
  New

Bug description:
  Create and set Brgidge of oepn vswich with netplan.
  With the following settings, there is no problem with the network settings at boot time.
  When changing the settings, the netplan command causes an error and the settings cannot be changed.

  The cause is that the ovs-vsctl command is used to delete-> register when resetting.
  An error occurs because the hwaddr ":" is passed to the command as it is.

  
  /etc/netplan/01-netcfg.yaml
  -----------------------------------------------------
  network:
    ethernets:
      enp1s0:
        dhcp4: no
        dhcp6: no
    bridges:
      br-ex:
        addresses:
          - 192.168.0.1/24
          - 172.16.0.1/24
        gateway4: 192.168.0.254
        nameservers:
          search: [ develop.local ]
          addresses:
            - 192.168.0.254
        interfaces:
          - enp1s0
        openvswitch:
          other-config:
            hwaddr: 52:54:00:c7:8d:f3
    version: 2
  -----------------------------------------------------

  
  netplan apply
  -----------------------------------------------------
  ovs-vsctl: 52:54:00:c7:8d:f3: unexpected ":" parsing set of 1 or more strings
  Traceback (most recent call last):
    File "/usr/sbin/netplan", line 23, in <module>
      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 257, in run_command
      self.func()
    File "/usr/share/netplan/netplan/cli/commands/apply.py", line 55, in run
      self.run_command()
    File "/usr/share/netplan/netplan/cli/utils.py", line 257, in run_command
      self.func()
    File "/usr/share/netplan/netplan/cli/commands/apply.py", line 154, in command_apply
      NetplanApply.process_ovs_cleanup(config_manager, old_files_ovs, restart_ovs, exit_on_error)
    File "/usr/share/netplan/netplan/cli/commands/apply.py", line 315, in process_ovs_cleanup
      apply_ovs_cleanup(config_manager, ovs_old, ovs_current)
    File "/usr/share/netplan/netplan/cli/ovs.py", line 168, in apply_ovs_cleanup
      clear_setting(t, iface, setting, val)
    File "/usr/share/netplan/netplan/cli/ovs.py", line 94, in clear_setting
      _del_dict(type, iface, split[1], split[2], value)
    File "/usr/share/netplan/netplan/cli/ovs.py", line 52, in _del_dict
      subprocess.check_call([OPENVSWITCH_OVS_VSCTL, 'remove', type, iface, column, key, value])
    File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['/usr/bin/ovs-vsctl', 'remove', 'Bridge', 'br-ex', 'other-config', 'hwaddr', '52:54:00:c7:8d:f3']' returned non-zero exit status 1.
  -----------------------------------------------------

  ovs-vsctl list Bridge br-ex
  -----------------------------------------------------
  _uuid               : c3959c3c-459c-4cbd-956b-58464e59a35c
  auto_attach         : []
  controller          : [ba3026ab-8079-4ca3-b0d0-4027cc76900b]
  datapath_id         : "0000525400c78df3"
  datapath_type       : system
  datapath_version    : "<unknown>"
  external_ids        : {netplan="true", "netplan/global/set-fail-mode"=standalone, "netplan/mcast_snooping_enable"="false", "netplan/other-config/hwaddr"="52:54:00:c7:8d:f3", "netplan/rstp_enable"="false"}
  fail_mode           : secure
  flood_vlans         : []
  flow_tables         : {}
  ipfix               : []
  mcast_snooping_enable: false
  mirrors             : []
  name                : br-ex
  netflow             : []
  other_config        : {hwaddr="52:54:00:c7:8d:f3", mac-table-size="50000"}
  ports               : [5fc15fc7-f29d-4268-bc41-722b7809db0a, 7479d3a6-1ee0-418d-8bc0-2353853c0b3d, 7b7ea0dc-e70a-46e1-9c7f-07afa0dac5e2]
  protocols           : [OpenFlow10, OpenFlow13, OpenFlow14]
  rstp_enable         : false
  rstp_status         : {}
  sflow               : []
  status              : {}
  stp_enable          : false
  -----------------------------------------------------

  Change line 52 in /usr/share/netplan/netplan/cli/ovs.py.
  subprocess.check_call([OPENVSWITCH_OVS_VSCTL, 'remove', type, iface, column, key, value]) -> subprocess.check_call([OPENVSWITCH_OVS_VSCTL, 'remove', type, iface, column, key, '"%s"' % (value)])

  ProblemType: Bug
  DistroRelease: Ubuntu 20.04
  Package: netplan.io 0.101-0ubuntu3~20.04.2 [modified: usr/share/netplan/netplan/cli/ovs.py]
  ProcVersionSignature: Ubuntu 5.4.0-70.78-generic 5.4.94
  Uname: Linux 5.4.0-70-generic x86_64
  ApportVersion: 2.20.11-0ubuntu27.16
  Architecture: amd64
  CasperMD5CheckResult: pass
  CurrentDesktop: LXQt
  Date: Sun Apr 18 10:22:39 2021
  InstallationDate: Installed on 2021-04-10 (7 days ago)
  InstallationMedia: Ubuntu-Server 20.04.2 LTS "Focal Fossa" - Release amd64 (20210201.2)
  SourcePackage: netplan.io
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1924883/+subscriptions



More information about the foundations-bugs mailing list