-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Retrieving a git::http artifact fails on RHEL distros #16899
Labels
stage/accepted
Confirmed, and intend to work on. No timeline committment though.
theme/artifact
type/bug
Milestone
Comments
@shoenig this appears to be linked to your changes |
Merged
Hi @astudentofblake, thanks for the report, investigation, and PR! Will follow up in the PR. |
lgfa29
added
theme/artifact
stage/accepted
Confirmed, and intend to work on. No timeline committment though.
labels
Apr 17, 2023
I see this bug in 1.8.2 in Debian. artifact {
source = "git::https://github.com/WorldProgrammingLtd/hub-pipeline-input-test.git"
destination = "local/repo"
} error:
|
I am also seeing this in Debian 12 for 1.8.2. artifact {
source = "git::https://github.com/apache/superset.git//docker"
destination = "local/repo"
} error:
|
Seeing this (or a similar issue) on nomad 1.9.3 on Fedora 41:
nomad task snippet:
error:
|
Seeing this (or a similar issue) on nomad 1.9.1 on Debian 12:
nomad task snippet:
error:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
stage/accepted
Confirmed, and intend to work on. No timeline committment though.
theme/artifact
type/bug
Nomad version
Output from
nomad version
Nomad v1.5.2
BuildDate 2023-03-21T22:54:38Z
Revision 9a2fdb5
Operating system and Environment details
AlmaLinux release 8.7 (Stone Smilodon)
Issue
When I try to get an artifact using a git:https address, I get a permission denied
It looks like git-remote-https executable exists in /usr/libexec/git-core in RHEL
In ubuntu this is in /usr/lib/git-core
nomad uses "github.com/shoenig/go-landlock" and calls
landlock.Shared()
which contains https://github.com/shoenig/go-landlock/blob/main/path_linux.go
shared = load([]*Path {
File("/dev/null", "rw"),
Dir("/lib", "rx"),
Dir("/lib64", "rx"),
Dir("/usr/lib", "rx"),
Dir("/usr/local/lib", "rx"),
Dir("/usr/local/lib64", "rx"),
File("/etc/ld.so.conf", "r"),
File("/etc/ld.so.cache", "r"),
Dir("/etc/ld.so.conf.d", "r"), }
)
it does not contain
/usr/libexec/
which means we are locked out of calling the git-remote-https executable, and fail.
client/allocrunner/taskrunner/getter/util_linux.go
contains
landlock.Dir("/bin", "rx"),
landlock.Dir("/usr/bin", "rx"),
landlock.Dir("/usr/local/bin", "rx"),
as /lib/exec is executables called not directly, but by other executables, not sure where this should be added
Reproduction steps
Running on Alama Linux, create a task with an git:https artifact, e.g.
git::https://github.com/WorldProgrammingLtd/hub-pipeline-input-test.git
Expected Result
The artifact downloads successfully
Actual Result
The download fails
Nomad Server logs (if appropriate)
"failed to download artifact: error downloading 'https://github.com/WorldProgrammingLtd/hub-pipeline-input-test.git?ref=e7bb59456f6d0a5d4976893>
rtifact: sub-process: OUTPUT="warning: templates not found in /usr/share/git-core/templates"
rtifact: sub-process: OUTPUT="fatal: cannot exec 'git-remote-https': Permission denied"
The text was updated successfully, but these errors were encountered: