collect-logs traceback on non-root user

Bug #1805201 reported by Chad Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Medium
Chad Smith

Bug Description

Permissions errors are seen when running collect-logs as non-root user
cloud-init 18.4.24

$ cloud-init collect-logs
Traceback (most recent call last):
  File "/usr/bin/cloud-init", line 11, in <module>
    load_entry_point('cloud-init==18.4', 'console_scripts', 'cloud-init')()
  File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 904, in main
    get_uptime=True, func=functor, args=(name, args))
  File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 2514, in log_time
    ret = func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/cloudinit/cmd/devel/logs.py", line 125, in handle_collect_logs_args
    collect_logs(args.tarfile, args.userdata, args.verbosity)
  File "/usr/lib/python3/dist-packages/cloudinit/cmd/devel/logs.py", line 113, in collect_logs
    os.path.join(run_dir, 'cloud-init'))
  File "/usr/lib/python3.6/shutil.py", line 359, in copytree
    raise Error(errors)
shutil.Error: [('/run/cloud-init/instance-data-sensitive.json', '/tmp/tmphc62cg6h/cloud-init-logs-2018-11-26/run/cloud-init/instance-data-sensitive.json', "[Errno 13] Permission denied: '/run/cloud-init/instance-data-sensitive.json'")]

Related branches

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

This bug is fixed with commit e9d57b80 to cloud-init on branch master.
To view that commit see the following URL:
https://git.launchpad.net/cloud-init/commit/?id=e9d57b80

Changed in cloud-init:
status: In Progress → Fix Committed
Revision history for this message
Ryan Harper (raharper) wrote : Fixed in cloud-init version 18.5.

This bug is believed to be fixed in cloud-init in version 18.5. 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.