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 over 9 years ago.
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.
- Status changed from New to Pending technical review
- % Done changed from 0 to 100
Applied in changeset commit:6aaa38e3ee60a2755872c69b0179f6da8b0805bb.
To ensure that no CFEngine process is up, we kill all /var/rudder/cfengine-community/bin binaries.
OK, with NPE correction it looks much more correct :) Approved !
- 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
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...
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.
- Status changed from In progress to Pending technical review
- % Done changed from 90 to 100
- 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.
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.
The problem has not been fixed so we still need work on it. Technical review can't be considered as done.
- 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?
- Target version changed from 2.4.0~beta5 to 2.4.0~rc1
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.
- Status changed from In progress to Pending technical review
- % Done changed from 90 to 100
Applied in changeset commit:5889d187ba6bb821380159aa5a9ffcf258a5f954.
Looks good to me, sophisticated workaround :)
- Status changed from Pending technical review to Released
- Target version changed from 2.4.0~rc1 to 2.4.0~beta5
- Project changed from Rudder to 34
- Category deleted (
11)
- Project changed from 34 to Rudder
- Category set to Packaging
Also available in: Atom
PDF