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

kraft net almost unusable with multiple users #992

Open
craciunoiuc opened this issue Nov 10, 2023 · 1 comment
Open

kraft net almost unusable with multiple users #992

craciunoiuc opened this issue Nov 10, 2023 · 1 comment
Assignees
Labels
kind/bug Something isn't working priority/medium Issue which is important, but KraftKit is usable without it also.

Comments

@craciunoiuc
Copy link
Member

Describe the bug

Trying to use the kraft net subcommands together with kraft run is almost impossible when using multiple users.

In order to create a network interface you need to use sudo, and then you should be able to use it inside kraft run.

But, to use it there, you also need to use sudo for kraft run. This means that the user is changed and the path to the config also becomes changed (effectively using the home of root).

This can prove confusing as people ca run:

  1. sudo kraft run
  2. kraft ps

And then see no output, even though they should.

Steps to reproduce

No response

Expected behavior

No response

Which architectures were you using or does this bug affect?

x86_64, arm, arm64

Which operating system were you using or does this bug affect?

linux/debian, linux/fedora, linux/alpine, linux/arch, linux/other

Relevant log output

No response

@craciunoiuc craciunoiuc added the kind/bug Something isn't working label Nov 10, 2023
@github-project-automation github-project-automation bot moved this to 🧊 Icebox in KraftKit Roadmap Nov 10, 2023
@craciunoiuc craciunoiuc changed the title kraft net unusable with multiple users kraft net almost unusable with multiple users Nov 10, 2023
@craciunoiuc craciunoiuc added the priority/medium Issue which is important, but KraftKit is usable without it also. label Feb 29, 2024
@craciunoiuc
Copy link
Member Author

craciunoiuc commented Jul 5, 2024

@LucaSeri is it okay if I assign this issue to you? I know you bumped into this recently

I'm not sure how a fix looks like, probably making kraftkit somehow ask for sudo privileges when running just for the bridge creation.

On a successful run, in my head:

  1. kraftkit fetches all info related to bridges and prepares stuff (using user user)
  2. kraftkit invokes the bridge command, or whatever it does (using user root)
  3. kraftkit reports back on the status of the bridge creation and saves info (using user user)

This ensures that info is saved in the store with the correct permissions, and also the creation works as any user. It will of course ask for the root password, but that is to be expected.

Same in the case of kraft run, only exact, problematic operations should be grnted elevation, not everything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working priority/medium Issue which is important, but KraftKit is usable without it also.
Projects
Status: Ready
Status: 🧊 Icebox
Development

No branches or pull requests

2 participants