Project

General

Profile

Actions

Bug #4087

closed

Agent upgrade does not work if /opt/rudder/etc/disable-agent file exists

Added by Vincent MEMBRÉ about 11 years ago. Updated about 11 years ago.

Status:
Released
Priority:
1 (highest)
Category:
-
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

I try to upgrade two nodes:

one debian 5 with rudder-agent 2.6.8 installed

one ubuntu 12 04 with rudder-agent 2.7.5 installed

I tried to upgrade both nodes to 2.8.0~rc1 and they were both blocked by file /opt/rudder/etc/disable-agent


debian-5-64:~# sudo apt-get install rudder-agent
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
rudder-agent est déjà la plus récente version disponible.
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
1 partiellement installés ou enlevés.
Après cette opération, 0o d'espace disque supplémentaires seront utilisés.
Paramétrage de rudder-agent (2.8.0~beta1-lenny0) ...
Making sure that the permissions on the CFEngine key directory are correct...
rudder-agent[26797]: [INFO] Using /etc/default/rudder-agent for configuration
rudder-agent[26800]: [INFO] Using /var/rudder/cfengine-community for CFEngine workdir
rudder-agent[26801]: [INFO] Halting CFEngine Community cf-serverd...
rudder-agent[26802]: [INFO] can't read PID file, not stopping cf-serverd
rudder-agent[26803]: [INFO] Halting CFEngine Community cf-execd...
rudder-agent[26804]: [INFO] can't read PID file, not stopping cf-execd
rudder-agent[26810]: [INFO] Found no CFEngine Community cf-serverd processes running
rudder-agent[26817]: [INFO] Found no CFEngine Community cf-execd processes running
CFEngine binaries copied to workdir
rudder-agent[26830]: [INFO] Using /etc/default/rudder-agent for configuration
rudder-agent[26833]: [INFO] Using /var/rudder/cfengine-community for CFEngine workdir
rudder-agent[26834]: [ALERT] The /opt/rudder/etc/disable-agent flag file is present. The agent cannot be started.
dpkg : erreur de traitement de rudder-agent (--configure) :
 le sous-processus post-installation script a retourné une erreur de sortie d'état 3
Des erreurs ont été rencontrées pendant l'exécution :
 rudder-agent
E: Sub-process /usr/bin/dpkg returned an error code (1)
Actions #1

Updated by Vincent MEMBRÉ about 11 years ago

  • Subject changed from Agent upgrade blocked by to Agent upgrade blocked by /opt/rudder/etc/disable-agent

I try to upgrade two nodes:

one debian 5 with rudder-agent 2.6.8 installed

one ubuntu 12 04 with rudder-agent 2.7.5 installed

I tried to upgrade both nodes to 2.8.0~rc1 and they were both blocked by file /opt/rudder/etc/disable-agent

debian-5-64:~# sudo apt-get install rudder-agent
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
rudder-agent est déjà la plus récente version disponible.
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
1 partiellement installés ou enlevés.
Après cette opération, 0o d'espace disque supplémentaires seront utilisés.
Paramétrage de rudder-agent (2.8.0~beta1-lenny0) ...
Making sure that the permissions on the CFEngine key directory are correct...
rudder-agent[26797]: [INFO] Using /etc/default/rudder-agent for configuration
rudder-agent[26800]: [INFO] Using /var/rudder/cfengine-community for CFEngine workdir
rudder-agent[26801]: [INFO] Halting CFEngine Community cf-serverd...
rudder-agent[26802]: [INFO] can't read PID file, not stopping cf-serverd
rudder-agent[26803]: [INFO] Halting CFEngine Community cf-execd...
rudder-agent[26804]: [INFO] can't read PID file, not stopping cf-execd
rudder-agent[26810]: [INFO] Found no CFEngine Community cf-serverd processes running
rudder-agent[26817]: [INFO] Found no CFEngine Community cf-execd processes running
CFEngine binaries copied to workdir
rudder-agent[26830]: [INFO] Using /etc/default/rudder-agent for configuration
rudder-agent[26833]: [INFO] Using /var/rudder/cfengine-community for CFEngine workdir
rudder-agent[26834]: [ALERT] The /opt/rudder/etc/disable-agent flag file is present. The agent cannot be started.
dpkg : erreur de traitement de rudder-agent (--configure) :
 le sous-processus post-installation script a retourné une erreur de sortie d'état 3
Des erreurs ont été rencontrées pendant l'exécution :
 rudder-agent
E: Sub-process /usr/bin/dpkg returned an error code (1)

Actions #2

Updated by Vincent MEMBRÉ about 11 years ago

  • Description updated (diff)
Actions #3

Updated by Vincent MEMBRÉ about 11 years ago

removing /opt/rudder/etc/disable-agent fixed the problem

The error is launched when restarting the agent at the end of the postinst.

              # Remove the lock on CFEngine
                if [ ${I_SET_THE_LOCK} -eq 1 ]; then
                        rm -f /opt/rudder/etc/disable-agent
                fi

                # Restart daemons if we stopped them, otherwise not
                if [ ${CFRUDDER_FIRST_INSTALL} -ne 1 ]
                then
                        if [ -r /var/rudder/cfengine-community/inputs/failsafe.cf -o -r /var/rudder/cfengine-community/inputs/promises.cf ]
                        then
                                /etc/init.d/rudder-agent start
                        fi

The lockfile was created before the upgrade :

debian-5-64:~# ls -lh /opt/rudder/etc/disable-agent 
-rw-r--r-- 1 root root 0 jui 31 09:19 /opt/rudder/etc/disable-agent

I don't think the upgrade should break if the disable agent, but warn the user that the agent could not been restart because the lock is present

Actions #4

Updated by Vincent MEMBRÉ about 11 years ago

  • Target version changed from 2.7.6 to 2.4.12
Actions #5

Updated by Vincent MEMBRÉ about 11 years ago

  • Status changed from New to In progress

I'm on it!

Actions #6

Updated by Vincent MEMBRÉ about 11 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/165
Actions #7

Updated by Matthieu CERDA about 11 years ago

The PR looks nice.

Actions #8

Updated by Jonathan CLARKE about 11 years ago

  • Status changed from Pending technical review to Discussion
  • Assignee changed from Jonathan CLARKE to Vincent MEMBRÉ

Some comment to address in the PR please.

Actions #9

Updated by Vincent MEMBRÉ about 11 years ago

  • Status changed from Discussion to Pending technical review
  • Assignee changed from Vincent MEMBRÉ to Jonathan CLARKE

Correction made, tell me if it's ok so i can rebase it.

Actions #10

Updated by Jonathan CLARKE about 11 years ago

  • Assignee changed from Jonathan CLARKE to Vincent MEMBRÉ
Actions #11

Updated by Vincent MEMBRÉ about 11 years ago

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

Applied in changeset packages:commit:ea2fd7fbcc20929aa1fe9dadf36c2a471130a930.

Actions #12

Updated by Anonymous about 11 years ago

Applied in changeset packages:commit:f361e21aa3ac3ad78571fac8fd8891cdc4060d51.

Actions #13

Updated by Nicolas PERRON about 11 years ago

  • Subject changed from Agent upgrade blocked by /opt/rudder/etc/disable-agent to Agent upgrade does not work if /opt/rudder/etc/disable-agent file exists
Actions #14

Updated by Nicolas PERRON about 11 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:

Actions

Also available in: Atom PDF