Bug #1845
closedInventory sometimes doesn't find a machine's UUID: "/dev/mem: mmap: Bad address"
Description
Sometimes, for example on EC2, we are not able to find that machine UUID, and so the report contains things like:
<MACHINEID>/dev/mem: mmap: Bad address</MACHINEID>
Updated by Jonathan CLARKE about 13 years ago
- Subject changed from FusionInventory sometimes doesn't find a machine's UUID: "/dev/mem: mmap: Bad address" to Inventory sometimes doesn't find a machine's UUID: "/dev/mem: mmap: Bad address"
OK, actually the MACHINEID is not set by Fusion, but by our own promises. To get it we run "/usr/sbin/dmidecode -s system-uuid"
This command queries low-level hardware, but is not available on Xen, as documented in several places: https://bugzilla.redhat.com/show_bug.cgi?id=210295, http://forum.slicehost.com/comments.php?DiscussionID=82.
In other words, there is no machine ID on Xen guests, so we will never be able to get it!
Updated by Nicolas CHARLES about 13 years ago
It used to work, a long time ago...
bundle agent fusiAgent { #... xen:: "xen" package_policy => "add", package_method => yum, classes => cf2_if_else("xen_installed", "cant_install_xen"), comment => "Installing xen package for extended data"; } #... bundle agent addInformationsToInventory { #... xen:: "UUID" string => execresult("/usr/bin/xenstore-read vm","noshell"); "CFKEY" string => execresult("/bin/cat ${sys.workdir}/ppkeys/localhost.pub", "noshell"); "USER" string => execresult("/usr/bin/whoami", "noshell"); "usersnumber" int => readstringarray("userslist","/etc/passwd","#[^\n]*",":",50,4000); "users" slist => getindices("userslist"); linux.!xen:: "UUID" string => execresult("/usr/sbin/dmidecode -s system-uuid","noshell"); "CFKEY" string => execresult("/bin/cat ${sys.workdir}/ppkeys/localhost.pub", "noshell"); "USER" string => execresult("/usr/bin/whoami", "noshell"); "usersnumber" int => readstringarray("userslist","/etc/passwd","#[^\n]*",":",50,4000); "users" slist => getindices("userslist"); }
Updated by Jonathan CLARKE about 13 years ago
- Target version changed from 23 to 18
Updated by Jonathan CLARKE about 13 years ago
- Assignee deleted (
Jonathan CLARKE)
Updated by François ARMAND about 13 years ago
- Target version changed from 18 to 24
Updated by Jonathan CLARKE over 12 years ago
- Assignee set to Vincent MEMBRÉ
- Target version changed from 24 to Ideas (not version specific)
Vincent, this should interest you!
Updated by Vincent MEMBRÉ over 12 years ago
- Status changed from 2 to Discussion
I'm trying to have less information for our promises and I try to get machine ID with Fusion intead (Which is in HARDWARE -> UUID)
I'm going to try an inventory on a Xen VM.
But fusion uses dmidecode to determine machine ID so i think there will be a problem too...
If fusion can't find any machine ID, there's stille some solutions, we may:
- find a way to get an ID for Xen VM and submit that to fusion (in Nicolas Charles answer : "UUID" string => execresult("/usr/bin/xenstore-read vm","noshell");)
- We could generate a random machineID ... But it will create a new entry in LDAP for each Machine inventory, which is bad ...
- We could generate a random machineID and check if the node contained is already in ldap, if not insert the machine with generated machine ID, else Use the data from LDAP (Node > container which give a machine ID) and use that machine ID instead use a promises with "/usr/bin/xenstore-read vm" instead of "/usr/sbin/dmidecode -s system-uuid" (if it works...)
What do you think about those solutions ??
Updated by François ARMAND about 12 years ago
- Target version changed from Ideas (not version specific) to 2.4.0~rc2
I change the target version of that one because actual people are actually hit by that bug, see #2898.
Perhaps it's even a little worst than what explained here, because even the VM host doesn't have a MachineID.
To answer Vincent, we have two bugs:
1/ we are not able to fullfill the "MachineId" tag for Xen VM, and we should in some way (it's that one) ;
2/ we should be able to have some criteria on a machine other than only the MachineId (or hardware/uuid) to decide if a machine in a report is a new one or is already in our database (and so the old information should be updated). That's perhaps #2898, perhaps an other bug.
Updated by Nicolas CHARLES about 12 years ago
- Status changed from Discussion to Pending technical review
- % Done changed from 0 to 100
Applied in changeset commit:150e0c728807d344379d5ed02273f479569c998e.
Updated by Nicolas PERRON about 12 years ago
- Target version changed from 2.4.0~rc2 to 2.4.0~beta5
Updated by François ARMAND about 12 years ago
- Assignee changed from Vincent MEMBRÉ to Nicolas CHARLES
Updated by François ARMAND about 12 years ago
- Category changed from 26 to System techniques
Updated by Jonathan CLARKE about 12 years ago
- Status changed from Pending technical review to Released
Looks good to me.