-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[docker-ptf]: Update entrypoint entry for docker-ptf #836
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
Changes from all commits
4ea6318
991124c
219c4d0
1db3b3d
ebb58b6
f1a9ca2
cd5f07f
045ae9d
19adf1e
832e2d4
4cf1e74
07ee0f7
4f5795d
cf8e803
87fbfb3
6487c00
7d7a7b7
f26cb50
3ead64f
eb1bd42
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,8 +96,11 @@ RUN mkdir /var/run/sshd \ | |
| && sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config \ | ||
| && sed -i '$aUseDNS no' /etc/ssh/sshd_config | ||
|
|
||
| COPY ["supervisord.conf", "sshd.conf", "ptf_nn_agent.conf", "/etc/supervisor/conf.d/"] | ||
| COPY ["supervisord.conf", "/etc/supervisor/"] | ||
| COPY ["conf.d/supervisord.conf", "conf.d/sshd.conf", "conf.d/ptf_nn_agent.conf", "/etc/supervisor/conf.d/"] | ||
|
|
||
| RUN mkdir -p /var/log/supervisor | ||
|
|
||
| EXPOSE 22 | ||
|
|
||
| ENTRYPOINT ["/usr/bin/supervisord"] | ||
| ENTRYPOINT ["/usr/local/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do you need to specify the config file? As I mentioned above, the main config file, /etc/supervisor/supervisord.conf should include all conf files under /etc/supervisor/conf.d/. Is this not working?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Otherwise it gives following in the log So I provide -c to suppress this message.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see. Just note that in specifying the config file, supervisor is no longer loading /etc/supervisor.conf, which you modified below. None of the configuration in that file will be loaded. If you need config from both, you'll either have to let the main file include the conf.d file, or copy all pertinent config into the conf.d file, in which case, you should delete the main file to prevent confusion. Personally, I'm OK with the warning message, at least for now.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this addressed now?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no /etc/supervisor.conf file. Output from log
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So I don't know what to address here.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry for any confusion. I thought you were passing "/etc/supervisor/conf.d/supervisord.conf" as the main config file. I got confused by the filenames, even after commenting about it earlier! Supervisor looks for its default configuration in a few locations, among them, its current working directory, /etc/supervisord.conf, and /etc/supervisor/supervisord.conf. Thus, in our case, /etc/supervisor/supervisord.conf is the default config file, so using "-c /etc/supervisor/supervisord.conf" will load the default config plus the includes, as you described. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| [supervisord] | ||
| nodaemon=true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,28 @@ | ||
| ; supervisor config file | ||
|
|
||
| [unix_http_server] | ||
| file=/var/run/supervisor.sock ; (the path to the socket file) | ||
| chmod=0700 ; sockef file mode (default 0700) | ||
|
|
||
| [supervisord] | ||
| nodaemon=true | ||
| logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log) | ||
| pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) | ||
| childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP) | ||
|
|
||
| ; the below section must remain in the config file for RPC | ||
| ; (supervisorctl/web interface) to work, additional interfaces may be | ||
| ; added by defining them in separate rpcinterface: sections | ||
| [rpcinterface:supervisor] | ||
| supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface | ||
|
|
||
| [supervisorctl] | ||
| serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket | ||
|
|
||
| ; The [include] section can just contain the "files" setting. This | ||
| ; setting can list multiple files (separated by whitespace or | ||
| ; newlines). It can also contain wildcards. The filenames are | ||
| ; interpreted as relative to this file. Included files *cannot* | ||
| ; include files themselves. | ||
|
|
||
| [include] | ||
| files = /etc/supervisor/conf.d/*.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks for supervisord.conf in /etc/supervisor/
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a "main" config file in /etc/supervisor/, and that file includes the /etc/supervisor/conf.d/ path, which is where the docker-specific config file lives.
I will say that naming the docker-specific config file "supervisor.conf" does make things a bit confusing. We could rename the docker-specific config files at some point to make it a bit more obvious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can rename conf.d/supervisord.conf file to something else. But I think it's good enough name to show that we're changing supervisord configuration in the file.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, the conf.d/ file is only partial configuration, with the remaining (shared) configuration in /etc/supervisord.conf. Thus, I feel like the partial config file in conf.d should have a name specific to what it's configuring (along the lines of "container.conf"). This is a common convention for all /etc/*/conf.d/ config files. The fact that it resides under /etc/supervisor/conf.d/ should be enough to signify that it is modifying the supervisord configuration. See my comment below for more.