diff --git a/cns/restserver/util.go b/cns/restserver/util.go index 2af74d14c1..1ca49b8de9 100644 --- a/cns/restserver/util.go +++ b/cns/restserver/util.go @@ -125,11 +125,15 @@ func (service *HTTPRestService) saveNetworkContainerGoalState(req cns.CreateNetw hostVersion = "-1" } + // Remove the auth token before saving the containerStatus to cns json file + createNetworkContainerRequest := req + createNetworkContainerRequest.AuthorizationToken = "" + service.state.ContainerStatus[req.NetworkContainerid] = containerstatus{ ID: req.NetworkContainerid, VMVersion: req.Version, - CreateNetworkContainerRequest: req, + CreateNetworkContainerRequest: createNetworkContainerRequest, HostVersion: hostVersion, VfpUpdateComplete: vfpUpdateComplete}