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

Creating a snapshot requires "sudo" #714

Open
gbenhaim opened this issue May 3, 2018 · 3 comments
Open

Creating a snapshot requires "sudo" #714

gbenhaim opened this issue May 3, 2018 · 3 comments
Labels

Comments

@gbenhaim
Copy link
Member

gbenhaim commented May 3, 2018

When creating the snapshot, the new layer of the disk is created with the following permissions:

-rw-------. 1 qemu qemu   197120 May  3 11:59 vm-01_root.1525337944

Then we issue lago.providers.libvirt.vm._reclaim_disks in order to add rw permissions to all.
This action requires sudo -u qemu.

During lago installation, we configure /etc/sudoers .d with:

%lago ALL = (qemu) NOPASSWD: /usr/bin/chmod

but it seems that we need to change it to:

%lago ALL = (qemu) NOPASSWD: /usr/bin/chmod *

or to revisit the way we create snapshots.

@ifireball
Copy link

This is just a reminder that sudo is not meant for use by automated tools and PolicyKit/ConsoleKit would be a better choice...

@gbenhaim
Copy link
Member Author

gbenhaim commented May 6, 2018

@ifireball thanks for the comment.
Due to time constraints, I'll fix the current logic that uses sudo, but leave this issue open
so we can implement the correct fix in the future.

@gbenhaim gbenhaim added the bug label May 6, 2018
@gbenhaim
Copy link
Member Author

gbenhaim commented May 6, 2018

Temporary fix #715

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

2 participants