Bug 871622 - Upgrade from 1.0 to 1.2 fails with file conflict
Upgrade from 1.0 to 1.2 fails with file conflict
Status: CLOSED ERRATA
Product: Subscription Asset Manager
Classification: Red Hat
Component: katello (Show other bugs)
1.2
Unspecified Unspecified
unspecified Severity urgent
: rc
: ---
Assigned To: Jordan OMara
Og Maciel
:
Depends On:
Blocks: sam12-tracker
  Show dependency treegraph
 
Reported: 2012-10-30 17:26 EDT by Og Maciel
Modified: 2014-11-09 17:56 EST (History)
7 users (show)

See Also:
Fixed In Version: katello-cli-1.2.4-3h
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 14:18:28 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Og Maciel 2012-10-30 17:26:54 EDT
Description of problem:

Upgrading SAM 1.0 to latest 1.2 fails with a file dependency on katello-cli

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Install and configure SAM 1.0
2. Upgrade the system and install SAM 1.2
3.
  
Actual results:

Transaction Check Error:
  file /usr/bin/headpin from install of katello-cli-1.2.1-1h.el6_3.noarch conflicts with file from package katello-cli-headpin-0.1.16-1.el6.noarch


Expected results:


Additional info:
Comment 1 Miroslav Suchý 2012-10-31 06:32:29 EDT
https://github.com/Katello/katello/pull/957
Comment 2 Tom McKay 2012-10-31 08:33:47 EDT
  Branch: refs/heads/master
  Home:   https://github.com/Katello/katello
  Commit: 49c164c17d02c6c34bda9d60d8130718ed98a2da
      https://github.com/Katello/katello/commit/49c164c17d02c6c34bda9d60d8130718ed98a2da
  Author: Miroslav Suchý <msuchy@redhat.com>
  Date:   2012-10-31 (Wed, 31 Oct 2012)
Comment 4 Tazim Kolhar 2012-11-12 00:56:44 EST
FAILED:


1. Install and configure SAM 1.0

# rpm -qa | grep katello
katello-headpin-0.1.145-1.el6.noarch
katello-common-0.1.307-1.el6.noarch
katello-glue-candlepin-0.1.307-1.el6.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-cli-headpin-0.1.16-1.el6.noarch
katello-selinux-0.1.10-1.el6.noarch
katello-cli-common-0.1.107-1.el6.noarch
katello-configure-0.1.107-1.el6.noarch
katello-headpin-all-0.1.145-1.el6.noarch
katello-certs-tools-1.0.6-1.el6.noarch

2. Upgrade the system and install SAM 1.2


Results :

# yum update -y 
Loaded plugins: product-id, security, subscription-manager
Updating certificate-based repositories.
Setting up Update Process
No Packages marked for Update
[root@intel-s3ea2-03 katello]# cd /etc/yum.repos.d
[root@intel-s3ea2-03 yum.repos.d]# clear

[root@intel-s3ea2-03 yum.repos.d]# vim headpin.repo
[root@intel-s3ea2-03 yum.repos.d]# yum update -y katello*
Loaded plugins: product-id, security, subscription-manager
Updating certificate-based repositories.
headpin                                                  | 3.8 kB     00:00     
headpin/primary_db                                       |  45 kB     00:00     
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package katello-certs-tools.noarch 0:1.0.6-1.el6 will be updated
---> Package katello-certs-tools.noarch 0:1.2.1-1h.el6_3 will be an update
---> Package katello-cli-common.noarch 0:0.1.107-1.el6 will be updated
---> Package katello-cli-common.noarch 0:1.2.3-1h.el6_3 will be an update
---> Package katello-common.noarch 0:0.1.307-1.el6 will be updated
---> Package katello-common.noarch 0:1.2.4-1h.el6_3 will be an update
--> Processing Dependency: rubygem(apipie-rails) >= 0.0.12 for package: katello-common-1.2.4-1h.el6_3.noarch
--> Processing Dependency: rubygem(ldap_fluff) for package: katello-common-1.2.4-1h.el6_3.noarch
---> Package katello-configure.noarch 0:0.1.107-1.el6 will be updated
---> Package katello-configure.noarch 0:1.2.2-1h.el6_3 will be an update
---> Package katello-glue-candlepin.noarch 0:0.1.307-1.el6 will be updated
---> Package katello-glue-candlepin.noarch 0:1.2.4-1h.el6_3 will be an update
---> Package katello-headpin.noarch 0:0.1.145-1.el6 will be updated
---> Package katello-headpin.noarch 0:1.2.4-1h.el6_3 will be an update
---> Package katello-headpin-all.noarch 0:0.1.145-1.el6 will be updated
---> Package katello-headpin-all.noarch 0:1.2.4-1h.el6_3 will be an update
--> Processing Dependency: katello-cli for package: katello-headpin-all-1.2.4-1h.el6_3.noarch
--> Processing Dependency: thumbslug-selinux for package: katello-headpin-all-1.2.4-1h.el6_3.noarch
---> Package katello-selinux.noarch 0:0.1.10-1.el6 will be updated
---> Package katello-selinux.noarch 0:1.2.1-1h.el6_3 will be an update
--> Running transaction check
---> Package katello-cli.noarch 0:1.2.3-1h.el6_3 will be installed
---> Package rubygem-apipie-rails.noarch 0:0.0.12-2.el6cf will be installed
---> Package rubygem-ldap_fluff.noarch 0:0.1.3-1.el6_3 will be installed
---> Package thumbslug-selinux.noarch 0:0.0.26-1.el6_3 will be installed
--> Processing Dependency: thumbslug = 0.0.26-1.el6_3 for package: thumbslug-selinux-0.0.26-1.el6_3.noarch
--> Running transaction check
---> Package thumbslug.noarch 0:0.0.21-1.el6 will be updated
---> Package thumbslug.noarch 0:0.0.26-1.el6_3 will be an update
--> Processing Dependency: akuma >= 1.7 for package: thumbslug-0.0.26-1.el6_3.noarch
--> Processing Dependency: netty >= 3.2.3 for package: thumbslug-0.0.26-1.el6_3.noarch
--> Processing Dependency: jakarta-commons-codec for package: thumbslug-0.0.26-1.el6_3.noarch
--> Processing Dependency: oauth for package: thumbslug-0.0.26-1.el6_3.noarch
--> Running transaction check
---> Package akuma.x86_64 0:1.7-3.el6 will be installed
---> Package apache-commons-codec.noarch 0:1.4-9.1_redhat_1.ep6.el6.1 will be installed
---> Package netty.noarch 0:3.2.6-1_redhat_1.2.ep6.el6 will be installed
---> Package oauth.noarch 0:20100601-3.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                  Arch     Version                      Repository
                                                                           Size
================================================================================
Updating:
 katello-certs-tools      noarch   1.2.1-1h.el6_3               headpin    74 k
 katello-cli-common       noarch   1.2.3-1h.el6_3               headpin   392 k
 katello-common           noarch   1.2.4-1h.el6_3               headpin   331 k
 katello-configure        noarch   1.2.2-1h.el6_3               headpin   122 k
 katello-glue-candlepin   noarch   1.2.4-1h.el6_3               headpin   311 k
 katello-headpin          noarch   1.2.4-1h.el6_3               headpin   4.3 M
 katello-headpin-all      noarch   1.2.4-1h.el6_3               headpin   294 k
 katello-selinux          noarch   1.2.1-1h.el6_3               headpin    24 k
Installing for dependencies:
 akuma                    x86_64   1.7-3.el6                    headpin    16 k
 apache-commons-codec     noarch   1.4-9.1_redhat_1.ep6.el6.1   headpin    77 k
 katello-cli              noarch   1.2.3-1h.el6_3               headpin    77 k
 netty                    noarch   3.2.6-1_redhat_1.2.ep6.el6   headpin   2.9 M
 oauth                    noarch   20100601-3.el6               headpin    56 k
 rubygem-apipie-rails     noarch   0.0.12-2.el6cf               headpin   147 k
 rubygem-ldap_fluff       noarch   0.1.3-1.el6_3                headpin    50 k
 thumbslug-selinux        noarch   0.0.26-1.el6_3               headpin    81 k
Updating for dependencies:
 thumbslug                noarch   0.0.26-1.el6_3               headpin    62 k

Transaction Summary
================================================================================
Install       8 Package(s)
Upgrade       9 Package(s)

Total download size: 9.2 M
Downloading Packages:
(1/17): akuma-1.7-3.el6.x86_64.rpm                       |  16 kB     00:00     
(2/17): apache-commons-codec-1.4-9.1_redhat_1.ep6.el6.1. |  77 kB     00:00     
(3/17): katello-certs-tools-1.2.1-1h.el6_3.noarch.rpm    |  74 kB     00:00     
(4/17): katello-cli-1.2.3-1h.el6_3.noarch.rpm            |  77 kB     00:00     
(5/17): katello-cli-common-1.2.3-1h.el6_3.noarch.rpm     | 392 kB     00:00     
(6/17): katello-common-1.2.4-1h.el6_3.noarch.rpm         | 331 kB     00:00     
(7/17): katello-configure-1.2.2-1h.el6_3.noarch.rpm      | 122 kB     00:00     
(8/17): katello-glue-candlepin-1.2.4-1h.el6_3.noarch.rpm | 311 kB     00:00     
(9/17): katello-headpin-1.2.4-1h.el6_3.noarch.rpm        | 4.3 MB     00:00     
(10/17): katello-headpin-all-1.2.4-1h.el6_3.noarch.rpm   | 294 kB     00:00     
(11/17): katello-selinux-1.2.1-1h.el6_3.noarch.rpm       |  24 kB     00:00     
(12/17): netty-3.2.6-1_redhat_1.2.ep6.el6.noarch.rpm     | 2.9 MB     00:00     
(13/17): oauth-20100601-3.el6.noarch.rpm                 |  56 kB     00:00     
(14/17): rubygem-apipie-rails-0.0.12-2.el6cf.noarch.rpm  | 147 kB     00:00     
(15/17): rubygem-ldap_fluff-0.1.3-1.el6_3.noarch.rpm     |  50 kB     00:00     
(16/17): thumbslug-0.0.26-1.el6_3.noarch.rpm             |  62 kB     00:00     
(17/17): thumbslug-selinux-0.0.26-1.el6_3.noarch.rpm     |  81 kB     00:00     
--------------------------------------------------------------------------------
Total                                            35 MB/s | 9.2 MB     00:00     
Running rpm_check_debug
Running Transaction Test


Transaction Check Error:
  file /usr/bin/headpin from install of katello-cli-1.2.3-1h.el6_3.noarch conflicts with file from package katello-cli-headpin-0.1.16-1.el6.noarch

Error Summary
-------------
Comment 5 Jordan OMara 2012-11-12 15:44:12 EST
Problem comes from the OBSOLETES : line; it should not have a version number.
Comment 6 Jordan OMara 2012-11-12 15:53:03 EST
https://github.com/Katello/katello/pull/1045
Comment 7 Jordan OMara 2012-11-12 15:57:03 EST
Total                                                                              39 MB/s | 451 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : katello-cli-1.2.3-1h.git.8.db0999b.el6.noarch                                                  1/5
warning: /etc/katello/client.conf created as /etc/katello/client.conf.rpmnew
  Installing : thumbslug-selinux-0.0.24-1.el6_2.noarch                                                        2/5
  Updating   : katello-headpin-all-1.2.5-1h.git.0.02924ae.el6.noarch                                          3/5
  Cleanup    : katello-headpin-all-0.2.13-1.el6_2.noarch                                                      4/5
  Erasing    : katello-cli-headpin-0.2.2-1.el6_2.noarch                                                       5/5
Installed products updated.
  Verifying  : thumbslug-selinux-0.0.24-1.el6_2.noarch                                                        1/5
  Verifying  : katello-headpin-all-1.2.5-1h.git.0.02924ae.el6.noarch                                          2/5
  Verifying  : katello-cli-1.2.3-1h.git.8.db0999b.el6.noarch                                                  3/5
  Verifying  : katello-headpin-all-0.2.13-1.el6_2.noarch                                                      4/5
  Verifying  : katello-cli-headpin-0.2.2-1.el6_2.noarch                                                       5/5

Installed:
  katello-cli.noarch 0:1.2.3-1h.git.8.db0999b.el6
Comment 8 Miroslav Suchý 2012-11-13 04:30:41 EST
The fix in #6 is incorrect. You have to provide versioned obsolete.
Because you now provides 
  katello-cli-headpin = 1.0.1-1
and the same package obsolete
  katello-cli-headpin
so you are obsoleting itself. Which is bad.

The real problem is that katello-cli-headpin is not replaced. That is cause by missing space. See:
# rpm -qp --obsoletes ~/repo1/katello-cli-1.2.3-1h.el6_3.noarch.rpm
katello-cli-headpin<  
1.0.1-1
# rpm -qp --provides ~/repo1/katello-cli-1.2.3-1h.el6_3.noarch.rpm
1.0.1-1  
config(katello-cli) = 1.2.3-1h.el6_3
katello-cli-headpin=

Correct fix is to put space in front of "<" and "=". With that fixed:

# rpm -qp --obsoletes katello-cli-1.2.3-1h.el6.noarch.rpm 
katello-cli-headpin < 1.0.1-1

And yum behaves correctly

# yum upgrade --disablerepo=* --enablerepo=katello2
Loaded plugins: product-id, rhnplugin, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
katello2                                                                                              | 1.3 kB     00:00 ... 
katello2/primary                                                                                      | 1.2 kB     00:00 ... 
katello2                                                                                                                 3/3
Setting up Upgrade Process
Resolving Dependencies
--> Running transaction check
---> Package katello-cli.noarch 0:1.2.3-1h.el6 will be obsoleting
---> Package katello-cli-common.noarch 0:0.1.112-1.el6cf will be updated
---> Package katello-cli-common.noarch 0:1.2.3-1h.el6 will be an update
---> Package katello-cli-headpin.noarch 0:0.1.16-1.el6 will be obsoleted
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================
 Package                             Arch                    Version                         Repository                 Size
=============================================================================================================================
Installing:
 katello-cli                         noarch                  1.2.3-1h.el6                    katello2                   77 k
     replacing  katello-cli-headpin.noarch 0.1.16-1.el6
Updating:
 katello-cli-common                  noarch                  1.2.3-1h.el6                    katello2                  392 k

Transaction Summary
=============================================================================================================================
Install       1 Package(s)
Upgrade       1 Package(s)

Total download size: 469 k
Is this ok [y/N]: y
Downloading Packages:
-----------------------------------------------------------------------------------------------------------------------------
Total                                                                                         21 MB/s | 469 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Updating   : katello-cli-common-1.2.3-1h.el6.noarch                                                                    1/4 
  Installing : katello-cli-1.2.3-1h.el6.noarch                                                                           2/4 
  Erasing    : katello-cli-headpin-0.1.16-1.el6.noarch                                                                   3/4 
  Cleanup    : katello-cli-common-0.1.112-1.el6cf.noarch                                                                 4/4 
Installed products updated.
  Verifying  : katello-cli-1.2.3-1h.el6.noarch                                                                           1/4 
  Verifying  : katello-cli-common-1.2.3-1h.el6.noarch                                                                    2/4 
  Verifying  : katello-cli-common-0.1.112-1.el6cf.noarch                                                                 3/4 
  Verifying  : katello-cli-headpin-0.1.16-1.el6.noarch                                                                   4/4 

Installed:
  katello-cli.noarch 0:1.2.3-1h.el6                                                                                          

Updated:
  katello-cli-common.noarch 0:1.2.3-1h.el6                                                                                   

Replaced:
  katello-cli-headpin.noarch 0:0.1.16-1.el6


Fixed in:
https://github.com/Katello/katello/pull/1047
Comment 9 Tazim Kolhar 2012-11-15 02:40:54 EST
FAILED :


# rpm -qa | grep katello*
katello-headpin-0.1.145-1.el6.noarch
katello-common-0.1.307-1.el6.noarch
katello-glue-candlepin-0.1.307-1.el6.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-cli-headpin-0.1.16-1.el6.noarch
katello-selinux-0.1.10-1.el6.noarch
katello-cli-common-0.1.107-1.el6.noarch
katello-configure-0.1.107-1.el6.noarch
katello-headpin-all-0.1.145-1.el6.noarch
katello-certs-tools-1.0.6-1.el6.noarch


# Stop all the services (tomcat6,thumbslug,katello,katello-jobs)


# yum update -y katello*
Transaction Summary
================================================================================
Install      14 Package(s)
Upgrade      12 Package(s)

Total size: 29 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test


Transaction Check Error:
  file /usr/bin/headpin from install of katello-cli-1.2.3-1h.el6_3.noarch conflicts with file from package katello-cli-headpin-0.1.16-1.el6.noarch

Error Summary
-------------
Comment 11 Lukas Zapletal 2012-11-23 04:48:31 EST
I am experiencing the same with SAM 1.1 -> SAM 1.2 upgrade.

Transaction Check Error:
  file /etc/katello/client.conf from install of katello-cli-1.1.11-1h.el6_3.noarch conflicts with file from package katello-cli-headpin-0.2.2-1.el6_2.noarch
  file /usr/bin/headpin from install of katello-cli-1.1.11-1h.el6_3.noarch conflicts with file from package katello-cli-headpin-0.2.2-1.el6_2.noarch
Comment 12 Miroslav Suchý 2012-11-23 04:51:44 EST
I thought that Jordan will cherrypick it, as he did in first case.So I did not cherrypick it.
Done now:
* 2550dea (HEAD, SAM-1.2) 871622 - correctly set provides and obsoletes
* 4d7f64d Revert "871622 - fixing obsoletes to correctly upgrade from katello-cli-headpin"
Comment 14 Lukas Zapletal 2012-11-23 04:53:21 EST
WORKAROUND until this is resolved in SAM:

yum remove katello-cli-headpin
yum upgrade
Comment 15 Garik Khachikyan 2012-11-23 04:54:01 EST
hey - seems you are using old katello-cli man!
Comment 16 Miroslav Suchý 2012-11-23 04:55:00 EST
Jordan please build the package on Monday as you resolve with Tom which tagger you will use.
Comment 18 Garik Khachikyan 2012-11-23 05:06:48 EST
sry: so code is in branch.. moving back to modified and confirm: it _is_ right status now! :) finally. (seems)
Comment 19 Og Maciel 2012-11-25 11:29:55 EST
Hi guys! I'm confused with this issue as I just finished successfully upgrading from 1.0 to 1.2 following the document https://fedorahosted.org/katello/wiki/Upgrade with the following additions:

* I had to also stop qpidd which is not listed.
* After the upgrade is completed, all katello services are **not** restarted and you have to either:
  * run katello-services start, or
  * run the optional katello-configure -b --answer-file=/etc/katello/katello-configure.conf

Anyhow, everything worked smoothly for 1.0 to 1.2 and now I'd like to know if you all followed the same doc? 1.0 to 1.2?
Comment 21 Tom McKay 2012-12-03 10:40:48 EST
In latest compose
Comment 24 errata-xmlrpc 2013-02-21 14:18:28 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0544.html

Note You need to log in before you can comment on or make changes to this bug.