Bug 1001459 - post script will throw error message when upgrading rubygem-openshift-origin-auth-remote-user and auth plugin config file is not named to "openshift-origin-auth-remote-user.conf"
Summary: post script will throw error message when upgrading rubygem-openshift-origin-...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 1.2.1
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Miciah Dashiel Butler Masters
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-27 06:03 UTC by Johnny Liu
Modified: 2017-03-08 17:35 UTC (History)
4 users (show)

Fixed In Version: rubygem-openshift-origin-auth-remote-user-1.8.3-1
Doc Type: Bug Fix
Doc Text:
When upgrading rubygem-openshift-origin-auth-remote-user, error messages were displayed if the configuration file of the Remote User authentication plug-in was not in the default location. This could occur if the plug-in was not enabled or if the configuration file was named differently. This issue has been fixed in the current release of OpenShift Enterprise.
Clone Of:
Environment:
Last Closed: 2013-09-25 15:30:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1275 0 normal SHIPPED_LIVE OpenShift Enterprise 1.2.3 bug fix and enhancement update 2013-09-25 19:26:23 UTC

Description Johnny Liu 2013-08-27 06:03:32 UTC
Description of problem:
Found this issue during tps-rpm test.

Currently auth plugin config file could be named to any, just make sure the config file has ".conf" suffix should be ok.

# rpm -qp --scripts rubygem-openshift-origin-auth-remote-user-1.8.2-1.el6op.noarch.rpm
postinstall scriptlet (using /bin/sh):

if [ $1 -ne 1 ] # this is an update; fix the previously configured realm.
then
  sed -i -e 's/AuthName.*/AuthName "OpenShift Broker API"/' /var/www/openshift/broker/httpd/conf.d/openshift-origin-auth-remote-user.conf
fi

Now issue comes, if user has auth config file named "xxx.conf", then update rubygem-openshift-origin-auth-remote-user package using "rpm -Uhv", it will throw the following error message:
# rpm -Uhv rubygem-openshift-origin-auth-remote-user-1.8.2-1.el6op.noarch.rpm
sed: can't read /var/www/openshift/broker/httpd/conf.d/openshift-origin-auth-remote-user.conf: No such file or directory
warning: %post(rubygem-openshift-origin-auth-remote-user-1.8.2-1.el6op.noarch) scriptlet failed, exit status 2

Version-Release number of selected component (if applicable):
rubygem-openshift-origin-auth-remote-user-1.8.2-1.el6op.noarch.rpm

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Miciah Dashiel Butler Masters 2013-08-27 10:12:20 UTC
We need to backport https://github.com/openshift/origin-server/commit/d2e35f26571065963f2294d2b5a0881059ce9e0a

Comment 3 Miciah Dashiel Butler Masters 2013-09-10 01:54:39 UTC
Pull request:   https://github.com/openshift/enterprise-server/pull/135

This is direct cherry-picking of the commit mentioned in comment 2, but in light of bug 999182, should we try to be a little more clever in case the .conf file has a different name?

Comment 4 Brenton Leanhardt 2013-09-10 12:56:05 UTC
I'm OK will keeping the filename guessing logic in oo-diagnostics and keeping the %post logic the same as upstream.

Comment 7 Johnny Liu 2013-09-13 05:54:47 UTC
Verified this bug with rubygem-openshift-origin-auth-remote-user-1.8.3-1.el6op.noarch, and PASS.

# rpm -Uhv rubygem-openshift-origin-auth-remote-user-1.8.3-1.el6op.noarch.rpm 
Preparing...                ########################################### [100%]
   1:rubygem-openshift-origi########################################### [100%]

Comment 10 errata-xmlrpc 2013-09-25 15:30:47 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.

http://rhn.redhat.com/errata/RHBA-2013-1275.html


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