Bug 1323656 - Image does not set X_SCLS properly for all commands
Summary: Image does not set X_SCLS properly for all commands
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Developer Toolset
Classification: Red Hat
Component: devtoolset-4-perftools-container
Version: DTS 4.1 RHEL 7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta1
: 4.1
Assignee: Frank Ch. Eigler
QA Contact: Martin Cermak
URL:
Whiteboard:
Depends On: 1323575
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-04 11:13 UTC by Miloš Prchlík
Modified: 2016-05-31 08:45 UTC (History)
4 users (show)

Fixed In Version: devtoolset-4-perftools-docker rhel7 4-8
Doc Type: Bug Fix
Doc Text:
Clone Of: 1323575
Environment:
Last Closed: 2016-05-31 08:45:11 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:1151 0 normal SHIPPED_LIVE new container image: rhscl/devtoolset-4-perftools-rhel7 2016-05-31 12:39:26 UTC

Description Miloš Prchlík 2016-04-04 11:13:15 UTC
The situation described bellow for devtoolset-4-toolchain-rhel7 image is true also for devtoolset-4-perftools-rhel7, therefore cloning the bug.

+++ This bug was initially created as a clone of Bug #1323575 +++

Description of problem:

X_SCLS environmental variable - among many others - is not set for all commands that can be executed using docker-4-toolchain image. It loos like the variable exists only when bash gets involved:

.qa.[root@ibm-x3630m4-01 ~]# docker run --rm rhscl/devtoolset-4-toolchain-rhel7 bash -c 'env'
MANPATH=/opt/rh/devtoolset-4/root/usr/share/man:
HOSTNAME=cb70ccd9b20d
PERL5LIB=/opt/rh/devtoolset-4/root//usr/lib64/perl5/vendor_perl:/opt/rh/devtoolset-4/root/usr/lib/perl5:/opt/rh/devtoolset-4/root//usr/share/perl5/vendor_perl
X_SCLS=devtoolset-4 
JAVACONFDIRS=/opt/rh/devtoolset-4/root/etc/java:/etc/java
PCP_DIR=/opt/rh/devtoolset-4/root
LD_LIBRARY_PATH=/opt/rh/devtoolset-4/root/usr/lib64:/opt/rh/devtoolset-4/root/usr/lib
XDG_CONFIG_DIRS=/opt/rh/devtoolset-4/root/etc/xdg:/etc/xdg
PATH=/opt/rh/devtoolset-4/root/usr/bin:/opt/app-root/src/bin:/opt/app-root/bin:/opt/rh/devtoolset-4/root/usr/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PKGM=yum
PWD=/opt/app-root/src
SHLVL=1
HOME=/opt/app-root/src
PYTHONPATH=/opt/rh/devtoolset-4/root/usr/lib64/python2.7/site-packages:/opt/rh/devtoolset-4/root/usr/lib/python2.7/site-packages
XDG_DATA_DIRS=/opt/rh/devtoolset-4/root/usr/share:/usr/local/share:/usr/share
INFOPATH=/opt/rh/devtoolset-4/root/usr/share/info
container=docker
_=/usr/bin/env
.qa.[root@ibm-x3630m4-01 ~]# 


Compare with:

.qa.[root@ibm-x3630m4-01 ~]# docker run --rm rhscl/devtoolset-4-toolchain-rhel7 env
PATH=/opt/app-root/src/bin:/opt/app-root/bin:/opt/rh/devtoolset-4/root/usr/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=1857734cceaf
container=docker
PKGM=yum
HOME=/opt/app-root/src
BASH_ENV=/opt/app-root/etc/scl_enable
ENV=/opt/app-root/etc/scl_enable
PROMPT_COMMAND=. /opt/app-root/etc/scl_enable
.qa.[root@ibm-x3630m4-01 ~]# 


For example, when I decide to use python scripting, my scripts won't have any information about enabled collections:

.qa.[root@ibm-x3630m4-01 ~]# docker run --rm rhscl/devtoolset-4-toolchain-rhel7 python -c 'import os, pprint; pprint.pprint(dict(os.environ), width=1)'
{'BASH_ENV': '/opt/app-root/etc/scl_enable',
 'ENV': '/opt/app-root/etc/scl_enable',
 'HOME': '/opt/app-root/src',
 'HOSTNAME': '10d760a7149d',
 'PATH': '/opt/app-root/src/bin:/opt/app-root/bin:/opt/rh/devtoolset-4/root/usr/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
 'PKGM': 'yum',
 'PROMPT_COMMAND': '. /opt/app-root/etc/scl_enable',
 'container': 'docker'}
.qa.[root@ibm-x3630m4-01 ~]# 


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

rhscl/devtoolset-4-toolchain-rhel7, release 9.2 (95d79b670a3a)


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Marek Polacek on 2016-04-04 12:17:23 CEST ---

Bah, I thought
# Enable the SCL for all bash scripts.
ENV BASH_ENV=/opt/app-root/etc/scl_enable \
    ENV=/opt/app-root/etc/scl_enable \
    PROMPT_COMMAND=". /opt/app-root/etc/scl_enable"
was supposed to handle all these cases.  Not sure yet why it is ignored.

--- Additional comment from Marek Polacek on 2016-04-04 13:00:14 CEST ---

Note that devtoolset-4-perftools-docker behaves the same.

Comment 1 Miloš Prchlík 2016-04-05 10:50:18 UTC
FYI, we found a possible solution, see https://bugzilla.redhat.com/show_bug.cgi?id=1323575#c9 and later.

Comment 5 errata-xmlrpc 2016-05-31 08:45:11 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://access.redhat.com/errata/RHEA-2016:1151


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