Project

General

Profile

Actions

Bug #5002

closed

Package upgrade can fail if /etc/{cron.d,init.d,default}/rudder-agent are missing

Added by Jonathan CLARKE almost 10 years ago. Updated about 9 years ago.

Status:
Released
Priority:
2
Assignee:
Matthieu CERDA
Category:
Packaging
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

When rudder-agent package gets upgraded, it tries to backup somes files (/etc/{cron.d,init.d,default}/rudder-agent) "just in case".

However, this operation will fail and cause the package upgrade to appear failed if the files don't exist:

[root@centos-3-32 root]# rpm -Uvh rudder-agent-2.10.1.release-1.EL.3.i386.rpm 
warning: rudder-agent-2.10.1.release-1.EL.3.i386.rpm: V3 RSA/MD5 signature: NOKEY, key ID 6f07d355
Preparing...                ########################################### [100%]
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
install: cannot stat `/etc/cron.d/rudder-agent': No such file or directory
error: %pre(rudder-agent-2.10.1.release-1.EL.3) scriptlet failed, exit status 1
error:   install: %pre scriptlet failed (2), skipping rudder-agent-2.10.1.release-1.EL.3

We should wrap all these backup calls with a condition "if the file exists, then" to avoid errors about not backuping files that don't exit.

Actions #1

Updated by Jonathan CLARKE almost 10 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Jonathan CLARKE to Matthieu CERDA
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/359
Actions #2

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:d377ea1631a6e1f2e640c15ae71fcfdc96e9a634.

Actions #3

Updated by Matthieu CERDA almost 10 years ago

Applied in changeset commit:b18b45b5a8ecf9e1ffe3867a3e1f6d9d2dea91eb.

Actions #4

Updated by Vincent MEMBRÉ almost 10 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder versions that were released today.

Actions #5

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