(#20607) - do not fail saving lastrunfile when mode is specified#1722
(#20607) - do not fail saving lastrunfile when mode is specified#1722adrienthebo merged 1 commit intopuppetlabs:masterfrom
Conversation
|
CLA Signed by masterzen on 2010-08-14 21:00:00 -0700 |
|
This is a great patch that solves the specific problem with This way, we provide file mode validation for all |
|
Well, that would change the replace_file API (is it public?), it would then require a string instead of an octal number (as it is now). But, one thing that could be done is that there are absolutely no mode validation in the settings system (because it is handled in the file resource when the file is created (as was the last run file done beforehand)). We could add the validation in the settings subsystem. |
Detecting the input format and accepting both Integer and String |
|
@daniel-pittman I wasn't really concerned by the performance :) |
Nope.
Which is the present situation, no? I think we can rely on human |
|
Also one road-block ahead is that |
In order to fix #20607 (where incorrect 'settings specified' file permissions were crashing P::U#replace_file), this patch enhance P::U#replace_file default_mode behavior. Now P::U#replace_file supports symbolic file mode, along with octal numerical string, and pure octal integers. It also now fails if the given mode is incorrect. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
|
OK, I've rewritten the patch to enhance |
(#20607) - do not fail saving lastrunfile when mode is specified
|
summary: merged into master in 9744456; this should be released in 3.3.0. Thanks! |
|
Apparently this broke the windows tests, which I'm afraid I don't have any way to run. |
The current settings system to specify the mode of "settings" file
is quite forgiving, but the method (replace_File) used to save
the last run summary file wasn't.
Hopefully with the help of the symbolic_file_mode system, we're now
able to send replace_file a correct file permission mode.
Signed-off-by: Brice Figureau brice-puppet@daysofwonder.com