veyron/services/mgmt: Tune timeouts
Change the appcycle Stop timeout to 5 min, and add some debug info on
the appcycle side to help us see what's happening.
Change-Id: I83c60afe2e04e318069cc8cf2f2ab3130d3f5db8
diff --git a/lib/appcycle/appcycle.go b/lib/appcycle/appcycle.go
index 39f1a30..3f99fee 100644
--- a/lib/appcycle/appcycle.go
+++ b/lib/appcycle/appcycle.go
@@ -7,6 +7,8 @@
"v.io/core/veyron2"
"v.io/core/veyron2/ipc"
+ "v.io/core/veyron2/vlog"
+
stub "v.io/core/veyron2/services/mgmt/appcycle"
)
@@ -116,6 +118,8 @@
}
func (d *invoker) Stop(ctx stub.AppCycleStopContext) error {
+ blessings, _ := ctx.RemoteBlessings().ForContext(ctx)
+ vlog.Infof("AppCycle Stop request from %v", blessings)
// The size of the channel should be reasonably sized to expect not to
// miss updates while we're waiting for the stream to unblock.
ch := make(chan veyron2.Task, 10)
@@ -129,8 +133,10 @@
break
}
actask := stub.Task{Progress: task.Progress, Goal: task.Goal}
+ vlog.Infof("AppCycle Stop progress %d/%d", task.Progress, task.Goal)
ctx.SendStream().Send(actask)
}
+ vlog.Infof("AppCycle Stop done")
return nil
}
diff --git a/services/mgmt/device/impl/app_service.go b/services/mgmt/device/impl/app_service.go
index 15fca5b..881e33b 100644
--- a/services/mgmt/device/impl/app_service.go
+++ b/services/mgmt/device/impl/app_service.go
@@ -938,7 +938,7 @@
func stopAppRemotely(ctx *context.T, appVON string) error {
appStub := appcycle.AppCycleClient(appVON)
- ctx, cancel := context.WithTimeout(ctx, ipcContextTimeout)
+ ctx, cancel := context.WithTimeout(ctx, ipcContextLongTimeout)
defer cancel()
stream, err := appStub.Stop(ctx)
if err != nil {