This bug was fixed in the package walinuxagent - 2.1.3-0ubuntu4.1

walinuxagent (2.1.3-0ubuntu4.1) xenial-proposed; urgency=medium

  * debian/walinuxagent.service: remove cloud-final.service from
    both Wants and After. (LP: #1623570)

 -- Scott Moser <>  Wed, 14 Sep 2016 15:17:38 -0400

** Changed in: walinuxagent (Ubuntu Xenial)
       Status: Fix Committed => Fix Released

You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs

  Azure: cannot start walinux agent (Transaction order is cyclic.)

Status in walinuxagent package in Ubuntu:
  Fix Released
Status in walinuxagent source package in Xenial:
  Fix Released

Bug description:
  ==== Begin SRU Template ====
  On Azure (and only on Azure), cloud-init utilizes the walinuxagent
  to do some of the instance initialization.  A change to cloud-init
  to support installation of packages on a systemd system (bug 1576692),
  exposed an issue in the walinuxagent.service file.

  The end result is freshly booted instances on azure with the cloud-init
  fix and the old version of walinuxagent would fail to import ssh keys
  that were provided to the instance.

  [Test Case]
   * Start an instance on Azure
   * upgrade to cloud-init at 0.7.7-31-g65ace7b or better 
     this is in both xenial-proposed and yakkety.
   * clean up, so it looks like a first boot.
     sudo sh -c 'rm -Rf /var/lib/cloud /var/log/cloud-init* 
   * At this point a reboot would cause failure, and you would see WARN 
messages in the logs.

   * upgrade walinuxagent with a fix (2.1.5-0ubuntu2 in yakkety)

   * reboot
   * ssh back in, 
     * There should be no WARN in /var/log/cloud-init.log
       grep WARN /var/log/cloud-init.log
     * There should exist a file /var/lib/waagent/*.crt
     * walinuxagent.service should be running
       systemctl status walinuxagent.service

  Note, that in event of failure you can still get into the system by
  providing user-data that populates your ssh keys:
    ssh-import-id smoser

  [Regression Potential] 
  Changing order of things in boot is scary.  This is no different.
  This would in theory allow walinux-agent to start earlier in the boot.
  In practice, however, it is started by cloud-init.service so it was
  already running that early in the boot.
  ==== End SRU Template ====

  When bringing up the Azure datasource in cloud-init.service, cloud-init tries 
'service start walinuxagent'.

  That previously worked fine, and the agent would start and then would
  produce the certificate files that cloud-init needed (for ssh keys and

  I found this when testing SRU for 0.7.7-31-g65ace7b-0ubuntu1~16.04.1
  but it is likely present also in 0.7.7-31-g65ace7b-0ubuntu1 (yakkety)

  Now, however we see a log like:
  Sep 14 14:53:18 smoser0914x [CLOUDINIT][DEBUG]: Getting 
metadata via agent.  hostname=smoser0914x cmd=['service', 'walinuxagent', 
  Sep 14 14:53:18 smoser0914x [CLOUDINIT][DEBUG]: Running command 
hostname with allowed return codes [0] (shell=False, capture=True)
  Sep 14 14:53:18 smoser0914x [CLOUDINIT][DEBUG]: invoking 
agent: ['service', 'walinuxagent', 'start']
  Sep 14 14:53:18 smoser0914x [CLOUDINIT][DEBUG]: Running command 
['service', 'walinuxagent', 'start'] with allowed return codes [0] 
(shell=False, capture=True)
  Sep 14 14:53:18 smoser0914x [CLOUDINIT][WARNING]: agent command 
'['service', 'walinuxagent', 'start']' failed.
  Sep 14 14:53:19 smoser0914x [CLOUDINIT][DEBUG]: agent command 
'['service', 'walinuxagent', 'start']' failed.
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/cloudinit/sources/", 
line 145, in get_metadata_from_agent
    File "/usr/lib/python3/dist-packages/cloudinit/sources/", 
line 452, in invoke_agent
      util.subp(cmd, shell=(not isinstance(cmd, list)))
    File "/usr/lib/python3/dist-packages/cloudinit/", line 1832, in subp
  cloudinit.util.ProcessExecutionError: Unexpected error while running command.
  Command: ['service', 'walinuxagent', 'start']
  Exit code: 1
  Reason: -
  Stdout: ''
  Stderr: "
    Failed to start walinuxagent.service: Transaction order is cyclic. See 
system logs for details.
    See system logs and 'systemctl status walinuxagent.service' for details

  I believe the relevant change is in 34a26f7f
  That added to the list of After for 

  Related bugs:
   * bug 1576692:  fully support package installation in systemd

To manage notifications about this bug go to:

Mailing list:
Post to     :
Unsubscribe :
More help   :

Reply via email to