Comment 3 for bug 1904739

Revision history for this message
Ghada Khalil (gkhalil) wrote :

Re-opening to add a follow-up code change that enhances how the hieradata gets copied:
https://opendev.org/starlingx/config/src/branch/master/controllerconfig/controllerconfig/scripts/controller_config#L498

The previous code was copying to /tmp, a volatile FS. If interrupted with a reboot, the content is gone, so no risk of corrupted or missing data. Now, however, it’s a basic cp to persistent storage. A reboot in the midst of that would leave us with a potential issue. So it may be better to do an rsync to a holding directory like /etc/puppet/cache.tmp, which can then be more-atomically renamed to /etc/puppet/cache once the rsync is complete. If a reboot occurs while the rsync is copying data, then, we don’t risk applying manifests with incomplete or corrupted data. We may even want a “sync” to flush the data to disk before the rename.