← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2003877] [NEW] cyclic dependencies, cloud-init.target has After=mutli-user.target

 

Public bug reported:

cloud-init.target is ordered after mutli-user.target as it contains the After=mutli-user.target directive.  Advice is given in https://github.com/canonical/cloud-init/blob/7d57fcff6d32fd706dd745315c0f8f72d94385eb/systemd/cloud-init.target#L7-L9:
> # system configuration tasks have completed. To order a service after cloud-init
> # is done, add the directives as applicable:
> #  After=cloud-init.target and Wants=cloud-init.target

Following this advice will result in cyclic dependencies in systemd
resolution if these directives are added to a unit which is
WantedBy=multi-user.target.  This is because the unit depending on and
scheduled after cloud-init.target is WantedBy mutli-user.target as well
which is itself ordered Before cloud-init.target.  As adding new units
to mutli-user.target is standard practice, this is likely to occur
frequently.  Related issues have been mentioned before in cloud-init
bugs, for example: https://bugs.launchpad.net/ubuntu/+source/cloud-
init/+bug/1629797/comments/11; as well as other bug trackers:
https://bugzilla.redhat.com/show_bug.cgi?id=1393094.

This could be resolved by either of the two:
* removing the advice that results in cyclic dependencies
* cloud-init.target depends on basic.target

Additional information

Cloud provider: any

** Affects: cloud-init
     Importance: Undecided
         Status: New

** Attachment added: "ubuntu-bug cloud-init"
   https://bugs.launchpad.net/bugs/2003877/+attachment/5643394/+files/apport.cloud-init.6a9sh3rc.apport

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/2003877

Title:
  cyclic dependencies, cloud-init.target has After=mutli-user.target

Status in cloud-init:
  New

Bug description:
  cloud-init.target is ordered after mutli-user.target as it contains the After=mutli-user.target directive.  Advice is given in https://github.com/canonical/cloud-init/blob/7d57fcff6d32fd706dd745315c0f8f72d94385eb/systemd/cloud-init.target#L7-L9:
  > # system configuration tasks have completed. To order a service after cloud-init
  > # is done, add the directives as applicable:
  > #  After=cloud-init.target and Wants=cloud-init.target

  Following this advice will result in cyclic dependencies in systemd
  resolution if these directives are added to a unit which is
  WantedBy=multi-user.target.  This is because the unit depending on and
  scheduled after cloud-init.target is WantedBy mutli-user.target as
  well which is itself ordered Before cloud-init.target.  As adding new
  units to mutli-user.target is standard practice, this is likely to
  occur frequently.  Related issues have been mentioned before in cloud-
  init bugs, for example:
  https://bugs.launchpad.net/ubuntu/+source/cloud-
  init/+bug/1629797/comments/11; as well as other bug trackers:
  https://bugzilla.redhat.com/show_bug.cgi?id=1393094.

  This could be resolved by either of the two:
  * removing the advice that results in cyclic dependencies
  * cloud-init.target depends on basic.target

  Additional information

  Cloud provider: any

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/2003877/+subscriptions



Follow ups