On Tue, Jan 12, 2016 at 11:28:51AM -0800, William Tu wrote:
> This patch forces appending "-- comment parent_process_name(PID)"
> when invoking ovs-vsctl, in order to assist debugging.
> For example:
>     User adds br0 by "ovs-vsctl add-br0", the log shows:
>     "ovs-vsctl: ovs-vsctl add-br br0 -- comment bash(1528)"
> 
> Signed-off-by: William Tu <u9012...@gmail.com>

I'd change this from "not-Windows" to "Linux-only", because *BSD
etc. don't have Linux-like /proc.

Also I think you need to #if-out the function instead of just returning
NULL because I don't think that Windows has getppid().

> -    ovsdb_idl_txn_add_comment(txn, "ovs-vsctl: %s", args);
> +    ppid_info = vsctl_parent_process_info();
> +    if (ppid_info) {
> +        ovsdb_idl_txn_add_comment(txn, "ovs-vsctl: %s -- comment %s",
> +                                  args, ppid_info);

I don't think there's value in making the parent process look like an
ovs-vsctl command, in fact it might be confusing in the log.  Perhaps
something like "ovs-vsctl (invoked by %s): %s".

Thanks,

Ben.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to