Bug #4387
closedUpgrade rudder-agent can fail if cf-serverd/cf-execd fails to stop gracefully
Description
While upgrading rudder-server-root 2.9.1 to 2.9.2 on Ubuntu 12.04 LTS the following happened:
rudder-agent[11400]: [ALERT] cf-serverd still running (PID 19426), try: /etc/init.d/rudder-agent forcestop dpkg: error processing rudder-agent (--configure): subprocess installed post-installation script returned error exit status 1
I waited for the install to finish, then killed all cf- processes and did a "apt-get -f install". The installation upgraded rudder-agent. However, rudder-agent didn't start, because of this:
rudder-agent[19222]: [ALERT] The /opt/rudder/etc/disable-agent flag file is present. The agent cannot be started.
I saw this because I did a "/etc/init.d/rudder-server-root restart". I did that because all nodes had No Answer reports and all compliances were on 0%.
Updated by Vincent MEMBRÉ over 10 years ago
- Assignee set to Matthieu CERDA
- Priority changed from N/A to 1
Rudder-agent should not fail during upgrade, or at least should not keep the disable-agent file.
Maybe we could use forcestop instead of stop in the upgrade process.
Is there a way to have a "clean" process when an upgrade fail ? So that we could delete disable-agent if the file is present in case of failure.
Updated by Jonathan CLARKE over 10 years ago
- Status changed from New to 8
Vincent MEMBRÉ wrote:
Rudder-agent should not fail during upgrade, or at least should not keep the disable-agent file.
Maybe we could use forcestop instead of stop in the upgrade process.
I suggest:
/etc/init.d/rudder-agent stop || /etc/init.d/rudder-agent forcestop
Is there a way to have a "clean" process when an upgrade fail ? So that we could delete disable-agent if the file is present in case of failure.
Not easily. But we could use the same approach as above:
/etc/init.d/rudder-agent stop || /etc/init.d/rudder-agent forcestop || rm -f /opt/rudder/etc/disable-agent
Updated by Nicolas CHARLES over 10 years ago
Caution, with this approach
/etc/init.d/rudder-agent stop || /etc/init.d/rudder-agent forcestop || rm -f /opt/rudder/etc/disable-agent
if the file /opt/rudder/etc/disable-agent was there before upgrading, we shouldn't remove it
Updated by Dennis Cabooter over 10 years ago
I'm not a Rudder dev, but is the Rudder server not completely useless with /opt/rudder/etc/disable-agent in place? I would remove it anyway.
Updated by Vincent MEMBRÉ over 10 years ago
- Target version changed from 2.9.3 to 2.9.4
Updated by Vincent MEMBRÉ over 10 years ago
- Target version changed from 2.9.4 to 2.9.5
Updated by Vincent MEMBRÉ about 10 years ago
- Target version changed from 2.9.5 to 2.9.6
Updated by Jonathan CLARKE about 10 years ago
- Target version changed from 2.9.6 to 2.9.7
Updated by Jonathan CLARKE about 10 years ago
- Target version changed from 2.9.7 to 150
Updated by Vincent MEMBRÉ about 10 years ago
- Target version changed from 150 to 2.10.4
Updated by Nicolas PERRON about 10 years ago
- Target version changed from 2.10.4 to 2.10.5
Updated by Jonathan CLARKE about 10 years ago
- Project changed from Rudder to 34
- Subject changed from Upgrade rudder-server-root 2.9.1 to 2.9.2 fails on rudder-agent on Ubuntu 12.04 LTS to Upgrade rudder-agent can fail if cf-serverd/cf-execd fails to stop gracefully
- Status changed from 8 to Pending technical review
- Assignee changed from Matthieu CERDA to Benoît PECCATTE
- Target version changed from 2.10.5 to 2.6.18
- Pull Request set to https://github.com/Normation/rudder-packages/pull/462
Let's start with the simple approach of ```/etc/init.d/rudder-agent stop || /etc/init.d/rudder-agent forcestop```. This should solve any cases where this fails.
If we still need to clean up the flag we left after that, we'll see about how to do that if it turns out to be necessary.
Updated by Jonathan CLARKE almost 10 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset commit:ea727140ee6b319ea34d86829df36f2b64c567ed.
Updated by Benoît PECCATTE almost 10 years ago
Applied in changeset commit:97d9137d8544004edef0ea67ec41f94d63755a8a.
Updated by Matthieu CERDA almost 10 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 2.6.18, which was released today.
Check out:
- The release announcement: http://www.rudder-project.org/pipermail/rudder-announce/2014-October/000110.html
- The full ChangeLog: http://www.rudder-project.org/foswiki/bin/view/System/Documentation:ChangeLog26
- Download information: https://www.rudder-project.org/site/get-rudder/downloads/
Updated by Benoît PECCATTE over 9 years ago
- Project changed from 34 to Rudder
- Category set to Packaging