From fa488edabc39c46e52cf9d5503261173086a9d1b Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Fri, 18 Jan 2019 15:27:16 -0500 Subject: [PATCH] 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: #125 --- pkg/daemon/update.go | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkg/daemon/update.go b/pkg/daemon/update.go index 158f8769ca..6b3a39b065 100644 --- a/pkg/daemon/update.go +++ b/pkg/daemon/update.go @@ -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