Bug #5739
closedThe agent doesn't manage properly non modifiable files
Description
If a file is on a readonly filesystem, cfengine can't edit it but issues a promise_repaired.
Here is the code to test it : chattr +i /tmp/test
bundle agent test { files: "/tmp/test" create => "true", edit_line => edit_one_line; } body classes all { promise_repaired => { "promise_repaired" }; repair_failed => { "repair_failed" }; repair_denied => { "repair_denied" }; repair_timeout => { "repair_timeout" }; promise_kept => { "promise_kept" }; cancel_kept => { "cancel_kept" }; cancel_repaired => { "cancel_repaired" }; cancel_notkept => { "cancel_notkept" }; } body location first_line { before_after => "before"; first_last => "first"; select_line_matching => ".*"; } bundle edit_line edit_one_line { insert_lines: "EDIT TEST !!" classes => all, location => first_line; reports: promise_repaired:: "promise_repaired"; repair_failed:: "repair_failed"; repair_denied:: "repair_denied"; repair_timeout:: "repair_timeout"; promise_kept:: "promise_kept"; cancel_kept:: "cancel_kept"; cancel_repaired:: "cancel_repaired"; cancel_notkept:: "cancel_notkept"; }
And the code to run it
echo test > /tmp/test chattr +i /tmp/test cf-agent -KI -f ./test.cf R: promise_repaired 2014-11-05T12:19:39+0100 error: /default/test4/files/'/tmp/test'[0]: Can't rename '/tmp/test.cf-after-edit' to '/tmp/test' - so promised edits could not be moved into place. (rename: Operation not permitted) 2014-11-05T12:19:39+0100 error: /default/test4/files/'/tmp/test'[0]: Unable to save file '/tmp/test' after editing
Updated by Jonathan CLARKE about 10 years ago
- Target version changed from 3.0.0~beta1 to 3.0.0~beta2
Updated by François ARMAND about 10 years ago
- Target version changed from 3.0.0~beta2 to 3.0.0~rc1
Updated by Vincent MEMBRÉ almost 10 years ago
- Target version changed from 3.0.0~rc1 to 3.0.0
Updated by François ARMAND almost 10 years ago
- Target version changed from 3.0.0 to 2.10.9
This seems to be an old bug, not specific to 3.0
Updated by Vincent MEMBRÉ almost 10 years ago
- Target version changed from 2.10.9 to 2.10.10
Updated by Vincent MEMBRÉ almost 10 years ago
- Target version changed from 2.10.10 to 2.10.11
Updated by Vincent MEMBRÉ almost 10 years ago
- Target version changed from 2.10.11 to 2.10.12
Updated by Vincent MEMBRÉ almost 10 years ago
- Target version changed from 2.10.12 to 2.10.13
Updated by Nicolas CHARLES over 9 years ago
- Assignee changed from Nicolas CHARLES to Benoît PECCATTE
This is a knwon bug in CFEngine ( https://dev.cfengine.com/issues/3184 ) and it seems it is fixed according to the ticket state
Benoit, could you check on 3.6.0 and 3.6.5 ?
Updated by Benoît PECCATTE over 9 years ago
- Assignee deleted (
Benoît PECCATTE)
This bug has not been solved in 3.6.0 nor in 3.6.3 whereas cfe cfengine issue marks it as solved in 3.6.0
Updated by François ARMAND over 9 years ago
- Category set to Agent
- Assignee set to Nicolas CHARLES
Nicolas, could you use your big voice on cfengine bugtracker to say it's not solved ? That would impress them much :)
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 2.10.13 to 2.10.14
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 2.10.14 to 2.10.15
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 2.10.15 to 2.10.16
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 2.10.16 to 2.10.17
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 2.10.17 to 2.10.18
Updated by Vincent MEMBRÉ about 9 years ago
- Target version changed from 2.10.18 to 2.10.19
Updated by Vincent MEMBRÉ about 9 years ago
- Target version changed from 2.10.19 to 2.10.20
Updated by Vincent MEMBRÉ about 9 years ago
- Target version changed from 2.10.20 to 277
Updated by Vincent MEMBRÉ about 9 years ago
- Target version changed from 277 to 2.11.18
Updated by Vincent MEMBRÉ almost 9 years ago
- Target version changed from 2.11.18 to 2.11.19
Updated by Vincent MEMBRÉ almost 9 years ago
- Target version changed from 2.11.19 to 2.11.20
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 2.11.20 to 2.11.21
Updated by François ARMAND over 8 years ago
Nicolas or Jon, could you use you big voice on the CFEngine bugtracker ?
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 2.11.21 to 2.11.22
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 2.11.22 to 2.11.23
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 2.11.23 to 2.11.24
Updated by Alexis Mousset over 8 years ago
- Subject changed from cfengine doesn't manage properly non modifiable files to The agent doesn't manage properly non modifiable files
- Assignee changed from Nicolas CHARLES to Alexis Mousset
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 2.11.24 to 308
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 308 to 3.1.14
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.14 to 3.1.15
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.15 to 3.1.16
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.16 to 3.1.17
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.17 to 3.1.18
Updated by Vincent MEMBRÉ almost 8 years ago
- Target version changed from 3.1.18 to 3.1.19
Updated by François ARMAND over 7 years ago
- Severity set to Major - prevents use of part of Rudder | no simple workaround
- User visibility set to Infrequent - complex configurations | third party integrations
- Priority set to 0
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.19 to 3.1.20
Updated by Alexis Mousset over 7 years ago
- Effort required set to Medium
This happens because the definition of the outcome class is done in a completely separate context than the actual writing of the file. This probably requires quite a lot of refactoring the the files promises, setting to medium.
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.20 to 3.1.21
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.21 to 3.1.22
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.22 to 3.1.23
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.23 to 3.1.24
Updated by Vincent MEMBRÉ about 7 years ago
- Target version changed from 3.1.24 to 3.1.25
Updated by Vincent MEMBRÉ about 7 years ago
- Target version changed from 3.1.25 to 387
Updated by Vincent MEMBRÉ about 7 years ago
- Target version changed from 387 to 4.1.10
Updated by Vincent MEMBRÉ almost 7 years ago
- Target version changed from 4.1.10 to 4.1.11
- Priority changed from 20 to 21
Updated by Vincent MEMBRÉ over 6 years ago
- Target version changed from 4.1.11 to 4.1.12
Updated by Vincent MEMBRÉ over 6 years ago
- Target version changed from 4.1.12 to 4.1.13
Updated by Vincent MEMBRÉ over 6 years ago
- Target version changed from 4.1.13 to 4.1.14
Updated by Benoît PECCATTE over 6 years ago
- Target version changed from 4.1.14 to 4.1.15
- Priority changed from 21 to 22
Updated by Vincent MEMBRÉ about 6 years ago
- Target version changed from 4.1.15 to 4.1.16
Updated by Vincent MEMBRÉ about 6 years ago
- Target version changed from 4.1.16 to 4.1.17
Updated by Vincent MEMBRÉ about 6 years ago
- Target version changed from 4.1.17 to 4.1.18
Updated by Vincent MEMBRÉ almost 6 years ago
- Target version changed from 4.1.18 to 4.1.19
Updated by Alexis Mousset almost 6 years ago
- Target version changed from 4.1.19 to 4.1.20
- Priority changed from 22 to 23
Updated by Alexis Mousset over 5 years ago
- Target version changed from 4.1.20 to 588
Updated by Alexis Mousset over 5 years ago
- Target version changed from 588 to 5.0.13
Updated by Vincent MEMBRÉ over 5 years ago
- Target version changed from 5.0.13 to 5.0.14
- Priority changed from 23 to 24
Updated by Vincent MEMBRÉ about 5 years ago
- Target version changed from 5.0.14 to 5.0.15
Updated by Vincent MEMBRÉ about 5 years ago
- Target version changed from 5.0.15 to 5.0.16
Updated by Alexis Mousset almost 5 years ago
- Target version changed from 5.0.16 to 5.0.17
Updated by Vincent MEMBRÉ over 4 years ago
- Target version changed from 5.0.17 to 5.0.18
Updated by Vincent MEMBRÉ over 4 years ago
- Target version changed from 5.0.18 to 5.0.19
Updated by Vincent MEMBRÉ over 4 years ago
- Target version changed from 5.0.19 to 5.0.20
Updated by Vincent MEMBRÉ about 4 years ago
- Target version changed from 5.0.20 to 797
Updated by Benoît PECCATTE over 3 years ago
- Target version changed from 797 to 6.1.14
Updated by Vincent MEMBRÉ over 3 years ago
- Target version changed from 6.1.14 to 6.1.15
Updated by Vincent MEMBRÉ over 3 years ago
- Target version changed from 6.1.15 to 6.1.16
Updated by Vincent MEMBRÉ over 3 years ago
- Target version changed from 6.1.16 to 6.1.17
Updated by Vincent MEMBRÉ about 3 years ago
- Target version changed from 6.1.17 to 6.1.18
Updated by Vincent MEMBRÉ about 3 years ago
- Target version changed from 6.1.18 to 6.1.19
Updated by François ARMAND almost 3 years ago
- Subject changed from The agent doesn't manage properly non modifiable files to Validate that cf-agent 3.18 properly manage non modifiable files
- Effort required changed from Medium to Very Small
- Priority changed from 24 to 70
It was tracked on https://tracker.mender.io/browse/CFE-821
But https://tracker.mender.io/browse/CFE-3578 seems to be a duplicate and was corrected in CFE 3.18 => need validation
Setting to very small for the validation
Updated by Alexis Mousset almost 3 years ago
- Subject changed from Validate that cf-agent 3.18 properly manage non modifiable files to The agent doesn't manage properly non modifiable files
Still true, it only fixes the classes for permission attribute, but not content (which is way trickier due to files promises architecture).
Updated by Alexis Mousset over 2 years ago
- Status changed from New to Resolved
This is fixed in latest master https://tracker.mender.io/browse/CFE-821