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

Directory not searched for executable #369

Open
mal opened this issue Jan 29, 2014 · 8 comments
Open

Directory not searched for executable #369

mal opened this issue Jan 29, 2014 · 8 comments

Comments

@mal
Copy link

mal commented Jan 29, 2014

EDIT: Re-parsing the docs I see this probably counts as "expected behavior" however it doesn't seem very obvious or clear, so perhaps this is more of a feature request.


I think this is because process.get_execv_args only checks my path for the executable and not the directory set by directory.

example

mal:~# ls -l /opt/hello/bin/hello
-rwxrwxr-x 1 mal mal 1088 Jan 29 14:27 /opt/hello/bin/hello
mal:~# sudo supervisorctl status
example          BACKOFF    can't find command 'bin/hello'
[program:example]
command = bin/hello
directory = /opt/hello
@kuzmich
Copy link

kuzmich commented Feb 13, 2014

I can confirm this - supervisor [sometimes] can't find command with path relative to the directory, but you can run this command from the directory manually. As a workaround you can provide a full path to the command.

schemacs added a commit to schemacs/supervisor that referenced this issue Oct 27, 2014
@schemacs
Copy link

I figure out the lines of code doing with this:

if "/" in program:
    filename = program
    try:
        st = self.config.options.stat(filename)
    except OSError:
        st = None

I want the /opt/hello/bin/hello to run if directory is set to a valid directory path. I create one pr But I don't know if this has any side effect.

schemacs added a commit to schemacs/supervisor that referenced this issue Oct 27, 2014
lukeweber added a commit to lukeweber/supervisor that referenced this issue Sep 30, 2015
* BUG: Correctly check if program is an absolute path
* FEATURE: If program is not an absolute. Include the program config directory in search path.
lukeweber added a commit to lukeweber/supervisor that referenced this issue Sep 30, 2015
lukeweber added a commit to lukeweber/supervisor that referenced this issue Sep 30, 2015
lukeweber added a commit to lukeweber/supervisor that referenced this issue Sep 30, 2015
lukeweber added a commit to lukeweber/supervisor that referenced this issue Sep 30, 2015
@ihipop
Copy link

ihipop commented Jan 28, 2017

any update on this issue? @mnaberez

@RobIsHere
Copy link

I ran into this issue today. It celebrated its 3rd birthday this year ;)

@Vladnev
Copy link

Vladnev commented Feb 14, 2018

Her guys, you have a ready-made PR.
Problem exists 3-years :(

@kgreenek
Copy link

kgreenek commented Aug 2, 2018

I just ran into this. Can confirm that it's still a problem in 2018.

Adding to this: I found a workaround (albeit less-than-ideal). Instead of directly running the application, run it in a shell. E.g.

[program:hello]
command=bash -c "exec bin/hello"
directory=/opt/hello

@ihipop
Copy link

ihipop commented Aug 2, 2018

@kgreenek this require a extra bash process

@SaturnIC
Copy link

8 years of this issue and no mention in the docs what directory really does.

I guess directory only affects environment variables and bash commands,
but this is neither sensible nor documented.

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

No branches or pull requests

8 participants