Project

General

Profile

Actions

Bug #2792

closed

During a migration from 2.3.8 to 2.4.0~beta3, rudder-agent postinst can display some errors when copying CFEngine binaries

Added by Nicolas PERRON over 12 years ago. Updated almost 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

[...]
rudder-agent              0:off  1:off  2:on   3:on   4:on   5:on   6:off
cp: cannot create regular file `/var/rudder/cfengine-community/bin/cf-execd': Text file busy
cp: cannot create regular file `/var/rudder/cfengine-community/bin/cf-serverd': Text file busy
rudder-agent has been installed, but not started
[...]

It could be because of Rudder Webapp which uses cf-promises before generating any promise.

We should use a better test before to copy any CFEngine binary.


Related issues 1 (0 open1 closed)

Related to Rudder - User story #2884: File to disable rudder-agent on a nodeReleasedJonathan CLARKE2012-09-10Actions
Actions #1

Updated by Nicolas PERRON over 12 years ago

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

Applied in changeset commit:6aaa38e3ee60a2755872c69b0179f6da8b0805bb.

Actions #2

Updated by Nicolas PERRON over 12 years ago

To ensure that no CFEngine process is up, we kill all /var/rudder/cfengine-community/bin binaries.

Actions #3

Updated by Matthieu CERDA over 12 years ago

OK, with NPE correction it looks much more correct :) Approved !

Actions #4

Updated by Nicolas PERRON over 12 years ago

  • Status changed from Pending technical review to In progress
  • % Done changed from 100 to 90

It seems that the correction doesn't work. The CFEngine binaries aren't copied.

I'm on it

Actions #5

Updated by Nicolas PERRON over 12 years ago

I can't understand. I've tried to debug this with additionnal outputs and it works:

rudder-agent              0:off  1:off  2:on   3:on   4:on   5:on   6:off
list CFEngine process
use pkill in order to free CFEngine binaries
Exit status: 1
Try to copy binaries
Exit status: 0
rudder-agent has been installed, but not started
Making a key pair for cfengine, please wait, this could take a minute...

Actions #6

Updated by Nicolas PERRON over 12 years ago

The error during installation and migration was coming from an exit error of pgrep, pkill and grep -v when these commands didn't find any results.

Actions #7

Updated by Nicolas PERRON over 12 years ago

  • Status changed from In progress to Pending technical review
  • % Done changed from 90 to 100
Actions #8

Updated by Nicolas PERRON over 12 years ago

  • Status changed from Pending technical review to In progress
  • Target version changed from 2.4.0~beta3 to 2.4.0~beta4
  • % Done changed from 100 to 90

This is not a blocking issue so I change it to the next run. We still need technical review for the work done.

Actions #9

Updated by Matthieu CERDA over 12 years ago

Looks OK. But about the errors that cp outputs, a simple "cp a /opt/rudder/sbin/cf* /var/rudder/cfengine-community/bin/ >/dev/null 2>&1" might make it shut up.

Actions #10

Updated by Nicolas PERRON over 12 years ago

The problem has not been fixed so we still need work on it. Technical review can't be considered as done.

Actions #11

Updated by Jonathan CLARKE over 12 years ago

  • Assignee changed from Nicolas PERRON to Jonathan CLARKE
  • Target version changed from 2.4.0~beta4 to 2.4.0~beta5

I'll take a look at this. Maybe do a retry if it fails once?

Actions #12

Updated by Jonathan CLARKE over 12 years ago

  • Target version changed from 2.4.0~beta5 to 2.4.0~rc1
Actions #13

Updated by Jonathan CLARKE over 12 years ago

I think the problem here is not how you stop the CFEngine processes, just that you can't stop them this way. As a reminder, there is a cron job that restarts CFEngine daemons every 5 minutes if they're stopped... so you can kill them anyway you like (pkill, killall, kill -KILL), they still may be started up again by another script.

I think a good workaround here would be to disable any programs from using the binaries, via a mechanism such as described in #2884.

Actions #14

Updated by Jonathan CLARKE over 12 years ago

  • Status changed from In progress to Pending technical review
  • % Done changed from 90 to 100

Applied in changeset commit:5889d187ba6bb821380159aa5a9ffcf258a5f954.

Actions #15

Updated by Nicolas PERRON over 12 years ago

Looks good to me, sophisticated workaround :)

Actions #16

Updated by Jonathan CLARKE over 12 years ago

  • Status changed from Pending technical review to Released
Actions #17

Updated by Nicolas PERRON over 12 years ago

  • Target version changed from 2.4.0~rc1 to 2.4.0~beta5
Actions #18

Updated by Nicolas PERRON almost 12 years ago

  • Project changed from Rudder to 34
  • Category deleted (11)
Actions #19

Updated by Benoît PECCATTE almost 10 years ago

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

Also available in: Atom PDF