Bug #3995
closed/etc/{init.d,default,cron.d}/rudder-agent is removed if the package rudder-agent is upgraded from 2.6.4, 2.6.5, 2.7.1 or 2.7.2 on SuSE or RHEL/CentOS
Added by Nicolas PERRON about 11 years ago. Updated over 9 years ago.
Description
The upgrade of rudder-agent from the versions 2.6.4, 2.6.5, 2.7.1 or 2.7.2 on SuSE or RHEL/CentOS will lead to a serious bug which is the removal of /etc/{init.d,default,cron.d}/rudder-agent
Updated by Nicolas PERRON about 11 years ago
- Status changed from New to Discussion
- Assignee set to Jonathan CLARKE
- Priority changed from N/A to 1 (highest)
- Target version set to 2.4.10
With the fix of #3996, the Rudder agent will be safely relaunched but the files /etc/{init.d,default,cron.d}/rudder-agent will still be absent.
There is no backup of them and it seems overkill to have a copy of them in the Techniques to copy them back. Maybe a warning saying "please reinstall the package" will be sufficient ?
What's your opinion Jon ?
- Modifying the file /opt/rudder/bin/check-rudder-agent to check presence of /etc/{init.d,default,cron.d}/rudder-agent and display a "WARNING: Files /etc/{init.d,default,cron.d}/rudder-agent are missing ! Please reinstal rudder-agent package"
- Adding these files to the system Techniques and adding a logic to replace them if they are missing (like for logrotate and cron.d) ?
Updated by Nicolas CHARLES about 11 years ago
- improve initial promises to check that the uuid file is there, and if not restore the backup; check that the /etc/{init.d,default,cron.d}/rudder-agent files are there, if not copy them from the /opt/rudder branch
- edit the cron that checks the uuid to copy these files if missing
- have the command to restore these file in the %post of the new package, but run in background and with a long wait (like 30 secondes), so that it would restore the files automagically.
Or another solution could be to update the system promises to do all of these, and force user to update first the server, and then the clients; but it's usually not the prefered method
Updated by Nicolas PERRON about 11 years ago
Nicolas CHARLES wrote:
Could it be possible to have the packaging put these 3 missing files somewhere in the /opt/rudder branch, and then three solutions could be used:
- improve initial promises to check that the uuid file is there, and if not restore the backup; check that the /etc/{init.d,default,cron.d}/rudder-agent files are there, if not copy them from the /opt/rudder branch
It needs to force reinstallation of initial promises at each upgrade of the packages.
- edit the cron that checks the uuid to copy these files if missing
- have the command to restore these file in the %post of the new package, but run in background and with a long wait (like 30 secondes), so that it would restore the files automagically.
I've tested and pre/post inst/uninst do not wait for the end of a background command.
Or another solution could be to update the system promises to do all of these, and force user to update first the server, and then the clients; but it's usually not the prefered method
Updated by Nicolas PERRON about 11 years ago
Nicolas CHARLES wrote:
Could it be possible to have the packaging put these 3 missing files somewhere in the /opt/rudder branch, and then three solutions could be used:
[...]
- edit the cron that checks the uuid to copy these files if missing
[...]
It seems to be the easiest solution
Updated by Nicolas PERRON about 11 years ago
- Status changed from Discussion to Pending technical review
- % Done changed from 0 to 100
- Pull Request set to https://github.com/Normation/rudder-packages/pull/136
Pull Request URL added: https://github.com/Normation/rudder-packages/pull/136
Updated by Nicolas PERRON about 11 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset commit:63978b96a8ac9e4fc915973806c28844e64d3360.
Updated by Nicolas PERRON about 11 years ago
Applied in changeset commit:d30042384a82d59ef853f3a5aa172b6be846f5c3.
Updated by Nicolas PERRON about 11 years ago
There is a problem here: on branch 2.4, the cron file is not yet /etc/cron.d/rudder-agent but /etc/crontab.
The package upgrade will fail at the preinst stage and the file check-rudder-agent will fail too. We need to revert it and redo the commit without cron for branch 2.4. I'll open a new ticket for it
Updated by Nicolas PERRON about 11 years ago
- Subject changed from /etc/{init.d,default,cron.d}/rudder-agent is removed if the package rudder-agent is upgraded from 2.4.8, 2.6.4, 2.6.5, 2.7.1 or 2.7.2 on SuSE or RHEL/CentOS to /etc/{init.d,default,cron.d}/rudder-agent is removed if the package rudder-agent is upgraded from 2.6.4, 2.6.5, 2.7.1 or 2.7.2 on SuSE or RHEL/CentOS
- Description updated (diff)
Updated by Nicolas PERRON about 11 years ago
- Target version changed from 2.4.10 to 2.6.7
Updated by Nicolas PERRON about 11 years ago
- Status changed from Pending release to In progress
- % Done changed from 100 to 90
Nicolas PERRON wrote:
There is a problem here: on branch 2.4, the cron file is not yet /etc/cron.d/rudder-agent but /etc/crontab.
The package upgrade will fail at the preinst stage and the file check-rudder-agent will fail too. We need to revert it and redo the commit without cron for branch 2.4. I'll open a new ticket for it
See #3997
We need to fix it before to made a new PR for this issue. It will concern 2.6 instead of 2.4.
The code will be the same as the actual PR but only for branch 2.6+
Updated by Nicolas PERRON about 11 years ago
- Assignee changed from Jonathan CLARKE to Nicolas PERRON
- % Done changed from 90 to 0
Reverted by #3997
Updated by Nicolas PERRON about 11 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Nicolas PERRON to Jonathan CLARKE
- % Done changed from 0 to 100
- Pull Request changed from https://github.com/Normation/rudder-packages/pull/136 to https://github.com/Normation/rudder-packages/pull/138
New Pull Request added: https://github.com/Normation/rudder-packages/pull/138
Updated by Anonymous about 11 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset commit:bb77354939f78dffd067928f9b4229e8cc7e698b.
Updated by Nicolas PERRON about 11 years ago
Applied in changeset commit:c6c147902b81b9aaa5b6a6d3d14cf80810f2108a.
Updated by Nicolas PERRON about 11 years ago
- Status changed from Pending release to In progress
- Assignee changed from Jonathan CLARKE to Nicolas PERRON
I reopen this bug since the code has been erased (!!) by the merge of #3998 from branch 2.4 to 2.6+.
I have to redo the same modification...
Updated by Nicolas PERRON about 11 years ago
Nicolas PERRON wrote:
I reopen this bug since the code has been erased (!!) by the merge of #3998 from branch 2.4 to 2.6+.
This is strange. The code is good here: commit:c6c147902b81b9aaa5b6a6d3d14cf80810f2108a
But no more here (just the next commit): commit:498ed2e93660c2cff2cf08f2c296c68004ff8724
This commit is from #3998, merged on branch 2.4 and then merged on other branches.
I have to redo the same modification...
Here again the same modification: https://github.com/Normation/rudder-packages/pull/149
Updated by Nicolas PERRON about 11 years ago
- Status changed from In progress to Pending release
Applied in changeset commit:7e8d94c22fef8c7c8a4f5a635c2185eeb0bb12c0.
Updated by Nicolas PERRON about 11 years ago
Applied in changeset commit:6d358e722cf64ca8b7e06322689c3b4cc82ca022.
Updated by Nicolas PERRON about 11 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 2.6.7 but was not publicly annouced as it unfortunately did not meet our quality and assurance requirements. It has also been fixed in Rudder 2.6.8, which was released today.
Check out:
- The release announcement: http://www.rudder-project.org/pipermail/rudder-announce/2013-October/000054.html
- The full ChangeLog: http://www.rudder-project.org/foswiki/bin/view/System/Documentation:ChangeLog26
- Download information: http://www.rudder-project.org/foswiki/Download/
Updated by Daniel Stan almost 11 years ago
Hello
We are trying to updated our agents to 2.8 version and we noticed that during update we encountered a similar problem on our centos5(32bit) instances when updating from 2.7.1 or 2.7.2:
CT-x-bash-3.2# echo "[Rudder_2.8] > name=Rudder 2.8 Repository > baseurl=http://www.rudder-project.org/rpm-2.8/RHEL_5/ > gpgcheck=0 > " > /etc/yum.repos.d/rudder.repo CT-x-bash-3.2# yum update rudder-agent Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirrors.manchester.m247.com * base: mirrors.manchester.m247.com * extras: mirrors.ukfast.co.uk * updates: mirrors.melbourne.co.uk Rudder_2.8 | 951 B 00:00 Rudder_2.8/primary | 1.8 kB 00:00 Rudder_2.8 3/3 addons | 1.9 kB 00:00 base | 1.1 kB 00:00 extras | 2.1 kB 00:00 updates | 1.9 kB 00:00 Setting up Update Process Resolving Dependencies --> Running transaction check ---> Package rudder-agent.i386 1398866025:2.8.1.release-1.EL.5 set to be updated --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================================================================================== Package Arch Version Repository Size ============================================================================================================================================================================================== Updating: rudder-agent i386 1398866025:2.8.1.release-1.EL.5 Rudder_2.8 22 M Transaction Summary ============================================================================================================================================================================================== Install 0 Package(s) Upgrade 1 Package(s) Total download size: 22 M Is this ok [y/N]: y Downloading Packages: rudder-agent-2.8.1.release-1.EL.5.i386.rpm | 22 MB 00:09 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction INFO: A back up copy of the /etc/init.d/rudder-agent has been created in /var/backups/rudder INFO: A back up copy of the /etc/default/rudder-agent has been created in /var/backups/rudder INFO: A back up copy of the /etc/cron.d/rudder-agent has been created in /var/backups/rudder Updating : rudder-agent 1/2 Making sure that the permissions on the CFEngine key directory are correct... rudder-agent[14549]: [INFO] Using /etc/default/rudder-agent for configuration rudder-agent[14552]: [INFO] Using /var/rudder/cfengine-community for CFEngine workdir rudder-agent[14553]: [INFO] Halting CFEngine Community cf-serverd... rudder-agent[14559]: [OK] CFEngine Community cf-serverd stopped after 2 seconds rudder-agent[14560]: [INFO] Halting CFEngine Community cf-execd... rudder-agent[14568]: [OK] CFEngine Community cf-execd stopped after 2 seconds CFEngine binaries copied to workdir rudder-agent[14605]: [INFO] Using /etc/default/rudder-agent for configuration rudder-agent[14608]: [INFO] Using /var/rudder/cfengine-community for CFEngine workdir rudder-agent[14609]: [INFO] Launching CFEngine Community cf-serverd... 2013-12-04T12:18:21+0000 notice: Server is starting... rudder-agent[14641]: [OK] CFEngine Community cf-serverd started after 1 seconds rudder-agent[14642]: [INFO] Launching CFEngine Community cf-execd... rudder-agent[14667]: [OK] CFEngine Community cf-execd started after 1 seconds INFO: A back up copy of the /opt/rudder/etc/uuid.hive has been created in /var/backups/rudder Cleanup : rudder-agent 2/2 kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] Updated: rudder-agent.i386 1398866025:2.8.1.release-1.EL.5 Complete! CT-x-bash-3.2# grep rudd /var/log/yum.log Aug 29 19:03:34 Installed: 1398866025:rudder-agent-2.7.0.release-1.EL.5.i386 Sep 06 16:19:56 Updated: 1398866025:rudder-agent-2.7.1.release-1.EL.5.i386 Dec 04 12:18:23 Updated: 1398866025:rudder-agent-2.8.1.release-1.EL.5.i386 CT-x-bash-3.2# ps aux | grep rudd root 18483 0.0 0.0 3100 720 pts/0 S+ 12:39 0:00 grep rudd CT-x-bash-3.2# CT-x-bash-3.2# ls /etc/{init.d,default,conf.d}/rudder-agent ls: /etc/init.d/rudder-agent: No such file or directory ls: /etc/default/rudder-agent: No such file or directory ls: /etc/conf.d/rudder-agent: No such file or directory CT-x-bash-3.2# <pre> The centos 6 versions seems to be updated ok. I also noticed that if the update is performed from 2.7.2 the files are still there and process is still running but the same error is received from yum update command. Can you please check if this is related and if the fixes were pushed to centos 5 rpm's too? Also we have a few servers broken after applying the update , can you tell us if it is safe to just restore the files from /var/backups/rudder/ or we need to reinstall the package?
Updated by Benoît PECCATTE over 9 years ago
- Project changed from 34 to Rudder
- Category set to Packaging