Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workdir lookup fails if a directory can't be accessed #765

Open
gbenhaim opened this issue Oct 4, 2018 · 0 comments
Open

Workdir lookup fails if a directory can't be accessed #765

gbenhaim opened this issue Oct 4, 2018 · 0 comments
Labels

Comments

@gbenhaim
Copy link
Member

gbenhaim commented Oct 4, 2018

When running any lago command, without explicitly providing the path to the workdir, lago tries to locate the workdir by himself (the logic can be found in workdir.resolve_workdir_path).
This logic doesn't take into account that some of the directories in the chain will not have sufficient permissions, e.g

00:23:23.550 Error occured, aborting
00:23:23.550 Traceback (most recent call last):
00:23:23.551   File "/usr/lib/python2.7/site-packages/lago/cmd.py", line 969, in main
00:23:23.553     cli_plugins[args.verb].do_run(args)
00:23:23.554   File "/usr/lib/python2.7/site-packages/lago/plugins/cli.py", line 184, in do_run
00:23:23.556     self._do_run(**vars(args))
00:23:23.557   File "/usr/lib/python2.7/site-packages/lago/utils.py", line 488, in wrapper
00:23:23.559     workdir_path = workdir_class.resolve_workdir_path(workdir_path)
00:23:23.560   File "/usr/lib/python2.7/site-packages/lago/workdir.py", line 380, in resolve_workdir_path
00:23:23.562     dirs = os.listdir(path)
00:23:23.562 OSError: [Errno 13] Permission denied: 'systemd-private-7e82a7008cc440bb9aba9de13d6b120f-chronyd.service-teWYQa'
@gbenhaim gbenhaim added the bug label Oct 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant