diff mbox

[ovs-dev] windows: Remove vlog_init() from service_start function

Message ID 20170616170626.3596-1-kumaranand@vmware.com
State Accepted
Headers show

Commit Message

Anand Kumar June 16, 2017, 5:06 p.m. UTC
When --syslog-method is passed as a cmd line argument and
ovs daemons are started as a service, --syslog-method argument is not
honoured, as vlog module is initialized by service_start function
before parsing the command line arguments.

Easy way to fix this, is to remove vlog_init() from the service start
function and let the first log message to initialize the vlog module.

Signed-off-by: Anand Kumar <kumaranand@vmware.com>
---
 lib/daemon-windows.c | 7 -------
 1 file changed, 7 deletions(-)

Comments

Gurucharan Shetty June 16, 2017, 6:06 p.m. UTC | #1
On 16 June 2017 at 10:06, Anand Kumar <kumaranand@vmware.com> wrote:

> When --syslog-method is passed as a cmd line argument and
> ovs daemons are started as a service, --syslog-method argument is not
> honoured, as vlog module is initialized by service_start function
> before parsing the command line arguments.
>
> Easy way to fix this, is to remove vlog_init() from the service start
> function and let the first log message to initialize the vlog module.
>
> Signed-off-by: Anand Kumar <kumaranand@vmware.com>
>
Did you run the unit tests after this change?


> ---
>  lib/daemon-windows.c | 7 -------
>  1 file changed, 7 deletions(-)
>
> diff --git a/lib/daemon-windows.c b/lib/daemon-windows.c
> index 5804284..1ba714d 100644
> --- a/lib/daemon-windows.c
> +++ b/lib/daemon-windows.c
> @@ -138,13 +138,6 @@ service_start(int *argcp, char **argvp[])
>          *argcp = sargc;
>          *argvp = *sargvp;
>
> -        /* XXX: Windows implementation cannot have a unixctl commands in
> the
> -        * traditional sense of unix domain sockets. If an implementation
> is
> -        * done that involves 'unixctl' vlog commands the following call is
> -        * needed to make sure that the unixctl commands for vlog get
> -        * registered in a daemon, even before the first log message. */
> -        vlog_init();
> -
>          return;
>      }
>
> --
> 2.9.3.windows.1
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
Gurucharan Shetty June 20, 2017, 7:40 p.m. UTC | #2
On 16 June 2017 at 10:06, Anand Kumar <kumaranand@vmware.com> wrote:

> When --syslog-method is passed as a cmd line argument and
> ovs daemons are started as a service, --syslog-method argument is not
> honoured, as vlog module is initialized by service_start function
> before parsing the command line arguments.
>
> Easy way to fix this, is to remove vlog_init() from the service start
> function and let the first log message to initialize the vlog module.
>
> Signed-off-by: Anand Kumar <kumaranand@vmware.com>
>
Applied, thanks!


> ---
>  lib/daemon-windows.c | 7 -------
>  1 file changed, 7 deletions(-)
>
> diff --git a/lib/daemon-windows.c b/lib/daemon-windows.c
> index 5804284..1ba714d 100644
> --- a/lib/daemon-windows.c
> +++ b/lib/daemon-windows.c
> @@ -138,13 +138,6 @@ service_start(int *argcp, char **argvp[])
>          *argcp = sargc;
>          *argvp = *sargvp;
>
> -        /* XXX: Windows implementation cannot have a unixctl commands in
> the
> -        * traditional sense of unix domain sockets. If an implementation
> is
> -        * done that involves 'unixctl' vlog commands the following call is
> -        * needed to make sure that the unixctl commands for vlog get
> -        * registered in a daemon, even before the first log message. */
> -        vlog_init();
> -
>          return;
>      }
>
> --
> 2.9.3.windows.1
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
diff mbox

Patch

diff --git a/lib/daemon-windows.c b/lib/daemon-windows.c
index 5804284..1ba714d 100644
--- a/lib/daemon-windows.c
+++ b/lib/daemon-windows.c
@@ -138,13 +138,6 @@  service_start(int *argcp, char **argvp[])
         *argcp = sargc;
         *argvp = *sargvp;
 
-        /* XXX: Windows implementation cannot have a unixctl commands in the
-        * traditional sense of unix domain sockets. If an implementation is
-        * done that involves 'unixctl' vlog commands the following call is
-        * needed to make sure that the unixctl commands for vlog get
-        * registered in a daemon, even before the first log message. */
-        vlog_init();
-
         return;
     }