On Mon, Aug 8, 2016 at 6:48 AM, Kyle Mestery <mest...@mestery.com> wrote:
> While running the ovn-scale-test [1] port-binding tests [2], I notice a > continual stream of messages such as this: > > 2016-08-04 13:05:28.705 547 INFO rally_ovs.plugins.ovs.scenarios.ovn [-] > bind lport_0996bf_cikzNO to sandbox-172.16.200.24 on > ovn-farm-node-uat-dal09-compute-325 > 2016-08-04 13:05:28.712 547 INFO paramiko.transport [-] Connected (version > 2.0, client OpenSSH_6.6.1p1) > 2016-08-04 13:05:28.805 547 INFO paramiko.transport [-] Authentication > (publickey) successful! > 2016-08-04T13:05:28Z|00002|vsctl|WARN|/proc/0/cmdline: open failed (No > such file or directory) > 2016-08-04T13:05:29Z|00002|vsctl|WARN|/proc/0/cmdline: open failed (No > such file or directory) > 2016-08-04 13:05:29.042 547 INFO rally_ovs.plugins.ovs.scenarios.ovn [-] > bind lport_0996bf_tvovcK to sandbox-172.16.200.24 on > ovn-farm-node-uat-dal09-compute-325 > 2016-08-04T13:05:29Z|00002|vsctl|WARN|/proc/0/cmdline: open failed (No > such file or directory) > 2016-08-04T13:05:29Z|00002|vsctl|WARN|/proc/0/cmdline: open failed (No > such file or directory) > 2016-08-04 13:05:29.285 547 INFO rally_ovs.plugins.ovs.scenarios.ovn [-] > bind lport_0996bf_HwG7AK to sandbox-172.16.200.24 on > ovn-farm-node-uat-dal09-compute-325 > 2016-08-04T13:05:29Z|00002|vsctl|WARN|/proc/0/cmdline: open failed (No > such file or directory) > 2016-08-04T13:05:29Z|00002|vsctl|WARN|/proc/0/cmdline: open failed (No > such file or directory) > 2016-08-04 13:05:29.505 547 INFO rally_ovs.plugins.ovs.scenarios.ovn [-] > bind lport_0996bf_Lqbv92 to sandbox-172.16.200.24 on > ovn-farm-node-uat-dal09-compute-325 > 2016-08-04T13:05:29Z|00002|vsctl|WARN|/proc/0/cmdline: open failed (No > such file or directory) > 2016-08-04T13:05:29Z|00002|vsctl|WARN|/proc/0/cmdline: open failed (No > such file or directory) > 2016-08-04 13:05:29.724 547 INFO rally_ovs.plugins.ovs.scenarios.ovn [-] > bind lport_0996bf_6f8uQW to sandbox-172.16.200.24 on > ovn-farm-node-uat-dal09-compute-325 > 2016-08-04T13:05:29Z|00002|vsctl|WARN|/proc/0/cmdline: open failed (No > such file or directory) > 2016-08-04T13:05:29Z|00002|vsctl|WARN|/proc/0/cmdline: open failed (No > such file or directory) > 2016-08-04 13:05:29.944 547 INFO rally_ovs.plugins.ovs.scenarios.ovn [-] > bind lport_0996bf_nKl2XF to sandbox-172.16.200.24 on > ovn-farm-node-uat-dal09-compute-325 > > Tracing these down, this is due to the check in > vsctl_parent_process_info(), > which is verifying if the parent process can be opened. Since > ovn-scale-test > runs sandboxes in containers, and these are run as root, there is no > /proc/0 > in the container. Thus, the check fails, and the error message is printed > out. > It's unclear what value this log message provides, so removing it clears up > this problem and is probably the best option. > > [1] https://github.com/openvswitch/ovn-scale-test > [2] https://github.com/openvswitch/ovn-scale-test/ > blob/master/rally_ovs/plugins/ovs/scenarios/ovn.py#L255 > > Signed-off-by: Kyle Mestery <mest...@mestery.com> > > Thanks for the v2. Acked-by: Andy Zhou <az...@ovn.org> Since one aspect of the issue is about access to /proc/0, which does not exist in a non-container evironment as well, I'd like to fold in the following incremental as well. What do you think? diff --git a/utilities/ovs-vsctl.c b/utilities/ovs-vsctl.c index 06b7e46..2ef8824 100644 --- a/utilities/ovs-vsctl.c +++ b/utilities/ovs-vsctl.c @@ -2474,29 +2474,37 @@ vsctl_parent_process_info(void) { #ifdef __linux__ pid_t parent_pid; - char *procfile; struct ds s; - FILE *f; parent_pid = getppid(); - procfile = xasprintf("/proc/%d/cmdline", parent_pid); + ds_init(&s); + + /* Retrive the command line of the parent process, except the init + * process since /proc/0 does not exist. */ + if (parent_pid != 0) { + char *procfile; + FILE *f; + + procfile = xasprintf("/proc/%d/cmdline", parent_pid); - f = fopen(procfile, "r"); - if (!f) { + f = fopen(procfile, "r"); + if (!f) { + free(procfile); + return NULL; + } free(procfile); - return NULL; - } - free(procfile); - ds_init(&s); - for (;;) { - int c = getc(f); - if (!c || c == EOF) { + for (;;) { + int c = getc(f); + if (!c || c == EOF) { break; + } + ds_put_char(&s, c); } - ds_put_char(&s, c); + fclose(f); + } else { + ds_put_cstr(&s, "init"); } - fclose(f); ds_put_format(&s, " (pid %d)", parent_pid); -- 1.9.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev