Skip to content

Commit

Permalink
daemon: be honest about our ability to reconcile dirs & links
Browse files Browse the repository at this point in the history
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: openshift#125
  • Loading branch information
jlebon committed Jan 18, 2019
1 parent f9ca131 commit fa488ed
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions pkg/daemon/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit fa488ed

Please sign in to comment.