Bug #4098
closedRudder-agent upgrade fails if one of the binaries is in use during upgrade
Description
On a Debian6, upgrading to 2.8 beta fails, because the file /var/rudder/cfengine-community/bin/cf-execd is busy
Here is the output of the update
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
rudder-agent
1 upgraded, 0 newly installed, 0 to remove and 66 not upgraded.
Need to get 21.0 MB of archives.
After this operation, 1,012 kB disk space will be freed.
Get:1 http://www.rudder-project.org/apt-2.8/ squeeze/main rudder-agent amd64 2.8.0~beta1-squeeze0 [21.0 MB]
Fetched 21.0 MB in 18s (1,156 kB/s)
(Reading database ... 33837 files and directories currently installed.)
Preparing to replace rudder-agent 2.6.8-squeeze0 (using .../rudder-agent_2.8.0~beta1-squeeze0_amd64.deb) ...
INFO: A back up copy of the /opt/rudder/etc/uuid.hive has been created in /var/backups/rudder
INFO: A back up copy of the /var/rudder/cfengine-community/ppkeys has been created in /var/backups/rudder
Unpacking replacement rudder-agent ...
Setting up rudder-agent (2.8.0~beta1-squeeze0) ...
Installing new version of config file /etc/init.d/rudder-agent ...
Making sure that the permissions on the CFEngine key directory are correct...
rudder-agent[13056]: [INFO] Using /etc/default/rudder-agent for configuration
rudder-agent[13059]: [INFO] Using /var/rudder/cfengine-community for CFEngine workdir
rudder-agent[13060]: [INFO] Halting CFEngine Community cf-serverd...
rudder-agent[13064]: [OK] CFEngine Community cf-serverd stopped after 2 seconds
rudder-agent[13065]: [INFO] Halting CFEngine Community cf-execd...
rudder-agent[13069]: [OK] CFEngine Community cf-execd stopped after 2 seconds
cp: cannot create regular file `/var/rudder/cfengine-community/bin/cf-execd': Text file busy
dpkg: error processing rudder-agent (--configure):
subprocess installed post-installation script returned error exit status 1
configured to not write apport reports
Errors were encountered while processing:
rudder-agent
E: Sub-process /usr/bin/dpkg returned an error code (1)
executing a second time the command still fails :(
Building dependency tree
Reading state information... Done
rudder-agent is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 66 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? Y
Setting up rudder-agent (2.8.0~beta1-squeeze0) ...
Making sure that the permissions on the CFEngine key directory are correct...
rudder-agent[13123]: [INFO] Using /etc/default/rudder-agent for configuration
rudder-agent[13126]: [INFO] Using /var/rudder/cfengine-community for CFEngine workdir
rudder-agent[13127]: [INFO] Halting CFEngine Community cf-serverd...
rudder-agent[13128]: [INFO] can't read PID file, not stopping cf-serverd
rudder-agent[13129]: [INFO] Halting CFEngine Community cf-execd...
rudder-agent[13130]: [INFO] can't read PID file, not stopping cf-execd
rudder-agent[13136]: [INFO] Found no CFEngine Community cf-serverd processes running
rudder-agent[13143]: [INFO] Killing CFEngine Community cf-execd with force...
rudder-agent[13145]: [OK] all CFEngine Community cf-execd processes killed with force
CFEngine binaries copied to workdir
rudder-agent[13157]: [INFO] Using /etc/default/rudder-agent for configuration
rudder-agent[13160]: [INFO] Using /var/rudder/cfengine-community for CFEngine workdir
rudder-agent[13161]: [ALERT] The /opt/rudder/etc/disable-agent flag file is present. The agent cannot be started.
dpkg: error processing rudder-agent (--configure):
subprocess installed post-installation script returned error exit status 3
configured to not write apport reports
Errors were encountered while processing:
rudder-agent
E: Sub-process /usr/bin/dpkg returned an error code (1)
Updated by Jonathan CLARKE over 12 years ago
Updated by Jonathan CLARKE over 12 years ago
- Category deleted (
13)
Updated by Jonathan CLARKE over 12 years ago
- Status changed from New to 8
There looks to be a simple workaround for this, according to http://lists.freebsd.org/pipermail/freebsd-current/2003-September/009972.html and http://lists.freebsd.org/pipermail/freebsd-current/2003-September/009972.html : use cp -f, instead of just cp.
I can't see this doing any harm, since we're upgrading the agent anyway - if it fails, we will run the cp again. It might be more risky for #3665, which is about rudder-agent upgrading itself (via a promise), but that doesn't work now, so we'll soon see if this fixes it.
Matthieu, can you implement this trivial fix please?
Updated by Jonathan CLARKE over 12 years ago
Updated by Vincent MEMBRÉ over 12 years ago
- Status changed from 8 to In progress
- Assignee changed from Matthieu CERDA to Vincent MEMBRÉ
I'm taking this!
Updated by Vincent MEMBRÉ over 12 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Vincent MEMBRÉ to Jonathan CLARKE
- Pull Request set to https://github.com/Normation/rudder-packages/pull/167
Pull request here : https://github.com/Normation/rudder-packages/pull/167
Updated by Vincent MEMBRÉ over 12 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset packages:commit:4918b3c7505ece65979297e485eb9a4fa1469175.
Updated by Jonathan CLARKE over 12 years ago
Applied in changeset packages:commit:4c2663abdf304540c739b911e1cc0eed24307e66.
Updated by Vincent MEMBRÉ over 12 years ago
- Subject changed from Upgrading rudder-agent from 2.6.8 to 2.8beta fails on Debian to Rudder-agent upgrade fails if one of the binaries is in use during upgrade
Updated by Nicolas PERRON about 12 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:
- The release announcement: http://www.rudder-project.org/pipermail/rudder-announce/2013-November/000061.html
- The full ChangeLog: http://www.rudder-project.org/foswiki/bin/view/System/Documentation:ChangeLog24
- Download information: https://www.rudder-project.org/site/get-rudder/downloads/