Bug #8371

[Deployment] Upgrading Rails packages on CentOS uninstalls them

Added by Brett Smith almost 2 years ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assigned To:
Category:
Deployment
Target version:
Start date:
02/17/2016
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
0.5

Description

When yum upgrades a package, it runs the postinst script for the newly installed version, then runs the cleanup script for the previously installed version. Our cleanup script always removes the package, so upgrading a package effectively uninstalls it. The cleanup script needs to recognize the "upgrade from previous version" call, and not clean up anything in that case.


Subtasks

Task #8476: Review arvados-dev branch 8371-centos-postrm-bugfix-wipResolvedBrett Smith

Associated revisions

Revision 3c784872
Added by Brett Smith almost 2 years ago

Merge branch '8371-centos-postrm-bugfix-wip'

Refs #8371. Closes #8476.

Revision 3c784872
Added by Brett Smith almost 2 years ago

Merge branch '8371-centos-postrm-bugfix-wip'

Refs #8371. Closes #8476.

Revision 623af8e4 (diff)
Added by Brett Smith almost 2 years ago

8371, 8413: Bump Rails package iteration.

Build these bug fixes into new packages.
Closes #8371, #8413.

Revision 623af8e4 (diff)
Added by Brett Smith almost 2 years ago

8371, 8413: Bump Rails package iteration.

Build these bug fixes into new packages.
Closes #8371, #8413.

History

#1 Updated by Brett Smith almost 2 years ago

  • Target version set to 2016-03-02 sprint

#2 Updated by Brett Smith almost 2 years ago

  • Assigned To set to Brett Smith

#3 Updated by Brett Smith almost 2 years ago

  • Status changed from New to In Progress

http://ftp.rpm.org/max-rpm/s1-rpm-inside-scripts.html#S2-RPM-INSIDE-ERASE-TIME-SCRIPTS is the cite that explains why this is the correct change.

#4 Updated by Nico César almost 2 years ago

review @ acab2f7c338f245baa7e5d9dca57476d12d863bf

I don't see a clear reason for the previous " [ "$1" = "1" ] || [ "$1" = "2" ] " . but whatever, LGTM now.

#5 Updated by Brett Smith almost 2 years ago

Nico Cesar wrote:

review @ acab2f7c338f245baa7e5d9dca57476d12d863bf

I don't see a clear reason for the previous " [ "$1" = "1" ] || [ "$1" = "2" ] " . but whatever, LGTM now.

I think it was just copied over as boilerplate from the postinst (where it makes more sense). Thanks.

#6 Updated by Brett Smith almost 2 years ago

  • Status changed from In Progress to Resolved

Applied in changeset arvados-dev|commit:623af8e46e921f59abeeee9e7ae8ec4aef890b5b.

#7 Updated by Brett Smith over 1 year ago

  • Status changed from Resolved to New
  • Target version changed from 2016-03-02 sprint to Arvados Future Sprints

Still an issue as of the 2016-03-30 packages.

#8 Updated by Brett Smith over 1 year ago

Brett Smith wrote:

Still an issue as of the 2016-03-30 packages.

Actually, this might be mistaken. It might be that the current packages are fine, but the postrm from previously-installed (and buggy) packages runs as you upgrade. If that's the case, there's really no way around this other than to go through, or somehow inhibit the buggy postrm from running.

#9 Updated by Tom Morris about 1 year ago

  • Assigned To changed from Brett Smith to Tom Morris

#10 Updated by Tom Morris 9 months ago

  • Assigned To changed from Tom Morris to Javier Bértoli

Javier - can you please review the current state of this and either close or update? Thanks!

#11 Updated by Javier Bértoli 9 months ago

  • Target version changed from Arvados Future Sprints to 2017-04-12 sprint

#12 Updated by Javier Bértoli 8 months ago

  • Status changed from New to Closed

Tried on arvagrant, with CentOS 7, deploying first version

20161229114527-997479d1408139e96ecdb42a60b4f727f814f6c9

and then upgrading to version

20170123133526-6441ff0411fc0316c0825e8647150b1e079256ab.

All tests passes, nothing seems to be broken and/or missing, so I guess this is solved now.

Also available in: Atom PDF