Bug 1126351

Summary: No need to call oo-admin-cartridge to install fuse/amq cartridge in rpm %post section
Product: OpenShift Container Platform Reporter: xjia <xjia>
Component: FuseAssignee: Kurt T Stam <kurt.stam>
Status: CLOSED CURRENTRELEASE QA Contact: David Simansky <dsimansk>
Severity: low Docs Contact:
Priority: low    
Version: 2.1.0CC: aileenc, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-28 13:55:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description xjia 2014-08-04 09:11:38 UTC
Description of problem:
Please keep consistent with other cartridges. No need to call oo-admin-cartridge to install fuse/amq cartridge in rpm %post section.

Version-Release number of selected component (if applicable):
openshift-origin-cartridge-amq-6.1.0.redhat.387-6.el6op.noarch.rpm
openshift-origin-cartridge-fuse-6.1.0.redhat.387-6.el6op.noarch.rpm

How reproducible:
Always

Steps to Reproduce:
1. rpm -q -scripts openshift-origin-cartridge-fuse
2. rpm -q -scripts openshift-origin-cartridge-amq
3. rpm -q -scripts openshift-origin-cartridge-php
4. rpm -q -scripts openshift-origin-cartridge-ruby

Actual results:
[root@node ~]# rpm -q -scripts openshift-origin-cartridge-fuse
postinstall scriptlet (using /bin/sh):
/usr/sbin/oo-admin-cartridge --action install --offline --source /usr/libexec/openshift/cartridges/fuse
[root@node ~]# rpm -q -scripts openshift-origin-cartridge-amq
postinstall scriptlet (using /bin/sh):
/usr/sbin/oo-admin-cartridge --action install --offline --source /usr/libexec/openshift/cartridges/amq
[root@node ~]# rpm -q -scripts openshift-origin-cartridge-php
[root@node ~]# rpm -q -scripts openshift-origin-cartridge-ruby
[root@node ~]# 

Expected results:
[root@node ~]# rpm -q -scripts openshift-origin-cartridge-fuse
[root@node ~]# rpm -q -scripts openshift-origin-cartridge-amq
[root@node ~]# rpm -q -scripts openshift-origin-cartridge-php
[root@node ~]# rpm -q -scripts openshift-origin-cartridge-ruby
[root@node ~]# 

Addition Info:
Jbosseap/Jbossews also don't have this action.
[root@node ~]# rpm -q -scripts openshift-origin-cartridge-jbosseap
postinstall scriptlet (using /bin/sh):
alternatives --install /etc/alternatives/maven-3.0 maven-3.0 /usr/share/java/apache-maven-3.0.3 100
alternatives --set maven-3.0 /usr/share/java/apache-maven-3.0.3


alternatives --remove jbosseap-6.0 /usr/share/jbossas
alternatives --remove jbosseap-6 /usr/share/jbossas
alternatives --install /etc/alternatives/jbosseap-6 jbosseap-6 /usr/share/jbossas 102
alternatives --set jbosseap-6 /usr/share/jbossas
#
# Temp placeholder to add a postgresql datastore -- keep this until the
# the postgresql module is added to jboss eap 6.0.* upstream.
mkdir -p /etc/alternatives/jbosseap-6/modules/org/postgresql/jdbc/main
ln -fs /usr/share/java/postgresql-jdbc3.jar /etc/alternatives/jbosseap-6/modules/org/postgresql/jdbc/main
cp -p /usr/libexec/openshift/cartridges/jbosseap/versions/shared/modules/postgresql_module.xml /etc/alternatives/jbosseap-6/modules/org/postgresql/jdbc/main/module.xml

# Do the same for the mysql connector.
mkdir -p /etc/alternatives/jbosseap-6/modules/com/mysql/jdbc/main
ln -fs /usr/share/java/mysql-connector-java.jar /etc/alternatives/jbosseap-6/modules/com/mysql/jdbc/main
cp -p /usr/libexec/openshift/cartridges/jbosseap/versions/shared/modules/mysql_module.xml /etc/alternatives/jbosseap-6/modules/com/mysql/jdbc/main/module.xml

# link in the metrics module
mkdir -p /etc/alternatives/jbosseap-6/modules/com/openshift
ln -fs /usr/share/openshift/jboss/modules/com/openshift/metrics /etc/alternatives/jbosseap-6/modules/com/openshift/metrics

[root@node ~]# rpm -q -scripts openshift-origin-cartridge-jbossews
postinstall scriptlet (using /bin/sh):
# To modify an alternative you should:
# - remove the previous version if it's no longer valid
# - install the new version with an increased priority
# - set the new version as the default to be safe

alternatives --install /etc/alternatives/maven-3.0 maven-3.0 /usr/share/java/apache-maven-3.0.3 100
alternatives --set maven-3.0 /usr/share/java/apache-maven-3.0.3


alternatives --remove jbossews-1.0 /usr/share/tomcat6
alternatives --install /etc/alternatives/jbossews-1.0 jbossews-1.0 /usr/share/tomcat6 102
alternatives --set jbossews-1.0 /usr/share/tomcat6

alternatives --remove jbossews-2.0 /usr/share/tomcat7
alternatives --install /etc/alternatives/jbossews-2.0 jbossews-2.0 /usr/share/tomcat7 102
alternatives --set jbossews-2.0 /usr/share/tomcat7

Comment 2 Kurt T Stam 2014-08-04 13:05:38 UTC
Hi xjia,

Does this line need to be removed from the regular cartridge (master) as well? Or just for the rpm version?

--Kurt

Comment 5 xjia 2014-08-15 09:19:30 UTC
Could you move this bug to "ON_QA"?

Version:
openshift-origin-cartridge-fuse-6.1.0.redhat.389-1.el6op.noarch.rpm
openshift-origin-cartridge-amq-6.1.0.redhat.389-1.el6op.noarch.rpm

Verify:
[root@node2 ~]# rpm -q -scripts openshift-origin-cartridge-fuse
postinstall program: /bin/sh
[root@node2 ~]# rpm -q -scripts openshift-origin-cartridge-amq
postinstall program: /bin/sh

Comment 6 xjia 2014-08-15 09:55:34 UTC
Verify this bug, according to comment #5