Project

General

Profile

Bug #6035

rudder-agent installation may hang infinitely on Centos minimal install due to curl installation

Added by Vincent MEMBRÉ over 3 years ago. Updated over 3 years ago.

Status:
Released
Priority:
1
Category:
System techniques
Target version:
Target version (plugin):
Severity:
User visibility:
Effort required:
Priority:

Description

I tried to install rudder-agent 3.0beta2 on a centos6 but the install hangs forever ( waited for 15min, Nicolas waited for 2 hours on his side)

It happens that i used a centos minimal install with no curl installed.

It hangs on cf-agent run, because it tries to install curl using yum. but since we are already installing rudder-agent with yum (locking yum), cf-agent is blocked by its yum (yum check-update)...

We should not install curl in initial promises, but instead use the bundled minicurl script

Associated revisions

Revision 3adf25e1 (diff)
Added by Matthieu CERDA over 3 years ago

Fixes #6035: Do not block on yum during rudder-agent installation

Revision bfdb0481
Added by Benoît PECCATTE over 3 years ago

Merge pull request #588 from Kegeruneku/bug_6035/int/6035_stop_blocking_on_rudder_agent_during_installation

Fixes #6035: Do not block on yum during rudder-agent installation

History

#1 Updated by Vincent MEMBRÉ over 3 years ago

  • Assignee changed from Nicolas CHARLES to Matthieu CERDA

#2 Updated by Vincent MEMBRÉ over 3 years ago

  • Assignee changed from Matthieu CERDA to Benoît PECCATTE

#3 Updated by Matthieu CERDA over 3 years ago

  • Status changed from New to In progress
  • Assignee changed from Benoît PECCATTE to Matthieu CERDA

Nope, It's mine !

#4 Updated by Matthieu CERDA over 3 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Matthieu CERDA to Benoît PECCATTE
  • % Done changed from 0 to 100
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/625

#5 Updated by Benoît PECCATTE over 3 years ago

  • Status changed from Pending technical review to In progress
  • Assignee changed from Benoît PECCATTE to Matthieu CERDA

Waiting for a new PR

#6 Updated by Matthieu CERDA over 3 years ago

  • Status changed from In progress to Discussion
  • Assignee deleted (Matthieu CERDA)
  • Pull Request deleted (https://github.com/Normation/rudder-techniques/pull/625)

Hm... I feel that the best solution to this would simply be not to execute cf-agent / check-rudder-agent during any pre/post install script.

The only occurence I found of this has been introduced by http://www.rudder-project.org/redmine/projects/packages/repository/revisions/3d74cf3fb5bf4c0b5a38e8cb566905315780ff8b

diff --git a/rudder-agent/SPECS/rudder-agent.spec b/rudder-agent/SPECS/rudder-agent.spec
index 894875b..2627553 100644
--- a/rudder-agent/SPECS/rudder-agent.spec
+++ b/rudder-agent/SPECS/rudder-agent.spec
@@ -286,6 +286,9 @@ if [ -f ${TMP_CRON} ]; then
        chmod 644 ${TMP_CRON}
 fi

+# launch rudder agent check script, it will generate an UUID on first install or repair it if needed
+/opt/rudder/bin/check-rudder-agent
+
 %preun -n rudder-agent
 #=================================================
 # Pre Uninstallation
diff --git a/rudder-agent/debian/postinst b/rudder-agent/debian/postinst
index 44e37d6..c15bc01 100644
--- a/rudder-agent/debian/postinst
+++ b/rudder-agent/debian/postinst
@@ -105,6 +105,9 @@ case "$1" in
                        chmod 644 ${TMP_CRON}
                fi

+               # launch rudder agent check script, it will generate an UUID on first install or repair it if needed
+               /opt/rudder/bin/check-rudder-agent
+
     ;;

     abort-upgrade|abort-remove|abort-deconfigure)

Actually, I think just removing those would solve the issue, but I'm not certain why they were put here in the first place. May someone explain it to me please ?

#7 Updated by Benoît PECCATTE over 3 years ago

Suggestion:
nohup /opt/rudder/bin/check-rudder-agent >/dev/null 2>/dev/null &

#8 Updated by Jonathan CLARKE over 3 years ago

Actually, I think just removing those would solve the issue, but I'm not certain why they were put here in the first place. May someone explain it to me please ?

Yes. The point was to generate a UUID for the machine. Many things won't work without a UUID (like inventory...). If the user does this, it will break:
- yum install rudder-agent
- servicer rudder-agent start

(because there is no UUID, because the agent doesn't create it, but the check-rudder-agent script does)

#9 Updated by Matthieu CERDA over 3 years ago

  • Status changed from Discussion to Pending technical review
  • Assignee set to Benoît PECCATTE
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/588

#10 Updated by Matthieu CERDA over 3 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset packages:rudder-packages|commit:3adf25e1e31bf7cc33e0fb2d5fa6d8c4e84a8ddd.

#11 Updated by Benoît PECCATTE over 3 years ago

Applied in changeset packages:rudder-packages|commit:bfdb048191e68a3a8d014692ca28c45c01d4cedf.

#12 Updated by Vincent MEMBRÉ over 3 years ago

  • Target version changed from 2.10.9 to 2.10.10

#13 Updated by Vincent MEMBRÉ over 3 years ago

  • Subject changed from rudder-agent installation may ahnd indefinetly on Centos minimal install due to curl installation to rudder-agent installation may hang infinitely on Centos minimal install due to curl installation

#14 Updated by Vincent MEMBRÉ over 3 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.10.10 and 2.11.7, which were these days.

Also available in: Atom PDF