Project

General

Profile

Actions

Bug #2898

closed

Missing <MACHINEID> tag in Fusion Inventory reports in Ubuntu LTS 12.04 32-bit

Added by Colin Webber about 12 years ago. Updated almost 10 years ago.

Status:
Released
Priority:
2
Category:
Web - Nodes & inventories
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

With the release and nightly 2.4 version I observe the following errors when cf-agent is executed on the root server.

Transforming: /var/rudder/tools/send-clean.sh http://localhost:8080/endpoint/upload/ /var/rudder/inventories/incoming/li524-115-2012-09-14-20-27-03.ocs /var/rudder/inventories/received/
% Total % Received 50539CC2ferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 167k 100 68 100 167k 1937 4766k --:--:-- --:--:-- --:--:-- 4919k
Exception when processing report 'li524-115-2012-09-14-20-27-03.ocs'

(note: I remove the '-f' option from curl in send-clean.sh in order to have the Exception message displayed, otherwise it simply fails with HTTP error 412.

Going deeper, /var/log/rudder/webapp/<date>stderrout.log displays the following error:

ERROR com.normation.inventory.provisioning.endpoint.FusionReportEndpoint - Reported exception is:
java.util.NoSuchElementException: None.get
at scala.None$.get(Option.scala:274) ~[scala-library-2.9.2.jar:na]

The same error occurs whether processing inventory from the root server or an agent server. Distro is Ubuntu LTS 12.04 32-bit, running on a Linode VM with 1Gig RAM.


Files

inventories.tar.bz2 (30.1 KB) inventories.tar.bz2 Faulty Inventory Files Colin Webber, 2012-09-15 09:00
Actions #1

Updated by François ARMAND about 12 years ago

  • Category set to 26
  • Priority changed from N/A to 2
  • Target version set to 2.4.0~rc2

Could you please send us the Fusion Inventory XML report (li524-115-2012-09-14-20-27-03.ocs) that leads to that error ?

That would really help use reproduce the bug.

If the report contains private information, you could just change them, the bug is likelly to occure because a given set of properties is (not) there for some type of device, not because of the actual properties.

Thanks !

Actions #2

Updated by Colin Webber about 12 years ago

Hi François

Thanks for your rapid response.

I've attached 3 files:

  • li524-115-2012-09-14-20-27-03.ocs (root server)
  • rudderagent.freedomit.co.za-2012-09-14-19-43-30.ocs (another Linode 32-bit VM)
  • prometheus-2012-09-14-16-40-17.ocs (a 64-bit Ubuntu PC with a fresh v12.04 install.)

They all fail as far as I can tell.

Regards,
Colin

Actions #3

Updated by François ARMAND about 12 years ago

  • Subject changed from Inventory upload fails - java.util.NoSuchElementException: None.get to Missing <HARDWARE><UUID> tag in Fusion Inventory reports leads to java.util.NoSuchElementException: None.get
  • Assignee set to Vincent MEMBRÉ

OK, so it's the missing "<HARDWARE><UUID>" tag that leads to that error.
We asserted that if was always given by Fusion, but that does not seem to be the case.
Let's see what to do.

@see: FusionReportUnmarshaller.scala, lines 289 and 312.

Remark: if we don't have that UUID, we won't be able to know if we already saved that machine, as it is today the only properties used for reconcialiation between machine in LDAP and machine from a report.
If we are able to make the reconciliation, each new report will create a new machine. I'm almost sure we don't want that to happen.

Actions #4

Updated by François ARMAND about 12 years ago

With commit 988f591a, the log now display:


[2012-09-16 17:21:56] ERROR com.normation.inventory.provisioning.endpoint.FusionReportEndpoint - Exception when processing report 'rudderagent.freedomit.co.za-2012-09-14-19-43-30.ocs'
[2012-09-16 17:21:56] ERROR com.normation.inventory.provisioning.endpoint.FusionReportEndpoint - Reported exception is:
java.lang.IllegalArgumentException: The report does not have a non-empty <HARDWARE><UUID> tag, this is not supported
at com.normation.inventory.provisioning.fusion.FusionReportUnmarshaller.processHardware(FusionReportUnmarshaller.scala:289) ~[FusionReportUnmarshaller.class:na]
----

We still have to handle correctly the case, but at least, we know where to look from the log.

Actions #5

Updated by Colin Webber about 12 years ago

Thanks for the explanation. How can I work around this in the meantime?

Actions #6

Updated by François ARMAND about 12 years ago

Just adding a <UUID>26d8f47a-003a-11e2-a6e0-0024e8cdea1f</UUID> tag into the <HARDWARE> should make the report being accepted (with 26d8f47a-003a-11e2-a6e0-0024e8cdea1f being replaced by some UUID, for example generated by the "uuid" command).
[EDIT: Or even better, now that I linked that to #1845, you could just use the UUID provided by "/usr/bin/xenstore-read vm" command for the VM - I still don't understand why the host does not have an UUID]

The not-so-nice thing is that following report will be rejected for the same reason as the first ones, and so you won't have any update about node details. That should not be a problem as long as hostname information from the first report are ok.

Even less nice, when the bug is corrected, the UUID is likelly to be different, and so the machine will be considered different, and added again.

All of that should not prevent to manage the nodes with CFEngine.

I also commented on bug #1845 that seems to be directly related.

Thanks for reporting, and sorry for the inconvenience.

Note for the bug owner:
1/ why are we using <HARDWARE><UUID> at all if we set our <MACHINEID> tag ? (ok, in that case, it won't have help)
2/ why MACHINEID is not part of the mandatory-non-empty tags (alike our UUID, HOSTNAME, etc) ?

Actions #7

Updated by François ARMAND about 12 years ago

  • Subject changed from Missing <HARDWARE><UUID> tag in Fusion Inventory reports leads to java.util.NoSuchElementException: None.get to Missing <HARDWARE><UUID> tag in Fusion Inventory reports in Ubuntu LTS 12.04 32-bit

OK, so:

- #2899 will handle the workaround for when an empty MACHINEID tag is in Fusion Report
- #1845 will look for Xen VM not giving a MACHINEID
- this one will try to understand why the host machine doesn't have a MACHINEID.

Actions #8

Updated by François ARMAND about 12 years ago

  • Subject changed from Missing <HARDWARE><UUID> tag in Fusion Inventory reports in Ubuntu LTS 12.04 32-bit to Missing <MACHINEID> tag in Fusion Inventory reports in Ubuntu LTS 12.04 32-bit

Last note: we should never ever use <HARDAWRE><UUID>, always <MACHINEID> in our code.

Actions #9

Updated by Vincent MEMBRÉ about 12 years ago

We can't get your machine ID on your physical machine ('prometheus') because its motherboard doesn't have a proper UUID (value is "not present")

For the two other case, as they are xen VMs, they don't have a Machine ID.

As François said before, we'll handle both case in ticket #2899 (for missing machine ID) and #1845 (for Xen VMs).

Thank you for reporting Colin!

Actions #10

Updated by Vincent MEMBRÉ about 12 years ago

  • Status changed from New to Discussion

To solve your problem, you can add a value to tags <MACHINEID> and <HARDWARE><UUID> inside each of your inventories.

I suggest you to use a md5 hash of each of your node ID to have unique identifier for each of your machine.

(that's the solution we use in #2899)

Actions #11

Updated by Nicolas PERRON about 12 years ago

  • Target version changed from 2.4.0~rc2 to 2.4.0~rc1
Actions #12

Updated by Jonathan CLARKE about 12 years ago

  • Status changed from Discussion to Pending technical review
  • Target version changed from 2.4.0~rc1 to 2.4.0~beta5

This bug should be fixed in the latest nightly builds, thanks to the fixes implemented in #2899 and #1845.

Thank you for your report Colin. We would appreciate it if you could test again and confirm that this is no longer a problem.

Actions #13

Updated by François ARMAND about 12 years ago

Note for developers: all the code introduced in 988f591a was deleted and/or modified in 3b53dab6 for #2899, so that commit should just be ignored. It should have been reverted as a first step of correcting #2899.

Actions #14

Updated by Jonathan CLARKE about 12 years ago

  • Status changed from Pending technical review to Released

François ARMAND wrote:

Note for developers: all the code introduced in 988f591a was deleted and/or modified in 3b53dab6 for #2899, so that commit should just be ignored. It should have been reverted as a first step of correcting #2899.

OK, so we can close this bug and rely on the technical review in #2899.

Actions #15

Updated by Benoît PECCATTE almost 10 years ago

  • Category changed from 26 to Web - Nodes & inventories
Actions

Also available in: Atom PDF