Actions
Bug #14264
closeduuid.hive is not present afet an install or an upgradie ofrudder agent to latest 4.1.x, 4.3.x and 5.0.x on rpm system purges the uuid.hive
Pull Request:
Severity:
Critical - prevents main use of Rudder | no workaround | data loss | security
UX impact:
User visibility:
Getting started - demo | first install | Technique editor and level 1 Techniques
Effort required:
Priority:
92
Name check:
Fix check:
Regression:
Description
I had a sles12 with an old agent (4.0)
I upgraded to latest version, and after that, the inventory failed because there were no /opt/rudder/etc/uuid.hive
no error at upgrade
Chargement des données du dépôt... Lecture des paquets installés... Résolution des dépendances des paquets... The following package is going to be upgraded: rudder-agent The following package is not supported by its vendor: rudder-agent 1 package to upgrade. Taille de téléchargement totale : 6,1 MiB. Déjà en cache : 0 B. Après l'opération, 100,0 MiB d'espace disque sera libéré. Continuer ? [o/n/? affiche toutes les options] (o): o Récupération de package rudder-agent-1398866025:5.0.5.release-1.SLES.12.x86_64 (1/1), 6,1 MiB ( 6,1 MiB décompressé) Récupération : rudder-agent-5.0.5.release-1.SLES.12.x86_64.rpm ...........[fait] Vérification des conflits de fichiers : ..................................[fait] (1/1) Installation : rudder-agent - 1398866025:5.0.5.release-1.SLES.12 ...[fait] Sortie rpm supplémentaire: warning: /etc/cron.d/rudder-agent saved as /etc/cron.d/rudder-agent.rpmsave Note: This output shows SysV services only and does not include native systemd services. SysV configuration data might be overridden by native systemd configuration. If you want to list systemd services use 'systemctl list-unit-files'. To see services enabled on particular target use 'systemctl list-dependencies [target]'. Note: This output shows SysV services only and does not include native systemd services. SysV configuration data might be overridden by native systemd configuration. If you want to list systemd services use 'systemctl list-unit-files'. To see services enabled on particular target use 'systemctl list-dependencies [target]'. rudder 0:off 1:off 2:off 3:off 4:off 5:off 6:off ok: Rudder agent is now disabled. ok: stop service rudder-agent succeeded INFO: Ensuring correct permissions on the keys directory... Done. ok: Rudder agent has been enabled but not started, wait for next cron run. ok: start service rudder-agent succeeded INFO: Scheduling an inventory during next run... INFO: A back up copy of the /opt/rudder/etc/uuid.hive has been created in /var/backups/rudder INFO: A back up copy of the /var/rudder/cfengine-community/policy_server.dat has been created in /var/backups/rudder INFO: A back up copy of the /var/rudder/cfengine-community/ppkeys has been created in /var/backups/rudder sles-12-64:~ # rudder agent inventory Rudder agent 5.0.5.release Node uuid: Not yet configured error: CfReadFile: Could not examine file '/opt/rudder/etc/uuid.hive' error: CfReadFile: Could not examine file '/opt/rudder/etc/uuid.hive' error: CfReadFile: Could not examine file '/opt/rudder/etc/uuid.hive' error: CfReadFile: Could not examine file '/opt/rudder/etc/uuid.hive' error: CfReadFile: Could not examine file '/opt/rudder/etc/uuid.hive' error: CfReadFile: Could not examine file '/opt/rudder/etc/uuid.hive' error: CfReadFile: Could not examine file '/opt/rudder/etc/uuid.hive' error: CfReadFile: Could not examine file '/opt/rudder/etc/uuid.hive' error: CfReadFile: Could not examine file '/opt/rudder/etc/uuid.hive' (stat: No such file or directory) error: CfReadFile: Could not examine file '/opt/rudder/etc/uuid.hive' (stat: No such file or directory) error: CfReadFile: Could not examine file '/opt/rudder/etc/uuid.hive' (stat: No such file or directory) error: CfReadFile: Could not examine file '/opt/rudder/etc/uuid.hive' (stat: No such file or directory) error: CfReadFile: Could not examine file '/opt/rudder/etc/uuid.hive' (stat: No such file or directory) error: CfReadFile: Could not examine file '/opt/rudder/etc/uuid.hive' (stat: No such file or directory) error: CfReadFile: Could not examine file '/opt/rudder/etc/uuid.hive' (stat: No such file or directory) error: CfReadFile: Could not examine file '/opt/rudder/etc/uuid.hive' (stat: No such file or directory) error: CfReadFile: Could not examine file '/opt/rudder/etc/uuid.hive' (stat: No such file or directory) error: CfReadFile: Could not examine file '/opt/rudder/etc/uuid.hive' (stat: No such file or directory) Start execution with config [20190114-154026-799972db] error: Finished command related to promiser '/var/rudder/inventories' -- an error occurred, returned 26 error: Transformer '/var/rudder/inventories/sles-12-64-${rudder_roles.uuid}.ocs.sign' => '/opt/rudder/bin/curl -L -k -1 -f -s --proxy '' --user rudder:rudder -T /var/rudder/inventories/sles-12-64-${rudder_roles.uuid}.ocs.sign https://orchestrateur-3.labo.normation.com/inventory-updates/' returned error error: Finished command related to promiser '/var/rudder/inventories' -- an error occurred, returned 26 error: Transformer '/var/rudder/inventories/sles-12-64-${rudder_roles.uuid}.ocs.gz' => '/opt/rudder/bin/curl -L -k -1 -f -s --proxy '' --user rudder:rudder -T /var/rudder/inventories/sles-12-64-${rudder_roles.uuid}.ocs.gz https://orchestrateur-3.labo.normation.com/inventory-updates/' returned error M| State Technique Component Key Message E| error Inventory inventory Could not send the inventory error: Method 'sendInventory' failed in some repairs error: Method 'doInventory_always' failed in some repairs
rudder agent check restored the uuid, but it still prevented the inventory from being set
Rudder agent 5.0.5.release Node uuid: b8dcd41d-be6f-40e5-9b4f-f494fdeda113 Start execution with config [20190114-154026-799972db] error: Finished command related to promiser '/var/rudder/inventories' -- an error occurred, returned 26 error: Transformer '/var/rudder/inventories/sles-12-64-${rudder_roles.uuid}.ocs.sign' => '/opt/rudder/bin/curl -L -k -1 -f -s --proxy '' --user rudder:rudder -T /var/rudder/inventories/sles-12-64-${rudder_roles.uuid}.ocs.sign https://orchestrateur-3.labo.normation.com/inventory-updates/' returned error error: Finished command related to promiser '/var/rudder/inventories' -- an error occurred, returned 26 error: Transformer '/var/rudder/inventories/sles-12-64-${rudder_roles.uuid}.ocs.gz' => '/opt/rudder/bin/curl -L -k -1 -f -s --proxy '' --user rudder:rudder -T /var/rudder/inventories/sles-12-64-${rudder_roles.uuid}.ocs.gz https://orchestrateur-3.labo.normation.com/inventory-updates/' returned error M| State Technique Component Key Message E| error Inventory inventory Could not send the inventory error: Method 'sendInventory' failed in some repairs error: Method 'doInventory_always' failed in some repairs info Rudder agent was run on a subset of policies - not all policies were checked
somehow, the uuid_file is not read in bundle common rudder_roles
Actions