Project

General

Profile

Actions

Bug #4387

closed

Upgrade rudder-agent can fail if cf-serverd/cf-execd fails to stop gracefully

Added by Dennis Cabooter about 10 years ago. Updated about 9 years ago.

Status:
Released
Priority:
1
Category:
Packaging
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

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%.

Actions #1

Updated by Vincent MEMBRÉ about 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.

Actions #2

Updated by Jonathan CLARKE about 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
Actions #3

Updated by Nicolas CHARLES about 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

Actions #4

Updated by Dennis Cabooter about 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.

Actions #5

Updated by Vincent MEMBRÉ about 10 years ago

  • Target version changed from 2.9.3 to 2.9.4
Actions #6

Updated by Vincent MEMBRÉ about 10 years ago

  • Target version changed from 2.9.4 to 2.9.5
Actions #7

Updated by Vincent MEMBRÉ almost 10 years ago

  • Target version changed from 2.9.5 to 2.9.6
Actions #8

Updated by Jonathan CLARKE almost 10 years ago

  • Target version changed from 2.9.6 to 2.9.7
Actions #9

Updated by Jonathan CLARKE almost 10 years ago

  • Target version changed from 2.9.7 to 150
Actions #10

Updated by Vincent MEMBRÉ over 9 years ago

  • Target version changed from 150 to 2.10.4
Actions #11

Updated by Nicolas PERRON over 9 years ago

  • Target version changed from 2.10.4 to 2.10.5
Actions #12

Updated by Jonathan CLARKE over 9 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.

Actions #13

Updated by Jonathan CLARKE over 9 years ago

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

Applied in changeset commit:ea727140ee6b319ea34d86829df36f2b64c567ed.

Actions #14

Updated by Benoît PECCATTE over 9 years ago

Applied in changeset commit:97d9137d8544004edef0ea67ec41f94d63755a8a.

Actions #15

Updated by Matthieu CERDA over 9 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:

Actions #16

Updated by Benoît PECCATTE about 9 years ago

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

Also available in: Atom PDF