daemon: be honest about our ability to reconcile dirs & links
Otherwise we'll end up in a situation where someone thinks they're
supported and we won't error out and also not create them.
Related:
@@ -206,9 +206,8 @@ func (dn *Daemon) reconcilable(oldConfig, newConfig *mcfgv1.MachineConfig) *stri
// Storage section
- // there are six subsections here - directories, files, and links, which we
- // can reconcile, and disks, filesystems, and raid, which we can't. make
- // sure the sections we can't fix aren't changed.
+ // we can only reconcile files right now. make sure the sections we can't
+ // fix aren't changed.
if !reflect.DeepEqual(oldIgn.Storage.Disks, newIgn.Storage.Disks) {
msg := "Ignition disks section contains changes"
return &msg
@@ -221,6 +220,14 @@ func (dn *Daemon) reconcilable(oldConfig, newConfig *mcfgv1.MachineConfig) *stri
msg := "Ignition raid section contains changes"
return &msg
}
+ if !reflect.DeepEqual(oldIgn.Storage.Directories, newIgn.Storage.Directories) {
+ msg := "Ignition directories section contains changes"
+ return &msg
+ }
+ if !reflect.DeepEqual(oldIgn.Storage.Links, newIgn.Storage.Links) {
+ msg := "Ignition links section contains changes"
+ return &msg
+ }
// Special case files append: if the new config wants us to append, then we
// have to force a reprovision since it's not idempotent
