mirror of
https://github.com/openziti/zrok.git
synced 2024-11-23 00:23:48 +01:00
don't dealloate reserved services (#41)
This commit is contained in:
parent
158cc42c07
commit
6841704b90
@ -75,6 +75,7 @@ func (h *unshareHandler) Handle(params service.UnshareParams, principal *rest_mo
|
||||
return service.NewUnshareInternalServerError()
|
||||
}
|
||||
|
||||
if !ssvc.Reserved {
|
||||
// single tag-based service deallocator; should work regardless of sharing mode
|
||||
if err := h.deallocateResources(senv, ssvc, svcName, svcZId, edge); err != nil {
|
||||
logrus.Errorf("error unsharing ziti resources for '%v': %v", ssvc, err)
|
||||
@ -92,6 +93,10 @@ func (h *unshareHandler) Handle(params service.UnshareParams, principal *rest_mo
|
||||
return service.NewUnshareInternalServerError()
|
||||
}
|
||||
|
||||
} else {
|
||||
logrus.Infof("service '%v' is reserved, skipping deallocation", svcName)
|
||||
}
|
||||
|
||||
return service.NewUnshareOK()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user