Public bug reported:

Hi,

When i try to invert some mac adress on match in config from:

# This is the network config written by 'subiquity'
network:
  ethernets:
    enp3s0f0:
      dhcp4: true
    enp3s0f1:
      dhcp4: false
      dhcp6: false
    enp4s0f0:
      dhcp4: false
      dhcp6: false
    enp4s0f1:
      dhcp4: false
      dhcp6: false
    RP1:
      dhcp4: false
      dhcp6: false
      addresses: [192.168.10.1/24]
      match:
        macaddress: 00:26:55:e6:03:62
      set-name: RP1
    RP2:
      dhcp4: false
      dhcp6: false
      match:
        macaddress: 00:26:55:e6:03:63
      set-name: RP2
    RP3:
      dhcp4: false
      dhcp6: false
      addresses: [192.168.20.1/24]
      match:
        macaddress: 00:26:55:e6:03:60
      set-name: RP3
    RP4:
      dhcp4: false
      dhcp6: false
      match:
        macaddress: 00:26:55:e6:03:61
      set-name: RP4
  version: 2


to

# This is the network config written by 'subiquity'
network:
  ethernets:
    enp3s0f0:
      dhcp4: true
    enp3s0f1:
      dhcp4: false
      dhcp6: false
    enp4s0f0:
      dhcp4: false
      dhcp6: false
    enp4s0f1:
      dhcp4: false
      dhcp6: false
    RP1:
      dhcp4: false
      dhcp6: false
      addresses: [192.168.10.1/24]
      match:
        macaddress: 00:26:55:e6:03:61
      set-name: RP1
    RP2:
      dhcp4: false
      dhcp6: false
      match:
        macaddress: 00:26:55:e6:03:60
      set-name: RP2
    RP3:
      dhcp4: false
      dhcp6: false
      addresses: [192.168.20.1/24]
      match:
        macaddress: 00:26:55:e6:03:63
      set-name: RP3
    RP4:
      dhcp4: false
      dhcp6: false
      match:
        macaddress: 00:26:55:e6:03:62
      set-name: RP4
  version: 2


###Error message:

sudo netplan try
Warning: Stopping systemd-networkd.service, but it can still be activated by:
  systemd-networkd.socket

An error occurred: Command '['ip', 'link', 'set', 'dev', 'RP4', 'name',
'RP1']' returned non-zero exit status 2.

Reverting.
Warning: Stopping systemd-networkd.service, but it can still be activated by:
  systemd-networkd.socket
Traceback (most recent call last):
  File "/usr/share/netplan/netplan/cli/commands/try_command.py", line 99, in 
command_try
    NetplanApply().command_apply(run_generate=True, sync=True, 
exit_on_error=False, state_dir=self.state)
  File "/usr/share/netplan/netplan/cli/commands/apply.py", line 234, in 
command_apply
    subprocess.check_call(['ip', 'link', 'set',
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ip', 'link', 'set', 'dev', 'RP4', 
'name', 'RP1']' returned non-zero exit status 2.

During handling of the above exception, another exception occurred:

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 310, in run_command
    self.func()
  File "/usr/share/netplan/netplan/cli/commands/try_command.py", line 81, in run
    self.run_command()
  File "/usr/share/netplan/netplan/cli/utils.py", line 310, in run_command
    self.func()
  File "/usr/share/netplan/netplan/cli/commands/try_command.py", line 113, in 
command_try
    self.revert()
  File "/usr/share/netplan/netplan/cli/commands/try_command.py", line 143, in 
revert
    NetplanApply().command_apply(run_generate=False, sync=True, 
exit_on_error=False, state_dir=tempdir)
  File "/usr/share/netplan/netplan/cli/commands/apply.py", line 234, in 
command_apply
    subprocess.check_call(['ip', 'link', 'set',
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ip', 'link', 'set', 'dev', 'RP4', 
'name', 'RP1']' returned non-zero exit status 2.

** Affects: plan (Ubuntu)
     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/1964832

Title:
  Error report on mac change in netplan try

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/plan/+bug/1964832/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to