mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +02:00
fix(snapshots): fix background snapshots on environment creation EE-7273 (#12021)
This commit is contained in:
parent
7fd1a644a6
commit
220fe28830
4 changed files with 30 additions and 11 deletions
|
@ -64,14 +64,16 @@ func NewBackgroundSnapshotter(dataStore dataservices.DataStore, tunnelService po
|
|||
}
|
||||
|
||||
for _, e := range endpoints {
|
||||
if !endpointutils.IsEdgeEndpoint(&e) {
|
||||
if !endpointutils.IsEdgeEndpoint(&e) || e.Edge.AsyncMode {
|
||||
continue
|
||||
}
|
||||
|
||||
s, err := tx.Snapshot().Read(e.ID)
|
||||
if dataservices.IsErrObjectNotFound(err) ||
|
||||
(err == nil && s.Docker == nil && s.Kubernetes == nil) {
|
||||
_ = tunnelService.Open(&e)
|
||||
if err := tunnelService.Open(&e); err != nil {
|
||||
log.Error().Err(err).Msg("could not open the tunnel")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue