Bug #9829
closedAgent inventory generation invalid if hostname is not defined
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
Updated by Nicolas CHARLES almost 8 years ago
- 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 !
Updated by Romuald Bouvard almost 8 years ago
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
Updated by Nicolas CHARLES almost 8 years ago
- 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 ?
Updated by Vincent MEMBRÉ almost 8 years ago
- Target version changed from 4.0.3 to 4.0.4
Updated by Benoît PECCATTE over 7 years ago
- Found in version(s) old deleted (
4.0.2)
Updated by Benoît PECCATTE over 7 years ago
- Severity set to Minor - inconvenience | misleading | easy workaround
- User visibility set to Operational - other Techniques | Technique editor | Rudder settings
- Priority set to 16
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 4.0.4 to 4.0.5
Updated by Jonathan CLARKE over 7 years ago
- 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.
Updated by Benoît PECCATTE over 7 years ago
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.
Updated by Benoît PECCATTE over 7 years ago
- Status changed from New to In progress
- Assignee set to Benoît PECCATTE
Updated by Benoît PECCATTE over 7 years ago
- 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
Updated by Benoît PECCATTE over 7 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder-techniques|188a91addbb0aacf32ff8a60c959ea0616c9bfa4.
Updated by Vincent MEMBRÉ over 7 years ago
- 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.
- 4.0.5: Announce Changelog
- 4.1.2: Announce Changelog
- Download: https://www.rudder-project.org/site/get-rudder/downloads/