Bug 1044469 - upgrade can not be continued when trying to upgrade ose-1.2 installed from RHN Classic
Summary: upgrade can not be continued when trying to upgrade ose-1.2 installed from RH...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cluster Version Operator
Version: 2.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Jason DeTiberus
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-18 11:24 UTC by Johnny Liu
Modified: 2014-02-04 14:50 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-04 14:50:51 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Johnny Liu 2013-12-18 11:24:09 UTC
Description of problem:
I install ose-1.2 using RHN Classic, and subscription-manager rpm is already installed on the system. Now trying to upgrade it to ose-2.0.
# ose-upgrade begin
INFO: OpenShift node installed.
INFO: Setting host step 'begin' status to UPGRADING
INFO: Starting upgrade number 2 to version 2.0.
INFO: loading list of installed packages
ERROR: detect_package_source
Both RHN and RHSM are enabled on this host.  Please disable one or the other
and re-run this tool.
INFO: Setting host step 'begin' status to FAILED

In /usr/lib/ruby/site_ruby/1.8/ose-upgrade/main.rb:
    def detect_package_source
      return @package_source if @package_source
      load_rpm_list
      have_rhn = File.exists? '/etc/sysconfig/rhn/systemid'
      have_rhsm = @rpms['subscription-manager'] && system('subscription-manager identity >& /dev/null')
      if have_rhn && have_rhsm
        do_fail "Both RHN and RHSM are enabled on this host.  Please disable one or the other\n" +
                "and re-run this tool."
        @package_source = nil
      elsif have_rhn
        @package_source = :rhn
        verbose "RHN subscription detected."
      elsif have_rhsm
        @package_source = :rhsm
        verbose "Subscription-manager subscription detected."
      else
        @package_source = :repo
        verbose "No subscription detected; assuming plain yum repos."
      end
      return @package_source
    end

When system has installed subscription-manager, and "subscription-manager identity" return success, then it is treated as RHSM is enabled, this logic is not correct.

[root@node1 openshift]# rpm -q subscription-manager
subscription-manager-1.9.11-1.el6.x86_64
[root@node1 openshift]# subscription-manager identity
server type: RHN Classic


Workaround: 
Remove subscription-manager package from system.

Version-Release number of selected component (if applicable):
openshift-enterprise-release-2.0.0c-1.git.19.ecc76e1.el6op.noarch

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Jason DeTiberus 2013-12-18 17:05:49 UTC
https://github.com/openshift/enterprise/pull/60

Comment 3 Johnny Liu 2013-12-19 12:02:05 UTC
Verified this bug with openshift-enterprise-release-2.0.0c-1.git.21.e364d06.el6op.noarch, and PASS.


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