Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

fixes #14306 - fail without preupgrade run #224

Closed
wants to merge 1 commit into from

Conversation

stbenjam
Copy link
Contributor

We will ship a pre-upgrade script with 2.4. that needs to be run before
upgrading to 3.0 GA. This should cause the yum transaction to fail
out entirely, and let the user know they need to run the preupgrade
before they can continue. Remove in 3.1.

@stbenjam
Copy link
Contributor Author

Needs Katello/katello#6010

@stbenjam
Copy link
Contributor Author

Filed http://projects.theforeman.org/issues/15065 to track removal for 3.1 (or 3.X)

We will ship a pre-upgrade script with 2.4. that needs to be run before
upgrading to 3.0 GA.  This should cause the yum transaction to fail
out entirely, and let the user know they need to run the preupgrade
before they can continue.  Remove in 3.1.
@ehelms
Copy link
Member

ehelms commented May 16, 2016

Would this go in the 3.0 RPM or the 2.4 RPM?

@stbenjam
Copy link
Contributor Author

stbenjam commented May 16, 2016

My idea was that this goes in 3.0, so when the user did yum update the entire update would fail before any packages were installed. It'd give them a chance to set the repos back to 2.4 and run the preupgrade.

@stbenjam
Copy link
Contributor Author

I haven't tested yet, opened the PR to get some scratch builds built.

@stbenjam
Copy link
Contributor Author

stbenjam commented May 17, 2016

===================================================================================================================================================================================================================
 Package                        Arch                  Version                                            Repository                                                                                           Size
===================================================================================================================================================================================================================
Updating:
 katello                        noarch                3.1.0-3.nightly.git.9.c145995.el7                  /getfile?taskID=465733&name=katello-3.1.0-3.nightly.git.9.c145995.el7.noarch                        0.0  
 katello-common                 noarch                3.1.0-3.nightly.git.9.c145995.el7                  /getfile?taskID=465733&name=katello-common-3.1.0-3.nightly.git.9.c145995.el7.noarch                 9.3 k
 katello-debug                  noarch                3.1.0-3.nightly.git.9.c145995.el7                  /getfile?taskID=465733&name=katello-debug-3.1.0-3.nightly.git.9.c145995.el7.noarch                  4.0 k
 katello-service                noarch                3.1.0-3.nightly.git.9.c145995.el7                  /getfile?taskID=465733&name=katello-service-3.1.0-3.nightly.git.9.c145995.el7.noarch                8.9 k

Transaction Summary
===================================================================================================================================================================================================================
Upgrade  4 Packages

Total size: 22 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Updating   : katello-service-3.1.0-3.nightly.git.9.c145995.el7.noarch                                                                                                                                        1/8 
  Updating   : katello-debug-3.1.0-3.nightly.git.9.c145995.el7.noarch                                                                                                                                          2/8 
  Updating   : katello-common-3.1.0-3.nightly.git.9.c145995.el7.noarch                                                                                                                                         3/8 
You MUST upgrade to the latest 2.4 release, and execute the pre-upgrade script. See http://www.katello.org/docs/3.0/upgrade/index.html for more information.
error: %pre(katello-3.1.0-3.nightly.git.9.c145995.el7.noarch) scriptlet failed, exit status 1
Error in PREIN scriptlet in rpm package katello-3.1.0-3.nightly.git.9.c145995.el7.noarch
  Cleanup    : katello-common-3.1.0-3.nightly.el7.noarch                                                                                                                                                       5/8 
error: katello-3.1.0-3.nightly.git.9.c145995.el7.noarch: install failed
error: katello-3.1.0-3.nightly.el7.noarch: erase skipped
  Cleanup    : katello-debug-3.1.0-3.nightly.el7.noarch                                                                                                                                                        6/8 
  Cleanup    : katello-service-3.1.0-3.nightly.el7.noarch                                                                                                                                                      7/8 
  Verifying  : katello-debug-3.1.0-3.nightly.git.9.c145995.el7.noarch                                                                                                                                          1/8 
  Verifying  : katello-common-3.1.0-3.nightly.git.9.c145995.el7.noarch                                                                                                                                         2/8 
  Verifying  : katello-service-3.1.0-3.nightly.git.9.c145995.el7.noarch                                                                                                                                        3/8 
katello-3.1.0-3.nightly.el7.noarch was supposed to be removed but is not!
  Verifying  : katello-3.1.0-3.nightly.el7.noarch                                                                                                                                                              4/8 
  Verifying  : katello-common-3.1.0-3.nightly.el7.noarch                                                                                                                                                       5/8 
  Verifying  : katello-debug-3.1.0-3.nightly.el7.noarch                                                                                                                                                        6/8 
  Verifying  : katello-service-3.1.0-3.nightly.el7.noarch                                                                                                                                                      7/8 
  Verifying  : katello-3.1.0-3.nightly.git.9.c145995.el7.noarch                                                                                                                                                8/8 

Updated:
  katello-common.noarch 0:3.1.0-3.nightly.git.9.c145995.el7             katello-debug.noarch 0:3.1.0-3.nightly.git.9.c145995.el7             katello-service.noarch 0:3.1.0-3.nightly.git.9.c145995.el7            

Failed:
  katello.noarch 0:3.1.0-3.nightly.el7                                                              katello.noarch 0:3.1.0-3.nightly.git.9.c145995.el7                                                             

Complete!

@stbenjam
Copy link
Contributor Author

stbenjam commented May 17, 2016

It does not work like I expected, it only fails the katello RPM but the others upgrade just fine.

Does the pre-upgrade script HAVE to be run against 2.4 first? @jlsherrill

I'm not really sure how to solve the issue, I don't think there's a way to fail the entire transaction.

@jlsherrill
Copy link
Member

@stbenjam no its not required to run, its more informational and gives the user a chance to handle conflicts themselves.

@stbenjam
Copy link
Contributor Author

Do you know if there was there some other reason for the downstream BZ then?

@jlsherrill
Copy link
Member

@stbenjam i actually have no idea, i wasn't involved in that discussion

@stbenjam
Copy link
Contributor Author

Alright, thanks, I can't really think of a good way to do what they want. Maybe it's not really even needed.

@stbenjam
Copy link
Contributor Author

Closing this for now.

@stbenjam stbenjam closed this May 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants