diff mbox

[ovs-dev,1/5] ovn-ctl: Add daemon status functions.

Message ID 1450201926-29276-1-git-send-email-guru@ovn.org
State Not Applicable
Headers show

Commit Message

Gurucharan Shetty Dec. 15, 2015, 5:52 p.m. UTC
Signed-off-by: Gurucharan Shetty <guru@ovn.org>
---
 ovn/utilities/ovn-ctl |    6 ++++++
 1 file changed, 6 insertions(+)

Comments

Russell Bryant Dec. 15, 2015, 6:45 p.m. UTC | #1
On 12/15/2015 12:52 PM, Gurucharan Shetty wrote:
> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
> ---
>  ovn/utilities/ovn-ctl |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/ovn/utilities/ovn-ctl b/ovn/utilities/ovn-ctl
> index 3e2ccf9..b171934 100755
> --- a/ovn/utilities/ovn-ctl
> +++ b/ovn/utilities/ovn-ctl
> @@ -225,6 +225,12 @@ case $command in
>      restart_controller)
>          restart_controller
>          ;;
> +    status_northd)
> +        daemon_status ovn-northd || exit 1
> +        ;;
> +    status_controller)
> +        daemon_status ovn-controller || exit 1
> +        ;;
>      help)
>          usage
>          ;;
> 

Acked-by: Russell Bryant <russell@ovn.org>
Ben Pfaff Dec. 16, 2015, 6:59 a.m. UTC | #2
On Tue, Dec 15, 2015 at 09:52:02AM -0800, Gurucharan Shetty wrote:
> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
> ---
>  ovn/utilities/ovn-ctl |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/ovn/utilities/ovn-ctl b/ovn/utilities/ovn-ctl
> index 3e2ccf9..b171934 100755
> --- a/ovn/utilities/ovn-ctl
> +++ b/ovn/utilities/ovn-ctl
> @@ -225,6 +225,12 @@ case $command in
>      restart_controller)
>          restart_controller
>          ;;
> +    status_northd)
> +        daemon_status ovn-northd || exit 1
> +        ;;
> +    status_controller)
> +        daemon_status ovn-controller || exit 1
> +        ;;

Do you think it's worth breaking out individual statuses this way?
"ovs-ctl status" shows all OVS daemons' status; maybe "ovn-ctl status"
should follow the same pattern.
Ben Pfaff Dec. 16, 2015, 7 a.m. UTC | #3
On Tue, Dec 15, 2015 at 10:59:58PM -0800, Ben Pfaff wrote:
> On Tue, Dec 15, 2015 at 09:52:02AM -0800, Gurucharan Shetty wrote:
> > Signed-off-by: Gurucharan Shetty <guru@ovn.org>
> > ---
> >  ovn/utilities/ovn-ctl |    6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/ovn/utilities/ovn-ctl b/ovn/utilities/ovn-ctl
> > index 3e2ccf9..b171934 100755
> > --- a/ovn/utilities/ovn-ctl
> > +++ b/ovn/utilities/ovn-ctl
> > @@ -225,6 +225,12 @@ case $command in
> >      restart_controller)
> >          restart_controller
> >          ;;
> > +    status_northd)
> > +        daemon_status ovn-northd || exit 1
> > +        ;;
> > +    status_controller)
> > +        daemon_status ovn-controller || exit 1
> > +        ;;
> 
> Do you think it's worth breaking out individual statuses this way?
> "ovs-ctl status" shows all OVS daemons' status; maybe "ovn-ctl status"
> should follow the same pattern.

Oh, but in case you disagree, I don't feel strongly, so have an ack if
you want:
Acked-by: Ben Pfaff <blp@ovn.org>
Russell Bryant Dec. 16, 2015, 2:05 p.m. UTC | #4
On 12/16/2015 02:00 AM, Ben Pfaff wrote:
> On Tue, Dec 15, 2015 at 10:59:58PM -0800, Ben Pfaff wrote:
>> On Tue, Dec 15, 2015 at 09:52:02AM -0800, Gurucharan Shetty wrote:
>>> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
>>> ---
>>>  ovn/utilities/ovn-ctl |    6 ++++++
>>>  1 file changed, 6 insertions(+)
>>>
>>> diff --git a/ovn/utilities/ovn-ctl b/ovn/utilities/ovn-ctl
>>> index 3e2ccf9..b171934 100755
>>> --- a/ovn/utilities/ovn-ctl
>>> +++ b/ovn/utilities/ovn-ctl
>>> @@ -225,6 +225,12 @@ case $command in
>>>      restart_controller)
>>>          restart_controller
>>>          ;;
>>> +    status_northd)
>>> +        daemon_status ovn-northd || exit 1
>>> +        ;;
>>> +    status_controller)
>>> +        daemon_status ovn-controller || exit 1
>>> +        ;;
>>
>> Do you think it's worth breaking out individual statuses this way?
>> "ovs-ctl status" shows all OVS daemons' status; maybe "ovn-ctl status"
>> should follow the same pattern.
> 
> Oh, but in case you disagree, I don't feel strongly, so have an ack if
> you want:
> Acked-by: Ben Pfaff <blp@ovn.org>

It seems reasonable that you might want to check the status of only
ovn-controller on a hypervisor, for example.  We could have a third
"status" arg that checks all though.

Acked-by: Russell Bryant <russell@ovn.org>
Gurucharan Shetty Dec. 16, 2015, 3:23 p.m. UTC | #5
>
>
> Do you think it's worth breaking out individual statuses this way?
> "ovs-ctl status" shows all OVS daemons' status; maybe "ovn-ctl status"
> should follow the same pattern.
>
The reason I chose to break it was because I was splitting ovn-northd and
ovn-controller into separate packages with separate startup scripts and
since the 'status' for each of those startup scripts should only get the
corresponding ones.
Ben Pfaff Dec. 23, 2015, 5:29 p.m. UTC | #6
On Wed, Dec 16, 2015 at 07:23:13AM -0800, Guru Shetty wrote:
> > Do you think it's worth breaking out individual statuses this way?
> > "ovs-ctl status" shows all OVS daemons' status; maybe "ovn-ctl status"
> > should follow the same pattern.
> >
> The reason I chose to break it was because I was splitting ovn-northd and
> ovn-controller into separate packages with separate startup scripts and
> since the 'status' for each of those startup scripts should only get the
> corresponding ones.

OK.
diff mbox

Patch

diff --git a/ovn/utilities/ovn-ctl b/ovn/utilities/ovn-ctl
index 3e2ccf9..b171934 100755
--- a/ovn/utilities/ovn-ctl
+++ b/ovn/utilities/ovn-ctl
@@ -225,6 +225,12 @@  case $command in
     restart_controller)
         restart_controller
         ;;
+    status_northd)
+        daemon_status ovn-northd || exit 1
+        ;;
+    status_controller)
+        daemon_status ovn-controller || exit 1
+        ;;
     help)
         usage
         ;;