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

Failed to run curl in an exec driver #908

Closed
slawdan opened this issue Mar 11, 2016 · 3 comments
Closed

Failed to run curl in an exec driver #908

slawdan opened this issue Mar 11, 2016 · 3 comments

Comments

@slawdan
Copy link

slawdan commented Mar 11, 2016

Nomad version

Nomad v0.3.1-dev

Operating system and Environment details

Linux 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

CentOS release 6.5 (Final)

Issue

Run a curl in a shell script using exec driver will failed, cause /usr/lib64 not included after chroot.

As on CentOS, a lot of so files are placed in /usr/lib64 but it didn't be included into the chroot directories. -_- This problem affect all the system commands which use any so file in /usr/lib64. As Ubuntu has no /usr/lib64 directory, so could you make a compatible change for CentOS?

Reproduction steps

  1. Write a shell script named 1.sh with the follow content:

    curl "http://google.com/" 1>>/stdout 2>>/stderr
  2. Place 1.sh to a web server, eg http://remoteserver/1.sh

  3. Create a nomad job using exec driver:

                task "mytask" {
                        driver = "exec"
    
                        config {
                                artifact_source = "http://remoteserver/1.sh"
                                command = "/bin/sh"
                                args = ["./1.sh"]
                        }
                }
    
  4. Check the nomad client alloc directory, got two files: an empty stdout, and a non-emptystderr, which the content is:

    curl: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory
    

    while libcurl.so.4 exists at /usr/lib64/libcurl.so.4 of system.

@diptanu
Copy link
Contributor

diptanu commented Mar 11, 2016

@slawdan Thanks for reporting! We will look into this shortly.

@dadgar
Copy link
Contributor

dadgar commented Mar 30, 2016

Fixed by #1009

@dadgar dadgar closed this as completed Mar 30, 2016
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants