Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1636296

Summary: [OSP10] instack uses /tmp as temporary directory for DIB to run scripts, but /tmp is often mounted with noexec
Product: Red Hat OpenStack Reporter: David Vallee Delisle <dvd>
Component: instackAssignee: Emilien Macchi <emacchi>
Status: CLOSED ERRATA QA Contact: Gurenko Alex <agurenko>
Severity: high Docs Contact:
Priority: high    
Version: 10.0 (Newton)CC: ahrechan, aschultz, bdobreli, emacchi, jslagle, mburns, nlevinki
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: 10.0 (Newton)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: instack-5.1.0-3.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1636290 Environment:
Last Closed: 2019-01-16 17:09:07 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:
Bug Depends On: 1636290, 1661636    
Bug Blocks:    

Description David Vallee Delisle 2018-10-05 03:07:18 UTC
+++ This bug was initially created as a clone of Bug #1636290 +++

Description of problem:
A lot of deployments are mounting /tmp with noexec flag for security reasons. Because of this, it's impossible to run any executables in there, which breaks the undercloud install and undercloud upgrade processes as described here [1]

[1] https://access.redhat.com/solutions/3002821

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

How reproducible:
All the time

Steps to Reproduce:
[stack@undercloud-0 ~]$ echo "tmpfs /tmp tmpfs mode=1777,nosuid,nodev,noexec 0 0" | sudo tee -a /etc/fstab
[stack@undercloud-0 ~]$ sudo mount /tmp
[stack@undercloud-0 ~]$ sudo systemctl stop 'openstack-*' 'neutron-*' httpd
[stack@undercloud-0 ~]$ sudo yum update python-tripleoclient
[stack@undercloud-0 ~]$ openstack undercloud (upgrade or install)

Actual results:
instack uses tempfile.mkdtemp() without any argument to create a temporary folder to store scripts that are going to be run by dib-run-parts. When dib-run-parts starts, it runs a find /tmp/path/to/scripts -executable which returns nothing and it quits.


Expected results:
instack should use a different prefix. 


Additional info:
in instack/main.py, we already use ~stack/.instack/ to store the logs. It might be a good candidate to store the temp folders, for example: ~stack/.instack/tmp/

Comment 7 Artem Hrechanychenko 2018-12-21 20:43:41 UTC
works only for updates
for clean deployment fails with https://bugzilla.redhat.com/show_bug.cgi?id=1661636

Comment 11 errata-xmlrpc 2019-01-16 17:09:07 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/RHBA-2019:0075