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

ilab-wrapper: don't map UIDs if we're already running as root #729

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

omertuc
Copy link
Contributor

@omertuc omertuc commented Aug 6, 2024

Background

See df88857

Issue

Introduced a regression [1] where it's no longer possible to run the script as root, as the subuid map ends up being empty and this causes an error:

Error: invalid empty host id at UID map: [1  1]

Solution

Avoid UID mapping if we're already running as root.

Motivation

We want to also be able to run the script as root, for example as part of a systemd service.

[1] RHELAI-798

@omertuc
Copy link
Contributor Author

omertuc commented Aug 6, 2024

cc @eranco74

# Background

See df88857

# Issue

Introduced a regression [1] where it's no longer possible to run the script
as root, as the subuid map ends up being empty and this causes an error:

```
Error: invalid empty host id at UID map: [1  1]
```

# Solution

Avoid UID mapping if we're already running as root.

# Motivation

We want to also be able to run the script as root, for example as part
of a systemd service.

[1] RHELAI-798

Signed-off-by: Omer Tuchfeld <[email protected]>
@omertuc
Copy link
Contributor Author

omertuc commented Aug 6, 2024

Force push reason: DCO

@rhatdan
Copy link
Member

rhatdan commented Aug 6, 2024

LGTM

@rhatdan rhatdan merged commit 6662956 into containers:main Aug 6, 2024
1 check passed
@omertuc
Copy link
Contributor Author

omertuc commented Aug 6, 2024

Forgot to update duplicated wrapper, followup (& additional fixes) here: #730

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants