junneyang / zumastor

Automatically exported from code.google.com/p/zumastor
0 stars 1 forks source link

'zumastor stop target' exit 1 even though it succeeds #70

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In stop_target, we try to kill 'ddsnap transmit'. The pkill command will
fail if there is no replication going on at the time. We shouldn't return
an error in this case. Here is the patch to fix it.

Index: zumastor
===================================================================
--- zumastor    (revision 1357)
+++ zumastor    (working copy)
@@ -494,7 +494,8 @@ function stop_target {
        log "stopping target" $log
        pkill -f "zumastor replicate $vol $host --delay"
        pkill -f "zumastor start target $vol $host$" || return 1
-       pkill -f "ddsnap transmit $SERVERS/$vol $host:" || return 1
+       pkill -f "ddsnap transmit $SERVERS/$vol $host:"
+       return 0
 }

 function define_volume {

Original issue reported on code.google.com by jiahotc...@gmail.com on 13 Feb 2008 at 1:40

GoogleCodeExporter commented 9 years ago

Original comment by jiahotc...@gmail.com on 13 Feb 2008 at 6:12