1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 20:35:25 +02:00

fix(snapshots): increase the chance of taking a snapshot for edge environments EE-4795 (#9211)

This commit is contained in:
andres-portainer 2023-07-14 12:34:50 -03:00 committed by GitHub
parent 615af4fdee
commit 146681e1c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 55 additions and 4 deletions

View file

@ -138,6 +138,11 @@ func (handler *Handler) inspectStatus(tx dataservices.DataStoreTx, r *http.Reque
endpoint.EdgeID = edgeIdentifier
}
// Take an initial snapshot
if endpoint.LastCheckInDate == 0 {
handler.ReverseTunnelService.SetTunnelStatusToRequired(endpoint.ID)
}
agentPlatform, agentPlatformErr := parseAgentPlatform(r)
if agentPlatformErr != nil {
return nil, httperror.BadRequest("agent platform header is not valid", err)