← Back to issue list

multipass: do not always use sudo to execute commands

View original Github issue

Metadata

Project
craft-providers
Number
#281
Type
issue
State
open
Author
mr-cal
Labels
Type: Enhancement
Created
Updated
Closed
—

Current evaluation

MultipassInstance still always rootifies execute_run() and execute_popen() through _rootify_multipass_command; the requested per-call use_sudo option remains absent.

Suggested action: keep open

Reason: The maintainer-authored enhancement remains valid and actionable: current code still passes both methods through _rootify_multipass_command, and repository history contains no use_sudo implementation. Impact is moderate because it limits non-root execution, while the change can remain backward-compatible by defaulting use_sudo to True.

Evaluated by: mr-cal-bot

Impact: 45 Quick Win: 29 Complexity: 28 Confidence: 94 Actionability: 88

Issue body

By default, MultipassInstance wraps all commands with sudo: https://github.com/canonical/craft-providers/blob/6b3f8c93c8b9a1c0b245036bf8a7c4a6f11af1f7/craft_providers/multipass/multipass_instance.py#L35-L57 This behavior should be configurable with a parameter `use_sudo: bool` for `execute_run()` and `execute_popen()`.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 45
Quick Win: 29
Complexity: 28
Confidence: 94
Actionability: 88
keep open MultipassInstance still always rootifies execute_run() and execute_popen() through _rootify_multipass_command; the requested per-call use_sudo option remains absent.
stealth/space-bunny-alpha
Impact: 45
Quick Win: 28
Complexity: 32
Confidence: 96
Actionability: 90
keep open MultipassInstance still unconditionally wraps execute_run() and execute_popen() commands with sudo; the requested use_sudo opt-out remains unimplemented.
stealth/space-bunny-alpha
Impact: 42
Quick Win: 26
Complexity: 31
Confidence: 96
Actionability: 88
keep open Multipass execution always invokes sudo; the requested use_sudo opt-out for execute_run() and execute_popen() is still absent, so this remains a valid enhancement.
qwen3.6-35b-a3b-mtp-q6
Impact: 40
Quick Win: 28
Staleness: 90
Complexity: 30
Confidence: 70
Support Request: 20
close stale Enhancement to make sudo behavior configurable in MultipassInstance.execute_run() and execute_popen(). Open 1200 days with no maintainer engagement or implementation.
qwen/qwen3.6-35b-a3b
Staleness: 50
Complexity: 20
Confidence: 80
Support Request: 0
keep open Enhancement request to configure sudo usage in MultipassInstance. Open for 3 years, last activity 3 months ago, no comments.
qwen3.6-35b-a3b-mtp-q6
Staleness: 80
Complexity: 20
Confidence: 75
Support Request: 0
needs triage Enhancement to make sudo usage configurable in MultipassInstance execute methods. Open for over three years with zero maintainer comments or prioritization.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.