File tree 2 files changed +20
-3
lines changed
internal/exec/stages/files
2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -8,17 +8,22 @@ nav_order: 9
8
8
9
9
### Breaking changes
10
10
11
- - The dracut module is not automatically included in initramfs images anymore,
12
- see distributor notes for details.
11
+ - Only include dracut module in initramfs if requested (see distributor notes
12
+ for details)
13
13
14
14
### Features
15
15
16
+
17
+
16
18
### Changes
17
19
18
20
- Require Go 1.20+
19
21
20
22
### Bug fixes
21
23
24
+ - Fix failure when config only disables units already disabled
25
+
26
+
22
27
## Ignition 2.17.0 (2023-11-20)
23
28
24
29
Starting with this release, ignition-validate binaries are signed with the
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ package files
17
17
import (
18
18
"errors"
19
19
"fmt"
20
+ "os"
20
21
"path/filepath"
21
22
22
23
"github.com/coreos/ignition/v2/config/v3_5_experimental/types"
@@ -170,7 +171,18 @@ func (s *stage) relabelFiles() error {
170
171
171
172
keys := make ([]string , 0 , len (s .toRelabel ))
172
173
for key := range s .toRelabel {
173
- keys = append (keys , key )
174
+ // Filter out non-existent entries; some of the code that mark files for
175
+ // relabeling may not actually end up creating those files in the end.
176
+ if _ , err := os .Stat (key ); err == nil {
177
+ keys = append (keys , key )
178
+ } else if ! errors .Is (err , os .ErrNotExist ) {
179
+ return err
180
+ }
174
181
}
182
+
183
+ if len (keys ) == 0 {
184
+ return nil
185
+ }
186
+
175
187
return s .RelabelFiles (keys )
176
188
}
You can’t perform that action at this time.
0 commit comments