@juliank - where did you see these errors? I booted with a freshly
created autopkgtest jammy vm, installed the package from proposed and it
worked fine.

Please see my previous comments-- this does not seem to be a bug in ufw
since it is using the documented unit setup that systemd recommends for
firewall software (and that other firewall software use, such as
firewalld) and this has been in Debian for some time now with no bug
reports (indeed, it solved issues). Your initial report shows that lots
of other units have the ordering cycle issue that you mentioned so I'm
not sure why ufw would be singled out.

So we're all on the same page, this was the change:

-DefaultDependencies=no
-Before=network.target
+Before=network-pre.target
+Wants=network-pre.target

and I'll add this from debian/changelog:
+    - use Before and Wants on network-pre.target. Per systemd documentation,
+      "network-pre.target is a target that may be used to order services
+      before any network interface is configured. Its primary purpose is for
+      usage with firewall services". Because network-pre.target is a passive
+      unit, "services that want to be run before the network is configured
+      should place Before=network-pre.target and also set
+      Wants=network-pre.target to pull it in"
+    - remove DefaultDependencies=no so that we pull in default dependencies
+      for "basic system initialization". While ufw is meant to come up before
+      networking, there is no reason why it shouldn't come up after sysinit.
+      This should help make ufw startup more robust on systems that need
+      something from sysinit.

The ufw unit itself does very little unless ufw is enabled since
/lib/ufw/ufw-init exits very quickly when it is not enabled. As such, it
seems to me that the ufw upload may have uncovered a latent issue in our
early boot (but that wouldn't be a bug in ufw itself) where Ubuntu may
not be supporting the documented behavior for network-pre.target.

Finally, it has been a couple of months since this report; is it
possible to rerun wherever this was run to see if it is still an issue
(as mentioned, no bug reports in Debian and so perhaps things floated in
that resolved this)? I would rerun autopkgtests, but they all have
passed.

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

Title:
  ufw 0.36.1-3 introduces ordering cycle, breaking network

Status in ufw package in Ubuntu:
  Triaged

Bug description:
                                                                                
                               [    2.065178] systemd[1]: 
systemd-networkd.service: Found ordering cycle on network-pre.target/start
                                                                                
                               [    2.065276] systemd[1]: 
systemd-networkd.service: Found dependency on ufw.service/start
                                                                                
                               [    2.065356] systemd[1]: 
systemd-networkd.service: Found dependency on basic.target/start
                                                                                
                               [    2.065422] systemd[1]: 
systemd-networkd.service: Found dependency on sockets.target/start
                                                                                
                               [    2.065487] systemd[1]: 
systemd-networkd.service: Found dependency on cloud-init-hotplugd.socket/star
  t
                                                                                
                               [    2.065561] systemd[1]: 
systemd-networkd.service: Found dependency on sysinit.target/start
                                                                                
                               [    2.065626] systemd[1]: 
systemd-networkd.service: Found dependency on cloud-init.service/start
                                                                                
                               [    2.065700] systemd[1]: 
systemd-networkd.service: Found dependency on systemd-networkd-wait-online.se
  rvice/start
                                                                                
                               [    2.065795] systemd[1]: 
systemd-networkd.service: Found dependency on systemd-networkd.service/start
                                                                                
                               [    2.065870] systemd[1]: 
systemd-networkd.service: Job network-pre.target/start deleted to break 
ordering cycle starting with systemd-networkd.service/start
                                                                                
                               [[0;1;31m SKIP [0m] Ordering cycle found, 
skipping [0;1;39mNetwork (Pre)[0m

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ufw/+bug/1950039/+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