Bug 1093192 - /etc/openshift-enterprise-release does not update with releases
Summary: /etc/openshift-enterprise-release does not update with releases
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cluster Version Operator
Version: 2.0.0
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: ---
: ---
Assignee: John W. Lamb
QA Contact: libra bugs
URL:
Whiteboard:
: 1140890 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-30 21:42 UTC by Timothy Williams
Modified: 2018-12-05 18:24 UTC (History)
9 users (show)

Fixed In Version: openshift-enterprise-upgrade-2.2.0-1.git.61.3ac24b1.el6op
Doc Type: Bug Fix
Doc Text:
The /etc/openshift-enterprise-release file, which intends to display the currently installed release of OpenShift Enterprise on a host, was not consistently updated when a host updated to a newer asynchronous release (for example, release 2.1.7). This was due to the openshift-enterprise-release RPM package, which provides the file, only being consistently updated during minor release upgrades (for example, upgrading from release 2.0 to 2.1) and then being inconsistently updated for subsequent asynchronous releases. This issue led to confusion when trying to determine the installed asynchronous release of an OpenShift Enterprise deployment. This bug fix updates the file to "OpenShift Enterprise 2.2.0" and future asynchronous releases will ensure that this file is updated accordingly.
Clone Of:
Environment:
Last Closed: 2014-11-03 19:54:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2014:1796 0 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Enterprise 2.2 Release Advisory 2014-11-04 00:52:02 UTC

Description Timothy Williams 2014-04-30 21:42:29 UTC
Description of problem:
The file `/etc/openshift-enterprise-release` does not update with the actual releases. The release notes specify that we are currently on release 2.0-5, however a fully updated OSE 2.0 system has the following:

# cat /etc/openshift-enterprise-release 
OpenShift Enterprise 2.0.1

# rpm -qa | grep openshift-origin-broker
openshift-origin-broker-util-1.17.6.4-1.el6op.noarch
openshift-origin-broker-1.15.3.5-1.el6op.noarch

# rpm -qa | grep openshift-enterprise-release
openshift-enterprise-release-2.0.1-1.el6op.noarch

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

How reproducible:
Always

Steps to Reproduce:
1. Update an OSE 2.0 system
2. $ cat /etc/openshift-enterprise-release 
3.

Actual results:
OpenShift Enterprise 2.0.1

Expected results:
OpenShift Enterprise 2.0.5

Additional info:

Release notes - https://access.redhat.com/site/documentation/en-US/OpenShift_Enterprise/2/html-single/2.0_Release_Notes/index.html

I am unsure if this should be a doc bug, or a broker bug. Assigning to broker.

Comment 2 Luke Meyer 2014-05-01 19:25:02 UTC
It is admittedly confusing.

As it functions now, the file is created with the version of the openshift-enterprise-release RPM. That RPM doesn't generally get updated for x.y.z releases (since its main purpose is to pull in install/upgrade dependencies). It is only sure to be updated for x.y releases. It will for instance be updated for the 2.1 release.

We could document that it works like this. Or we could make a policy to bump the version for each point release, to the extent that we track point releases (there are occasional asynchronous errata too); keeping in mind that just because this RPM got updated is no guarantee that other packages got updated, so it's an unreliable indicator of version. Customer and stakeholder input would be welcome here.

Comment 3 charles_sheridan 2014-05-01 20:11:03 UTC
I agree that this is confusing. After performing a new install, I assumed that I did not have access to the appropriate repositories or that my install was broken. A documentation change or code update would have helped with troubleshooting the version number. 

Could a solution be to add an 'oo-version' command to check for the most recent packages and generate the version number that way?

Comment 4 Miciah Dashiel Butler Masters 2014-09-12 01:01:35 UTC
*** Bug 1140890 has been marked as a duplicate of this bug. ***

Comment 6 Luke Meyer 2014-10-16 22:07:42 UTC
Going to be hard to detect until the first 2.2.z release, but this should be fixed. ose-upgrade no longer messes with this file, it's just overwritten by the RPM when it's installed.

Comment 8 Johnny Liu 2014-10-17 09:27:53 UTC
The reason why /etc/openshift-enterprise-release is not update after "yum update" is that:
# cat /etc/openshift-enterprise-release 
OpenShift Enterprise 2.1.6

# rpm -qf /etc/openshift-enterprise-release
openshift-enterprise-release-2.1.7-1.el6op.noarch

# rpm -q --scripts openshift-enterprise-release-2.1.7-1.el6op.noarch
postinstall scriptlet (using /bin/sh):

# If the version file doesn't exist, this is a new installation, so create it.
# Otherwise, leave as-is for the upgrade to handle.
vfile=/etc/openshift-enterprise-release
if [ ! -f $vfile ]; then
  # create the initial version file
  echo "OpenShift Enterprise 2.1.7" > $vfile
  chmod 644 $vfile
fi
# same for the upgrade state file.
if [ ! -f /etc/openshift/upgrade/state.yaml ]; then
  ose-upgrade --complete 3 >& /dev/null
fi

That means once /etc/openshift-enterprise-release is created upon first installation of openshift-enterprise-release, yum update will not overwrite it.

Just as what was said in comment 2 - "its main purpose is to pull in install/upgrade dependencies".

Verify this bug with openshift-enterprise-release-2.2.0-1.git.61.3ac24b1.el6op.noarch
# yum update openshift-enterprise-*

# rpm -q --scripts openshift-enterprise-release
postinstall scriptlet (using /bin/sh):

# same for the upgrade state file.
if [ ! -f /etc/openshift/upgrade/state.yaml ]; then
  ose-upgrade --complete 4 >& /dev/null
fi

The installation of openshift-enterprise-release will never touch /etc/openshift-enterprise-release, this fill will be overwritten.

# cat /etc/openshift-enterprise-release
OpenShift Enterprise 2.2.0


Start to ose-upgrade.
# ose-upgrade begin
<--snip-->
INFO: --END /usr/lib/ruby/site_ruby/1.8/ose-upgrade/host/upgrades/4/repo/03-configure-yum-priorities OUTPUT--
INFO: /usr/lib/ruby/site_ruby/1.8/ose-upgrade/host/upgrades/4/repo/03-configure-yum-priorities ran without error.
INFO: Setting host step 'begin' status to COMPLETE
INFO: To continue the upgrade, install a specific upgrade package.
WARN: determine_upgrade_status
You appear to have an OpenShift Enterprise node installed;
please install the node upgrade package to proceed with this upgrade.
  # yum install openshift-enterprise-upgrade-node

# cat /etc/openshift-enterprise-release
OpenShift Enterprise 2.2.0


Compare with a little older package - openshift-enterprise-release-2.2.0-1.git.47.84857df.el6op.noarch
<--snip-->
INFO: --END /usr/lib/ruby/site_ruby/1.8/ose-upgrade/host/upgrades/4/repo/03-configure-yum-priorities OUTPUT--
INFO: /usr/lib/ruby/site_ruby/1.8/ose-upgrade/host/upgrades/4/repo/03-configure-yum-priorities ran without error.
INFO: updating /etc/openshift-enterprise-release
INFO: Setting host step 'begin' status to COMPLETE
INFO: To continue the upgrade, install a specific upgrade package.
WARN: determine_upgrade_status
You appear to have an OpenShift Enterprise broker installed;
please install the broker upgrade package to proceed with this upgrade.
  # yum install openshift-enterprise-upgrade-broker

# cat /etc/openshift-enterprise-release
OpenShift Enterprise 2.2

Obviously in the latest openshift-enterprise-release package, ose-upgrade no longer messes with this file.


Due to there is no puddle, my verification have to stop here, not sure the result when the whole ose-upgrade process is finished.

Waiting new puddle.

Comment 11 Johnny Liu 2014-10-20 11:21:07 UTC
Verified this bug with openshift-enterprise-release-2.2.0-1.git.61.3ac24b1.el6op.noarch, and PASS.


Install latest ose-2.1.z env, in which openshift-enterprise-release-2.1.7-1.git.24.1520603.el6op.noarch will be installed.
Run "ose-upgrade begin"
<--snip-->
INFO: --END /usr/lib/ruby/site_ruby/1.8/ose-upgrade/host/upgrades/4/repo/03-configure-yum-priorities OUTPUT--
INFO: /usr/lib/ruby/site_ruby/1.8/ose-upgrade/host/upgrades/4/repo/03-configure-yum-priorities ran without error.
INFO: updating /etc/openshift-enterprise-release
INFO: Setting host step 'begin' status to COMPLETE
<--snip-->

Seen from the above output, though openshift-enterprise-release-2.1.7-1.git.24.1520603.el6op.noarch still mess with /etc/openshift-enterprise-release, the following step would be "yum install openshift-enterprise-upgrade-broker", when running this step, "openshift-enterprise-release-2.2.0-1.git.61.3ac24b1.el6op.noarch" would replace old ose-2.1 openshift-enterprise-release, the new package would overwrite /etc/openshift-enterprise-release.

After install openshift-enterprise-upgrade-broker
# cat /etc/openshift-enterprise-release
OpenShift Enterprise 2.2.0

# rpm -qf /etc/openshift-enterprise-release
openshift-enterprise-release-2.2.0-1.git.61.3ac24b1.el6op.noarch

# rpm -qV openshift-enterprise-release-2.2.0-1.git.61.3ac24b1.el6op.noarch

#  rpm -q --scripts openshift-enterprise-release
postinstall scriptlet (using /bin/sh):

# create upgrade state file if needed.
if [ ! -f /etc/openshift/upgrade/state.yaml ]; then
  ose-upgrade --complete 4 >& /dev/null
fi

So move this bug to verified.

Comment 13 errata-xmlrpc 2014-11-03 19:54:29 UTC
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.

https://rhn.redhat.com/errata/RHSA-2014-1796.html


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