Project

General

Profile

Actions

Bug #4147

closed

First inventory sending may not contains UUID

Added by Vincent MEMBRÉ over 10 years ago. Updated about 9 years ago.

Status:
Released
Priority:
1
Category:
Packaging
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

When we install for the first time rudder-agent, it created the uuid.hive file with no UUID only a commentary that the uuid will be generated.

We need to enfore creation of the uuid with uuidgen if this is a first installation.

This may lead to inventory sending with a wrong UUID (the comment we put in the file)

I need to look in 2.4 if this could happen

Actions #1

Updated by Vincent MEMBRÉ over 10 years ago

  • Status changed from New to Pending technical review
  • Assignee changed from Vincent MEMBRÉ to Jonathan CLARKE
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/185
Actions #2

Updated by Vincent MEMBRÉ over 10 years ago

Is there a reason why we define CFRUDDER_FIRST_INSTALL if there is a way for each packaging system to determine if it's an upgrade or a first install?

For deb, See 2nd answer here : http://askubuntu.com/questions/101962/script-to-only-execute-during-first-install-of-a-package

For RPM look at this link (section Deal with upgrade) http://wiki.mandriva.com/en/Development/Howto/RPM

Actions #3

Updated by Jonathan CLARKE over 10 years ago

  • Status changed from Pending technical review to Discussion
  • Assignee changed from Jonathan CLARKE to Vincent MEMBRÉ

I understand and agree with the proposed fix.

But I am absolutely sure that there was already a uuidgen can in these post inst scripts. Can you please look through the got log and find where (which commit, which ticket) this was removed?

Actions #4

Updated by Vincent MEMBRÉ over 10 years ago

It was related to ticket #3925, specially the commit commit:d4d3097ee9d4714c87efe9bbe22ab0dc014052f0

This has been reverted by commit:d4d3097ee9d4714c87efe9bbe22ab0dc014052f0 then reapplied commit:a01181b20a0f08700f5cfaae6a483f4ef2813aeb (same issue treated, so it mostly keeps the same logic than in first commit)

I have another idea about this fix: What do you think of running /opt/rudder/bin/check-rudder-agent in every postinst ?

I just got the idea but it check the uuid and could even restore a backup. however I still need to check its other actions.

Actions #5

Updated by Vincent MEMBRÉ over 10 years ago

  • Assignee changed from Vincent MEMBRÉ to Jonathan CLARKE
Actions #6

Updated by Vincent MEMBRÉ over 10 years ago

In fact check-rudder-agent also mess with cfengine process, which we do not want here.

Here we need more to focus on the uuid and keep it simple (first install -> always generate an uuid)

Actions #7

Updated by Vincent MEMBRÉ over 10 years ago

  • Status changed from Discussion to Pending technical review

After discution with Jon we decided to use the /opt/rudder/bin/check-rudder-agent

I realized that it was already done in commit:d4d3097ee9d4714c87efe9bbe22ab0dc014052f0 and reverted by commit:d1c61325c4eb817f8c051ca474548e0a9bcf70a0 and then not added again in commit: a01181b20a0f08700f5cfaae6a483f4ef2813aeb

I updated the pull request with new correction: https://github.com/Normation/rudder-packages/pull/185

Actions #8

Updated by Vincent MEMBRÉ over 10 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100

Applied in changeset commit:3d74cf3fb5bf4c0b5a38e8cb566905315780ff8b.

Actions #9

Updated by Jonathan CLARKE over 10 years ago

Applied in changeset commit:7e10dbdb746c8cf5d1ca8375857c6194efd45aac.

Actions #10

Updated by Nicolas PERRON over 10 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.4.12 which was released today.
Check out:

Actions #11

Updated by Benoît PECCATTE about 9 years ago

  • Project changed from 34 to Rudder
  • Category set to Packaging
Actions

Also available in: Atom PDF