Skip to content

Commit

Permalink
fix: ignore signal killed when context cancelled (#3748) (#3749)
Browse files Browse the repository at this point in the history
Co-authored-by: fengxsong <fengxsong@outlook.com>
  • Loading branch information
sealos-ci-robot and fengxsong authored Aug 23, 2023
1 parent 2a9e4c8 commit 5f62b0c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/filesystem/registry/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ func (s *impl) Sync(ctx context.Context, hosts ...string) error {
go func(ctx context.Context, host string) {
logger.Debug("running temporary registry on host %s", host)
if err := s.ssh.CmdAsyncWithContext(ctx, host, getRegistryServeCommand(s.pathResolver, defaultTemporaryPort)); err != nil {
logger.Error(err)
// ignore expected signal killed error when context cancel
if !strings.Contains(err.Error(), "signal: killed") {
logger.Error(err)
}
}
}(cmdCtx, hosts[i])
}
Expand Down

0 comments on commit 5f62b0c

Please sign in to comment.