Bug #4087
closedAgent upgrade does not work if /opt/rudder/etc/disable-agent file exists
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)
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)
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
Updated by Vincent MEMBRÉ about 11 years ago
- Target version changed from 2.7.6 to 2.4.12
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
Pull request here:
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.
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.
Updated by Jonathan CLARKE about 11 years ago
- Assignee changed from Jonathan CLARKE to Vincent MEMBRÉ
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.
Updated by Anonymous about 11 years ago
Applied in changeset packages:commit:f361e21aa3ac3ad78571fac8fd8891cdc4060d51.
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
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:
- 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/