• Ubuntu 20.04 – Netplan breaks after apt update

    Home » Forums » AskWoody support » Linux for the Home user » Linux – all distros » Ubuntu 20.04 – Netplan breaks after apt update

    Author
    Topic
    #2340035

    Ubuntu 20.04 Server I’ve got a strange issue that I only get on a vm and not on any baremetal installs.

    After doing a clean install and configuring the network, netplan works as expected. However after running atp update, netplan breaks. The error I get is below

    root@wozdc01:/home/zeus# netplan try
    Job for netplan-wpa-wlp4s0.service canceled.
    
    An error occurred: Command '['systemctl', 'stop', 'systemd-networkd.service', 'netplan-wpa-*.service']' returned non-zero exit status 1.
    
    Reverting.
    Job for netplan-wpa-wlp4s0.service canceled.
    Traceback (most recent call last):
      File "/usr/share/netplan/netplan/cli/commands/try_command.py", line 84, in command_try
        NetplanApply().command_apply(run_generate=True, sync=True, exit_on_error=False)
      File "/usr/share/netplan/netplan/cli/commands/apply.py", line 160, in command_apply
        utils.systemctl_networkd('stop', sync=sync, extra_services=wpa_services)
      File "/usr/share/netplan/netplan/cli/utils.py", line 125, in systemctl_networkd
        subprocess.check_call(command)
      File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['systemctl', 'stop', 'systemd-networkd.service', 'netplan-wpa-*.service']' returned non-zero exit status 1.
    
    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 257, in run_command
        self.func()
      File "/usr/share/netplan/netplan/cli/commands/try_command.py", line 66, 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/try_command.py", line 95, in command_try
        self.revert()
      File "/usr/share/netplan/netplan/cli/commands/try_command.py", line 118, in revert
        NetplanApply().command_apply(run_generate=False, sync=True, exit_on_error=False)
      File "/usr/share/netplan/netplan/cli/commands/apply.py", line 160, in command_apply
        utils.systemctl_networkd('stop', sync=sync, extra_services=wpa_services)
      File "/usr/share/netplan/netplan/cli/utils.py", line 125, in systemctl_networkd
        subprocess.check_call(command)
      File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['systemctl', 'stop', 'systemd-networkd.service', 'netplan-wpa-*.service']' returned non-zero exit status 1.
    

    This error happens regardless if any changes have been made to yaml files.

    Below is the list of packages that apt updated

      accountsservice alsa-ucm-conf apparmor apport apt apt-utils base-files bash bcache-tools bind9-dnsutils
      bind9-host bind9-libs bolt bsdutils busybox-initramfs busybox-static ca-certificates command-not-found
      cryptsetup cryptsetup-bin cryptsetup-initramfs cryptsetup-run curl dbus dbus-user-session distro-info-data fdisk
      finalrd fwupd fwupd-signed gcc-10-base gir1.2-glib-2.0 gir1.2-packagekitglib-1.0 glib-networking
      glib-networking-common glib-networking-services grub-common grub-efi-amd64 grub-efi-amd64-bin
      grub-efi-amd64-signed grub2-common initramfs-tools initramfs-tools-bin initramfs-tools-core intel-microcode
      krb5-locales landscape-common language-selector-common less libaccountsservice0 libapparmor1 libapt-pkg6.0
      libasound2 libasound2-data libblkid1 libbrotli1 libc-bin libc6 libcryptsetup12 libcurl3-gnutls libcurl4
      libdbus-1-3 libdns-export1109 libdrm-common libdrm2 libefiboot1 libefivar1 libfdisk1 libfreetype6 libfwupd2
      libfwupdplugin1 libgcc-s1 libgirepository-1.0-1 libglib2.0-0 libglib2.0-bin libglib2.0-data libgnutls30
      libgssapi-krb5-2 libisc-export1105 libjson-c4 libk5crypto3 libkrb5-3 libkrb5support0 libldap-2.4-2
      libldap-common liblzma5 libmaxminddb0 libmount1 libnetplan0 libnss-systemd libp11-kit0 libpackagekit-glib2-18
      libpam-modules libpam-modules-bin libpam-runtime libpam-systemd libpam0g libparted2 libperl5.30 libplymouth5
      libproxy1v5 libpython3.8 libpython3.8-minimal libpython3.8-stdlib libseccomp2 libsmartcols1 libsqlite3-0
      libssh-4 libssl1.1 libstdc++6 libsystemd0 libudev1 libuuid1 libuv1 libx11-6 libx11-data linux-base
      linux-firmware linux-generic linux-headers-generic linux-image-generic locales login lshw lsof mdadm mount
      netplan.io open-iscsi open-vm-tools openssh-client openssh-server openssh-sftp-server openssl packagekit
      packagekit-tools parted passwd perl perl-base perl-modules-5.30 plymouth plymouth-theme-ubuntu-text
      python-apt-common python3-apport python3-apt python3-commandnotfound python3-cryptography python3-distupgrade
      python3-distutils python3-gdbm python3-lib2to3 python3-problem-report python3-software-properties
      python3-update-manager python3-urllib3 python3.8 python3.8-minimal rsyslog shim shim-signed snapd
      software-properties-common sosreport strace sudo systemd systemd-sysv systemd-timesyncd tar thermald tmux tzdata
      ubuntu-minimal ubuntu-release-upgrader-core ubuntu-server ubuntu-standard udev unattended-upgrades
      update-manager-core update-notifier-common util-linux uuid-runtime wireless-regdb xz-utils zlib1g
    

    I have done a clean install several times and recreated the vm from scratch. The host has also been rebooted.

    Any ideas?

    Rgds, Zeus

    Viewing 0 reply threads
    Author
    Replies
    • #2341543

      So far, I’ve tracked the issue to one of the following packages.

      accountsservice alsa-ucm-conf apparmor apport apt apt-utils base-files bash bcache-tools bind9-dnsutils bind9-host bind9-libs bolt bsdutils busybox-initramfs busybox-static ca-certificates command-not-found cryptsetup cryptsetup-bin cryptsetup-initramfs cryptsetup-run curl dbus dbus-user-session distro-info-data fdisk finalrd fwupd fwupd-signed gcc-10-base gir1.2-glib-2.0 gir1.2-packagekitglib-1.0 glib-networking glib-networking-common glib-networking-services grub-common grub-efi-amd64 grub-efi-amd64-bin grub-efi-amd64-signed grub2-common initramfs-tools initramfs-tools-bin initramfs-tools-core intel-microcode krb5-locales landscape-common language-selector-common less libaccountsservice0 libapparmor1 libapt-pkg6.0 libasound2 libasound2-data libblkid1 libbrotli1 libc-bin libc6 libcryptsetup12 libcurl3-gnutls libcurl4 libdbus-1-3 libdns-export1109 libdrm-common libdrm2 libefiboot1 libefivar1 libfdisk1 libfreetype6 libfwupd2 libfwupdplugin1 libgcc-s1 libgirepository-1.0-1 libglib2.0-0 libglib2.0-bin libglib2.0-data libgnutls30 libgssapi-krb5-2 libisc-export1105 libjson-c4 libk5crypto3 libkrb5-3 libkrb5support0 libldap-2.4-2 libldap-common liblzma5 libmaxminddb0 libmount1 libnetplan0 libnss-systemd libp11-kit0 libpackagekit-glib2-18 libpam-modules libpam-modules-bin libpam-runtime libpam-systemd libpam0g libparted2 libperl5.30 libplymouth5 libproxy1v5

      Although the error is different, it seems that one of these changes the way the netplan scripts work or something they use.

      Rgds, Zeus

      • This reply was modified 4 years, 4 months ago by zeuswoz.
    Viewing 0 reply threads
    Reply To: Ubuntu 20.04 – Netplan breaks after apt update

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: