mirror of https://github.com/portainer/portainer
EE-2463 When add agent to k8s with AGENT_SECRET, AGENT_SECRET should be configured on both side. otherwise, it will get unknown error. this error should be "agent already paired with another Portainer instance" (#6679)
parent
ee90fffce1
commit
f59459f936
|
@ -470,7 +470,7 @@ func (handler *Handler) createTLSSecuredEndpoint(payload *endpointCreatePayload,
|
|||
func (handler *Handler) snapshotAndPersistEndpoint(endpoint *portainer.Endpoint) *httperror.HandlerError {
|
||||
err := handler.SnapshotService.SnapshotEndpoint(endpoint)
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), "Invalid request signature") {
|
||||
if strings.Contains(err.Error(), "Invalid request signature") || strings.Contains(err.Error(), "unknown") {
|
||||
err = errors.New("agent already paired with another Portainer instance")
|
||||
}
|
||||
return &httperror.HandlerError{http.StatusInternalServerError, "Unable to initiate communications with environment", err}
|
||||
|
|
Loading…
Reference in New Issue