https://issues.rudder.io/https://issues.rudder.io/themes/rudder7/favicon/favicon.ico?17096450182013-04-03T14:57:35ZIssue TrackerRudder - Bug #3385: The file /etc/services could not be updatedhttps://issues.rudder.io/issues/3385?journal_id=161102013-04-03T14:57:35ZJonathan CLARKEjonathan.clarke@normation.com
<ul></ul><p>Dennis, I'm not sure I really understand what's going on here. How did you attempt to modify this file? Which Technique (and version) did you use, was it a file copy, or a file edit? And what errors did you encounter? Some logs would be useful, also.</p> Rudder - Bug #3385: The file /etc/services could not be updatedhttps://issues.rudder.io/issues/3385?journal_id=161112013-04-03T15:25:47ZDennis Cabooterdcabooter@snow.nl
<ul></ul><p>It's a file edit. In the same way I edited other files within the same directive. There are no useful errors, only "The file /etc/services could not be updated". Also in syslog on the rudder-client this is the only message that appears. "Force file contents" box is not ticked, because I just need to append some services.</p> Rudder - Bug #3385: The file /etc/services could not be updatedhttps://issues.rudder.io/issues/3385?journal_id=161332013-04-04T15:37:02ZJonathan CLARKEjonathan.clarke@normation.com
<ul><li><strong>Category</strong> set to <i>Techniques</i></li><li><strong>Target version</strong> set to <i>2.3.12</i></li></ul><p>Huh, that is indeed very weird. Any chance you could send us the generated CFEngine promise file, so we can try and reproduce this here?</p>
<p>You should be able to find it on the node (rudder-client) where it fails, under /var/rudder/cfengine-community/inputs/checkGenericFileContent/*/*.cf.</p> Rudder - Bug #3385: The file /etc/services could not be updatedhttps://issues.rudder.io/issues/3385?journal_id=161382013-04-04T15:52:58ZDennis Cabooterdcabooter@snow.nl
<ul></ul><p>I will send the promise file tomorrow. Thanks for your update.</p> Rudder - Bug #3385: The file /etc/services could not be updatedhttps://issues.rudder.io/issues/3385?journal_id=161622013-04-05T08:29:56ZDennis Cabooterdcabooter@snow.nl
<ul><li><strong>File</strong> <i>checkGenericFileContent.cf</i> added</li></ul><p>Hereby the CFengine promise file as you requested.</p> Rudder - Bug #3385: The file /etc/services could not be updatedhttps://issues.rudder.io/issues/3385?journal_id=161652013-04-05T08:41:21ZJonathan CLARKEjonathan.clarke@normation.com
<ul><li><strong>File</strong> deleted (<del><i>checkGenericFileContent.cf</i></del>)</li></ul> Rudder - Bug #3385: The file /etc/services could not be updatedhttps://issues.rudder.io/issues/3385?journal_id=161662013-04-05T08:42:14ZJonathan CLARKEjonathan.clarke@normation.com
<ul></ul><p>Thanks for this Dennis. I just checked your file and it seemed to contain some sensitive data internal to your organization. As a precautionary measure, I have removed it from the bugtracker.</p>
<p>Could you check, and confirm that this info is public, or obfuscate it in the file, and resend?</p> Rudder - Bug #3385: The file /etc/services could not be updatedhttps://issues.rudder.io/issues/3385?journal_id=161922013-04-09T13:03:11ZDennis Cabooterdcabooter@snow.nl
<ul></ul><p>Finally I found the problem in the CFengine logs:</p>
<pre>
!! File /etc/services is bigger than the limit edit.max_file_size = 362031 > 0 bytes
File /etc/services was marked for editing but could not be opened
</pre> Rudder - Bug #3385: The file /etc/services could not be updatedhttps://issues.rudder.io/issues/3385?journal_id=161982013-04-09T15:12:29ZDennis Cabooterdcabooter@snow.nl
<ul></ul><p>And here is the fix:</p>
<pre>--- /var/rudder/share/ce7836bf-d512-4282-9240-26ffec2c5b49/rules/cfengine-community/common/1.0/rudder_lib.cf.orig 2013-04-09 17:01:55.336441268 +0200
+++ /var/rudder/share/ce7836bf-d512-4282-9240-26ffec2c5b49/rules/cfengine-community/common/1.0/rudder_lib.cf 2013-04-09 17:08:37.307669649 +0200
@@ -139,14 +139,14 @@
{
empty_file_before_editing => "false";
edit_backup => "timestamp"; # we want to keep a track of everything
-max_file_size => "300000";
+max_file_size => "1024000";
}
body edit_defaults empty_backup
{
empty_file_before_editing => "true";
edit_backup => "timestamp";
-max_file_size => "300000";
+max_file_size => "1024000";
}
@@ -337,7 +337,7 @@
body edit_defaults rudder_empty_select(select)
{
empty_file_before_editing => "$(select)";
-max_file_size => "300000";
+max_file_size => "1024000";
edit_backup => "timestamp";
}
</pre> Rudder - Bug #3385: The file /etc/services could not be updatedhttps://issues.rudder.io/issues/3385?journal_id=162002013-04-09T15:36:51ZMatthieu CERDAmatthieu.cerda@normation.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>8</i></li><li><strong>Assignee</strong> set to <i>Matthieu CERDA</i></li><li><strong>Priority</strong> changed from <i>N/A</i> to <i>1</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>20</i></li></ul><p>Hello Dennis.</p>
<p>I agree with the fix, but may I suggest that you use the "Download from a shared folder" technique instead for big files ?</p>
<p>Indeed, the /etc/services file is quite big and for every file you edit on the same machine using the "Enforce a file content", you append the whole file content on a single CFEngine promise file, which can, in case of lots of big files, reach de limits of CFEngines tolerances.</p>
<p>Thanks for the patch anyway, it is much welcome. I'm opening a pull request with it.</p> Rudder - Bug #3385: The file /etc/services could not be updatedhttps://issues.rudder.io/issues/3385?journal_id=162012013-04-09T16:40:14ZMatthieu CERDAmatthieu.cerda@normation.com
<ul></ul><p>Oops, sorry I misunderstood what you are trying to do.</p>
<p>Well, OK this is a totally valid fix then, disregard what I said in #10.</p> Rudder - Bug #3385: The file /etc/services could not be updatedhttps://issues.rudder.io/issues/3385?journal_id=162022013-04-09T16:45:48ZMatthieu CERDAmatthieu.cerda@normation.com
<ul></ul><p>Checked in all the PT/Techniques, there is no side effect when modifying max_file_size. Green light.</p> Rudder - Bug #3385: The file /etc/services could not be updatedhttps://issues.rudder.io/issues/3385?journal_id=162032013-04-09T16:54:38ZMatthieu CERDAmatthieu.cerda@normation.com
<ul><li><strong>Status</strong> changed from <i>8</i> to <i>Pending technical review</i></li><li><strong>Assignee</strong> changed from <i>Matthieu CERDA</i> to <i>Jonathan CLARKE</i></li><li><strong>% Done</strong> changed from <i>20</i> to <i>100</i></li><li><strong>Pull Request</strong> set to <i>https://github.com/Normation/rudder-techniques/pull/69</i></li></ul><p>Technical review to be done. => <a class="external" href="https://github.com/Normation/rudder-techniques/pull/69">https://github.com/Normation/rudder-techniques/pull/69</a></p> Rudder - Bug #3385: The file /etc/services could not be updatedhttps://issues.rudder.io/issues/3385?journal_id=162182013-04-09T18:42:19ZMatthieu CERDAmatthieu.cerda@normation.com
<ul><li><strong>Status</strong> changed from <i>Pending technical review</i> to <i>Pending release</i></li></ul><p>Applied in changeset policy-templates:commit:36457b3582acec0ad5766513a484c2e60cae5de3.</p> Rudder - Bug #3385: The file /etc/services could not be updatedhttps://issues.rudder.io/issues/3385?journal_id=162192013-04-09T18:42:19ZJonathan CLARKEjonathan.clarke@normation.com
<ul></ul><p>Applied in changeset policy-templates:commit:72bd1a59bf8ba9f6cc2b81d0c978d51b023f1d58.</p> Rudder - Bug #3385: The file /etc/services could not be updatedhttps://issues.rudder.io/issues/3385?journal_id=162202013-04-09T18:43:10ZJonathan CLARKEjonathan.clarke@normation.com
<ul><li><strong>Assignee</strong> changed from <i>Jonathan CLARKE</i> to <i>Matthieu CERDA</i></li><li><strong>Priority</strong> changed from <i>1</i> to <i>N/A</i></li><li><strong>% Done</strong> changed from <i>100</i> to <i>0</i></li></ul><p>Looks good to me, merged into 2.3.</p>
<p>Matthieu, can you do the merges into 2.4/2.5/2.6, because I think they will not be automatic (or at least not sufficient in automatic mode).</p> Rudder - Bug #3385: The file /etc/services could not be updatedhttps://issues.rudder.io/issues/3385?journal_id=174882013-05-03T15:15:52ZNicolas PERRONnicolas.perron@normation.com
<ul><li><strong>Status</strong> changed from <i>Pending release</i> to <i>Released</i></li></ul>