diff options
author | Gurucharan Shetty <gshetty@nicira.com> | 2013-03-13 15:07:06 -0700 |
---|---|---|
committer | Gurucharan Shetty <gshetty@nicira.com> | 2013-03-15 09:18:52 -0700 |
commit | 6864873b2ddaaca0e5a5f18aa97bc1eb73df0631 (patch) | |
tree | a03dbcf03b86d9715c621d1b3baebc26bcf09eb0 /rhel | |
parent | 2960f18c400407ff73ebccc23e90ddf0d381fe59 (diff) |
debian, rhel, xenserver: Ability to collect ovs-ctl logs.
We use ovs-ctl from startup scripts to start, stop, restart,
force-reload-kmod OVS daemons. ovs-ctl gives quite a descriptive
o/p while running the above commands. But the o/p goes to stdout.
Sometimes, this output is quite useful to debug issues.
With this patch, we store the o/p of ovs-ctl when called from
startup scripts in /var/log/openvswitch/ovs-ctl.log
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Diffstat (limited to 'rhel')
-rwxr-xr-x | rhel/etc_init.d_openvswitch | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/rhel/etc_init.d_openvswitch b/rhel/etc_init.d_openvswitch index a25e6240..55a13a7e 100755 --- a/rhel/etc_init.d_openvswitch +++ b/rhel/etc_init.d_openvswitch @@ -31,7 +31,7 @@ test -e /etc/sysconfig/openvswitch && . /etc/sysconfig/openvswitch start () { - set $ovs_ctl ${1-start} + set ovs_ctl ${1-start} set "$@" --system-id=random if test X"$FORCE_COREFILES" != X; then set "$@" --force-corefiles="$FORCE_COREFILES" @@ -48,13 +48,13 @@ start () { set "$@" $OVS_CTL_OPTS "$@" - $ovs_ctl --protocol=gre enable-protocol + ovs_ctl --protocol=gre enable-protocol touch /var/lock/subsys/openvswitch } stop () { - $ovs_ctl stop + ovs_ctl stop rm -f /var/lock/subsys/openvswitch } @@ -67,7 +67,6 @@ restart () { fi } -ovs_ctl=/usr/share/openvswitch/scripts/ovs-ctl case $1 in start) start @@ -83,10 +82,10 @@ case $1 in # Nothing to do. ;; status) - $ovs_ctl status + ovs_ctl status ;; version) - $ovs_ctl version + ovs_ctl version ;; force-reload-kmod) start force-reload-kmod |