Project

General

Profile

Actions

Bug #4147

closed

First inventory sending may not contains UUID

Bug #4147: First inventory sending may not contains UUID

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

Status:
Released
Priority:
1 (highest)
Assignee:
Jonathan CLARKE
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

Updated by Vincent MEMBRÉ about 12 years ago Actions #1

  • 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

Updated by Vincent MEMBRÉ about 12 years ago Actions #2

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

Updated by Jonathan CLARKE about 12 years ago Actions #3

  • 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?

Updated by Vincent MEMBRÉ about 12 years ago Actions #4

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.

Updated by Vincent MEMBRÉ about 12 years ago Actions #5

  • Assignee changed from Vincent MEMBRÉ to Jonathan CLARKE

Updated by Vincent MEMBRÉ about 12 years ago Actions #6

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)

Updated by Vincent MEMBRÉ about 12 years ago Actions #7

  • 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

Updated by Vincent MEMBRÉ almost 12 years ago Actions #8

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

Applied in changeset commit:3d74cf3fb5bf4c0b5a38e8cb566905315780ff8b.

Updated by Jonathan CLARKE almost 12 years ago Actions #9

Applied in changeset commit:7e10dbdb746c8cf5d1ca8375857c6194efd45aac.

Updated by Nicolas PERRON almost 12 years ago Actions #10

  • Status changed from Pending release to Released

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

Updated by Benoît PECCATTE over 10 years ago Actions #11

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

Also available in: PDF Atom