File tree 1 file changed +12
-2
lines changed
pkg/component/worker/containerd
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -99,9 +99,19 @@ var _ manager.Component = (*Component)(nil)
99
99
func (c * Component ) Init (ctx context.Context ) error {
100
100
g , _ := errgroup .WithContext (ctx )
101
101
for _ , bin := range c .binaries {
102
- b := bin
103
102
g .Go (func () error {
104
- return assets .Stage (c .K0sVars .BinDir , b , constant .BinDirMode )
103
+ err := assets .Stage (c .K0sVars .BinDir , bin , constant .BinDirMode )
104
+ // Simply ignore the "running executable" problem on Windows for
105
+ // now. Whenever there's a permission error on Windows and the
106
+ // target file exists, log the error and continue.
107
+ if err != nil &&
108
+ runtime .GOOS == "windows" &&
109
+ errors .Is (err , os .ErrPermission ) &&
110
+ file .Exists (filepath .Join (c .K0sVars .BinDir , bin )) {
111
+ logrus .WithField ("component" , "containerd" ).WithError (err ).Error ("Failed to replace " , bin )
112
+ return nil
113
+ }
114
+ return err
105
115
})
106
116
}
107
117
if err := g .Wait (); err != nil {
You can’t perform that action at this time.
0 commit comments