This issue doesn't reproduce on 22.04 Live server image, its
'/usr/lib/systemd/system/systemd-networkd.socket' is same with 22.04
Desktop image, so looks like shutdown.target in systemd-networkd.socket
is not the root cause. I think the systemd dependence is quite different
between Desktop and Server images, please systemd experts look into
this.

By running below command on Ubuntu 21.04 Desktop, Ubuntu 22.04 Desktop
and Ubuntu 22.04 Server VMs, got some .svg files, attached them in
svg_files.zip to this bug for your reference.

1. systemd-analyze plot > plot2104_desktop.svg
2. systemd-analyze plot > plot2204_desktop.svg
3. systemd-analyze plot > plot2204_server.svg
4. systemd-analyze dot 'systemd-networkd.service' | dot -Tsvg > 
dot2104_desktop.svg
5. systemd-analyze dot 'systemd-networkd.service' | dot -Tsvg > 
dot2204_desktop.svg
6. systemd-analyze dot 'systemd-networkd.service' | dot -Tsvg > 
dot2204_server.svg


According to the plot output, systemd-networkd starts late only on Ubuntu 22.04 
Desktop VM, this leads to customization command 'netplan apply' fail.

** Attachment added: "svg files"
   
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1962843/+attachment/5566877/+files/svg_files.zip

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1962843

Title:
  Guest OS customization fail for ubuntu 22.04 desktop in vsphere due to
  adding 'shutdown.target' in file /usr/lib/systemd/system/systemd-
  networkd.socket

Status in systemd package in Ubuntu:
  Confirmed

Bug description:
  Problem:
  Guest OS customization fail for ubuntu 22.04 desktop in vsphere due to  
adding 'shutdown.target' in file /usr/lib/systemd/system/systemd-networkd.socket

  Analysis
  Compared with Ubuntu 21.04 desktop image, there is a difference in 
/usr/lib/systemd/system/systemd-networkd.socket, "shutdown.target" is added to 
Before and Conflicts options.

  Ubuntu 22.04
    [Unit]
    Description=Network Service Netlink Socket
    Documentation=man:systemd-networkd.service(8) man:rtnetlink(7)
    ConditionCapability=CAP_NET_ADMIN
    DefaultDependencies=no
    Before=sockets.target shutdown.target
    Conflicts=shutdown.target
  Ubuntu 21.04
    [Unit]
    Description=Network Service Netlink Socket
    Documentation=man:systemd-networkd.service(8) man:rtnetlink(7)
    ConditionCapability=CAP_NET_ADMIN
    DefaultDependencies=no
    Before=sockets.target

  After removed "shutdown.target" from /usr/lib/systemd/system/systemd-
  networkd.socket in ubuntu 22.04 desktop, this issue did NOT reproduce
  since systemd-networkd.service starts much earlier

  So the root cause of the issue is that adding 'shutdown.target' leads
  systemd-networkd.service starts late which makes customization command
  '/usr/sbin/netplan apply' fail.

  Not sure why adding 'shutdown.target' to file
  /usr/lib/systemd/system/systemd-networkd.socket ?

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


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to