Bug #9829
closed
Agent inventory generation invalid if hostname is not defined
Added by Romuald Bouvard almost 8 years ago.
Updated over 7 years ago.
Category:
System techniques
Severity:
Major - prevents use of part of Rudder | no simple workaround
User visibility:
Getting started - demo | first install | level 1 Techniques
Description
Dear support,
I'm testing the version of RUDDER 4.0 and the AGENT 4.0.2
I've an issue when i'm generating a reporting by :
rudder agent inventory
Start execution with config [0]
M| State Technique Component Key Message
E| error Inventory inventory Generated inventory has been detected as invalid
- Summary #####################################################################
1 components verified in 2 directives
=> 1 components in Enforce mode
-> 1 error
execution time: 10.33s
Can you please help me with this ?
thanks
Romuald
- Category set to System techniques
- Target version set to 4.0.3
Hello Romuald,
Thank you for your ticket.
To troubleshoot this issue, could you please tell us:
- which operating system are you using
- send us the verbose output of the agent (caution, it may contain sensitive information like IP address/hostname of the node and Rudder server, so you may need to sanitize it) obtained with command "rudder agent inventory -v"
Thank you !
Hello Nicolas,
sorry for my late answer. I solved the issue by edited the /etc/hosts file then replace the localhost by the hostname of my device --
thanks
Romuald
- Subject changed from Agent inventory to Agent inventory generation invalid if hostname is not defined
- Assignee set to Benoît PECCATTE
Thank you for this ticket Romuald,
Benoit, do you know why the inventory would be deemed invalid ?
- Target version changed from 4.0.3 to 4.0.4
- Found in version (s) 4.0.2 added
- Found in version(s) old deleted (
4.0.2)
- Severity set to Minor - inconvenience | misleading | easy workaround
- User visibility set to Operational - other Techniques | Technique editor | Rudder settings
- Priority set to 16
- Target version changed from 4.0.4 to 4.0.5
- Assignee deleted (
Benoît PECCATTE)
- Severity changed from Minor - inconvenience | misleading | easy workaround to Major - prevents use of part of Rudder | no simple workaround
- User visibility changed from Operational - other Techniques | Technique editor | Rudder settings to Getting started - demo | first install | level 1 Techniques
- Priority changed from 16 to 51
Nicolas CHARLES wrote:
Thank you for this ticket Romuald,
Benoit, do you know why the inventory would be deemed invalid ?
As the ticket subject says, because the hostname is invalid. The code that checks this is here: https://github.com/Normation/rudder-techniques/blob/master/techniques/system/inventory/1.0/test-inventory.pl.st#L35
There are two problems here really:
- The fact that we need a real hostname to go forward - probably not an easy constraint to work around
- The fact that the error message is not actionable, and a new user would have no idea how to fix this - this is probably what we should focus on
Requalifying the priority of this.
We check many things for validity, the precise message is however lost by cfengine.
The error message you get when an inventory is invalid is
- WARNING Generated inventory is not valid, as it is missing mandatory fields. *
- Not sending it to the Rudder Server *
- You can check the invalid inventory in ${g.rudder_var_tmp}/inventory/ *
We should add more information.
In the case when the hostname is not properly set however we cannot do better than telling the user to change it or put it in the hosts file.
- Status changed from New to In progress
- Assignee set to Benoît PECCATTE
- Status changed from In progress to Pending technical review
- Assignee changed from Benoît PECCATTE to Alexis Mousset
- Pull Request set to https://github.com/Normation/rudder-techniques/pull/1138
- Status changed from Pending technical review to Pending release
- Status changed from Pending release to Released
This bug has been fixed in Rudder 4.0.5 and 4.1.2 which were released today.
Also available in: Atom
PDF