Ticket #120 (closed defect: fixed)
Race condition when later modules override files from earlier modules
| Reported by: | blee | Owned by: | blee |
|---|---|---|---|
| Priority: | critical | Milestone: | confman-1.9.4 |
| Component: | confman | Version: | 1.9.3b |
| Keywords: | Cc: |
Description
Files that get overridden by later modules in a recipe should never get installed to the filesystem.
For example, consider the sudoers file.
Recipe "base" does not allow the use of sudo:
base/usr/local/etc/sudoers
But recipe "sudo-wheel" allows members of group wheel to run sudo:
sudo-wheel/usr/local/etc/sudoers
And a sample recipe r:
base sudo-wheel
Running 'confman commit' on a machine using recipe r will leave the machine in a broken state, since the base sudoers file will prevent confman commit from proceeding.
This may have rather unexpected effects for files other than sudoers as well (e.g. nsswitch.conf).
Change History
comment:3 Changed 7 weeks ago by ccowart
(In [545]) WIP: Fixing race condition. And committing to the right place (trunk).
Overall design change:
- Commit modules in _reverse_ order
- Keep a list of "committed" files and don't re-commit if we encounter the same filesystem path in a later module
I need some help reviewing this change, especially as it relates to the
install operation; I'm not convinced the implementation is complete yet.
See #120.
comment:10 Changed 7 weeks ago by blee
comment:11 Changed 7 weeks ago by blee
comment:12 Changed 7 weeks ago by blee
- Owner changed from confman-developers@… to blee
- Status changed from new to needsmerge
comment:13 Changed 7 weeks ago by blee
- Status changed from needsmerge to closed
- Resolution set to fixed

(In [543]) WIP: Fixing race condition.
Overall design change:
I need some help reviewing this change, especially as it relates to the
install operation; I'm not convinced the implementation is complete yet.
See #120.