cloud-init clean from within /var/lib/cloud-init/instance

Bug #1795508 reported by Ryan Harper
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Chad Smith

Bug Description

Attempted to cloud-init clean from a directory clean will remove:

/var/lib/cloud/instance# cloud-init clean --logs --reboot
Traceback (most recent call last):
  File "/usr/bin/cloud-init", line 9, in <module>
    load_entry_point('cloud-init==18.3', 'console_scripts', 'cloud-init')()
  File "/usr/lib/python3/dist-packages/cloudinit/cmd/", line 904, in main
    get_uptime=True, func=functor, args=(name, args))
  File "/usr/lib/python3/dist-packages/cloudinit/", line 2514, in log_time
    ret = func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/cloudinit/cmd/", line 81, in handle_clean_args
    exit_code = remove_artifacts(args.remove_logs, args.remove_seed)
  File "/usr/lib/python3/dist-packages/cloudinit/cmd/", line 75, in remove_artifacts
    return 1
  File "/usr/lib/python3.6/", line 88, in __exit__
  File "/usr/lib/python3/dist-packages/cloudinit/", line 832, in chdir
FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/cloud/instances/ce3aca12-4e37-4ef9-bc51-170db3d25881'

Related branches

Chad Smith (chad.smith)
Changed in cloud-init:
status: New → In Progress
assignee: nobody → Chad Smith (chad.smith)
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

This bug is fixed with commit 48955354 to cloud-init on branch master.
To view that commit see the following URL:

Changed in cloud-init:
status: In Progress → Fix Committed
Revision history for this message
Chad Smith (chad.smith) wrote : Fixed in cloud-init version 19.1.

This bug is believed to be fixed in cloud-init in version 19.1. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.