https://issues.rudder.io/https://issues.rudder.io/themes/rudder7/favicon/favicon.ico?17096450182016-12-22T07:56:50ZIssue TrackerRudder - Bug #9841: Error parsing inventoryhttps://issues.rudder.io/issues/9841?journal_id=685332016-12-22T07:56:50ZNicolas CHARLESnicolas.charles@rudder.io
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-16 priority-default closed" href="/issues/8045">Bug #8045</a>: Using Rudder server 3.x + rudder agent 2.11.x, a node doesn't properly detect its change of relay server</i> added</li></ul> Rudder - Bug #9841: Error parsing inventoryhttps://issues.rudder.io/issues/9841?journal_id=685352016-12-22T08:00:10ZNicolas CHARLESnicolas.charles@rudder.io
<ul></ul><p>Hi Janos,</p>
<p>Thank you for this ticket<br />Tag POLICY_SERVER_UUID is empty. In 2.11, it is read from /var/rudder/tmp/uuid.txt<br />However, message is about tag POLICY_SERVER, added by promises in add_information_to_inventory, only if class uuiddefined is defined, so only if command /usr/sbin/dmidecode -s system-uuid could be run<br />Do you have dmidecode on the system ?</p> Rudder - Bug #9841: Error parsing inventoryhttps://issues.rudder.io/issues/9841?journal_id=685362016-12-22T08:15:19ZNicolas CHARLESnicolas.charles@rudder.io
<ul></ul><p>Also, do you have a non empty file in /var/rudder/cfengine-community/rudder-server-uuid.txt ?<br />Do you have the TAG POLICY_SERVER in the inventory file ?</p> Rudder - Bug #9841: Error parsing inventoryhttps://issues.rudder.io/issues/9841?journal_id=685372016-12-22T08:30:22ZNicolas CHARLESnicolas.charles@rudder.io
<ul></ul><p>As seen on IRC: this is a xen DomU system, so the UUID is computed differently.<br />Could you check that the following command returns something<br />/bin/xenstore-read vm</p>
<p>inventory checks that it returns something like /vm/(.*), and extract the uuid based on what is captured. If something is captured, it will add the data in the inventory, otherwith, tag POLICY_SERVER won't be created</p> Rudder - Bug #9841: Error parsing inventoryhttps://issues.rudder.io/issues/9841?journal_id=685382016-12-22T08:49:55ZNicolas CHARLESnicolas.charles@rudder.io
<ul></ul><p>As discussed on IRC, error is:<br /><pre>
09:46:02 < matya> ** was marked for editing but could not be opened
09:46:10 < matya> File '...' is bigger than the limit edit.max_file_size = 2159680 > 1024000 bytes
</pre><br />so rudder data could not be added by the agent</p> Rudder - Bug #9841: Error parsing inventoryhttps://issues.rudder.io/issues/9841?journal_id=685392016-12-22T09:02:04ZJanos Mattyasovszky
<ul></ul><p>Ok as we have just found out, it's because we have so many processes running on the system, the inventory exceeds the allowed <code>max_file_size</code> in the edit promise:</p>
<pre>
2016-12-22T09:45:35+0100 info: /default/doInventory/methods/'any'/default/addInformationsToInventory/files/'/var/rudder/tmp/inventory/badserver-150a61ba-4ed5-11e5-a7c9-xxxxxxxx.ocs'[0]: File '/var/rudder/tmp/inventory/badserver-150a61ba-4ed5-11e5-a7c9-xxxxxxxx.ocs' is bigger than the limit edit.max_file_size = 2159680 > 1024000 bytes
2016-12-22T09:45:35+0100 error: /default/doInventory/methods/'any'/default/addInformationsToInventory/files/'/var/rudder/tmp/inventory/badserver-150a61ba-4ed5-11e5-a7c9-xxxxxxxx.ocs'[0]: File '/var/rudder/tmp/inventory/badserver-150a61ba-4ed5-11e5-a7c9-xxxxxxxx.ocs' was marked for editing but could not be opened
2016-12-22T09:45:35+0100 info: /default/doInventory/methods/'any'/default/addInformationsToInventory/files/'/var/rudder/tmp/inventory/badserver-150a61ba-4ed5-11e5-a7c9-xxxxxxxx.ocs'[0]: File '/var/rudder/tmp/inventory/badserver-150a61ba-4ed5-11e5-a7c9-xxxxxxxx.ocs' is bigger than the limit edit.max_file_size = 2159680 > 1024000 bytes
2016-12-22T09:45:35+0100 error: /default/doInventory/methods/'any'/default/addInformationsToInventory/files/'/var/rudder/tmp/inventory/badserver-150a61ba-4ed5-11e5-a7c9-xxxxxxxx.ocs'[0]: File '/var/rudder/tmp/inventory/badserver-150a61ba-4ed5-11e5-a7c9-xxxxxxxx.ocs' was marked for editing but could not be opened
2016-12-22T09:45:35+0100 error: /default/doInventory/methods/'any'[0]: Method 'addInformationsToInventory' failed in some repairs
</pre>
<p>I have applied a local patch to the <code>fusionAgent.cf</code>, and now it works like a charm:</p>
<pre>
# diff -u fusionAgent.cf.orig fusionAgent.cf
--- fusionAgent.cf.orig 2016-12-22 09:54:31.000000000 +0100
+++ fusionAgent.cf 2016-12-22 09:54:52.000000000 +0100
@@ -429,18 +429,18 @@
"${fusionAgent.inventory_path_edition}"
edit_line => add_information_to_inventory(${RUDDERUUID}, ${CFKEY}, ${USER}, ${polserv_uuid}),
comment => "Adding basic informations to Rudder Inventory",
- edit_defaults => def_no_backup;
+ edit_defaults => def_no_backup_size("10M");
"${fusionAgent.inventory_path_edition}"
edit_line => add_users_information_to_inventory(@{addInformationsToInventory.users}),
comment => "Adding user informations to Rudder Inventory",
- edit_defaults => def_no_backup;
+ edit_defaults => def_no_backup_size("10M");
uuiddefined.rudder_server_roles_dir_exists::
"${fusionAgent.inventory_path_edition}"
edit_line => add_server_roles_information_to_inventory("@{addInformationsToInventory.rudder_roles}"),
comment => "Adding server roles informations to Rudder Inventory",
- edit_defaults => def_no_backup;
+ edit_defaults => def_no_backup_size("10M");
android::
"${g.rudder_var_tmp}/inventory/.*.ocs"
</pre> Rudder - Bug #9841: Error parsing inventoryhttps://issues.rudder.io/issues/9841?journal_id=685432016-12-22T09:18:15ZJanos Mattyasovszky
<ul></ul><p>I have just checked, the biggest inventory (which I've found in the <code>inventories/failed</code> dir) is about ~6MB big. I'd recommend using <strong>25MB</strong> as size. <br />As you've mentioned, we are on the edge of 2017, so opening 25MB for editing should be reasonably safe (I mean, it's probably a much safer decision than all distros going to systemd :-} )</p> Rudder - Bug #9841: Error parsing inventoryhttps://issues.rudder.io/issues/9841?journal_id=685442016-12-22T10:18:44ZNicolas CHARLESnicolas.charles@rudder.io
<ul><li><strong>Category</strong> set to <i>System techniques</i></li><li><strong>Target version</strong> set to <i>3.1.18</i></li></ul> Rudder - Bug #9841: Error parsing inventoryhttps://issues.rudder.io/issues/9841?journal_id=685462016-12-22T10:24:38ZNicolas CHARLESnicolas.charles@rudder.io
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In progress</i></li><li><strong>Assignee</strong> set to <i>Nicolas CHARLES</i></li></ul> Rudder - Bug #9841: Error parsing inventoryhttps://issues.rudder.io/issues/9841?journal_id=685472016-12-22T10:26:46ZNicolas CHARLESnicolas.charles@rudder.io
<ul><li><strong>Status</strong> changed from <i>In progress</i> to <i>Pending technical review</i></li><li><strong>Assignee</strong> changed from <i>Nicolas CHARLES</i> to <i>Alexis Mousset</i></li><li><strong>Pull Request</strong> set to <i>https://github.com/Normation/rudder-techniques/pull/1095</i></li></ul><p>PR <a class="external" href="https://github.com/Normation/rudder-techniques/pull/1095">https://github.com/Normation/rudder-techniques/pull/1095</a></p> Rudder - Bug #9841: Error parsing inventoryhttps://issues.rudder.io/issues/9841?journal_id=686412016-12-29T10:26:53ZNicolas CHARLESnicolas.charles@rudder.io
<ul><li><strong>Status</strong> changed from <i>Pending technical review</i> to <i>Pending release</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Applied in changeset <a class="changeset" title="Fixes #9841: Error parsing inventory" href="https://issues.rudder.io/projects/rudder/repository/rudder-techniques/revisions/c8b6e916605f83f0395e4ec18d6cf1864e8f0b32">rudder-techniques|c8b6e916605f83f0395e4ec18d6cf1864e8f0b32</a>.</p> Rudder - Bug #9841: Error parsing inventoryhttps://issues.rudder.io/issues/9841?journal_id=714102017-02-20T15:26:00ZVincent MEMBRÉvme@rudder.io
<ul><li><strong>Status</strong> changed from <i>Pending release</i> to <i>Released</i></li></ul><p>This bug has been fixed in Rudder 3.1.18, 3.2.11, 4.0.3 and 4.1.0~beta3 which were released today.</p>
<ul>
<li>3.1.18: <a href="http://www.rudder-project.org/pipermail/rudder-announce/2017-February/thread.html000222.html" class="external">Announce</a> <a href="http://www.rudder-project.org/changelog-3.1" class="external">Changelog</a></li>
<li>3.2.11: <a href="http://www.rudder-project.org/pipermail/rudder-announce/2017-February/thread.html000221.html" class="external">Announce</a> <a href="http://www.rudder-project.org/changelog-3.2" class="external">Changelog</a></li>
<li>4.0.3: <a href="http://www.rudder-project.org/pipermail/rudder-announce/2017-February/thread.html000220.html" class="external">Announce</a> <a href="http://www.rudder-project.org/changelog-4.0" class="external">Changelog</a></li>
<li>4.1.0~beta3: <a href="http://www.rudder-project.org/pipermail/rudder-announce/2017-February/thread.html000219.html" class="external">Announce</a> <a href="http://www.rudder-project.org/changelog-4.1" class="external">Changelog</a></li>
<li>Download: <a class="external" href="https://www.rudder-project.org/site/get-rudder/downloads/">https://www.rudder-project.org/site/get-rudder/downloads/</a></li>
</ul>