Project

General

Profile

Actions

Bug #9829

closed

Agent inventory generation invalid if hostname is not defined

Added by Romuald Bouvard over 7 years ago. Updated almost 7 years ago.

Status:
Released
Priority:
3
Category:
System techniques
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Getting started - demo | first install | level 1 Techniques
Effort required:
Priority:
51
Name check:
Fix check:
Regression:

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

  1. 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

Actions #1

Updated by Nicolas CHARLES about 7 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 !

Actions #2

Updated by Romuald Bouvard about 7 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

Actions #3

Updated by Nicolas CHARLES about 7 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 ?

Actions #4

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 4.0.3 to 4.0.4
Actions #5

Updated by Benoît PECCATTE about 7 years ago

  • Found in version (s) 4.0.2 added
Actions #6

Updated by Benoît PECCATTE about 7 years ago

  • Found in version(s) old deleted (4.0.2)
Actions #7

Updated by Benoît PECCATTE almost 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
Actions #8

Updated by Vincent MEMBRÉ almost 7 years ago

  • Target version changed from 4.0.4 to 4.0.5
Actions #9

Updated by Jonathan CLARKE almost 7 years ago

  • Assignee deleted (Benoît PECCATTE)
Actions #10

Updated by Jonathan CLARKE almost 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:

  1. The fact that we need a real hostname to go forward - probably not an easy constraint to work around
  2. 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.

Actions #11

Updated by Benoît PECCATTE almost 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.

Actions #12

Updated by Benoît PECCATTE almost 7 years ago

  • Status changed from New to In progress
  • Assignee set to Benoît PECCATTE
Actions #13

Updated by Benoît PECCATTE almost 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
Actions #14

Updated by Benoît PECCATTE almost 7 years ago

  • Status changed from Pending technical review to Pending release
Actions #15

Updated by Vincent MEMBRÉ almost 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.

Actions

Also available in: Atom PDF