Bug 864008 - [US2599][fork] rhc app tidy can not work well
[US2599][fork] rhc app tidy can not work well
Status: CLOSED NOTABUG
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Dan McPherson
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-08 06:31 EDT by Wei Sun
Modified: 2015-05-14 22:06 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-08 10:36:59 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Wei Sun 2012-10-08 06:31:56 EDT
Description of problem:

 Create an application,and create a test file in /tmp directory,and run "rhc app tidy -a $appname",and can get prompt that application cleaned up,but check /tmp directory,test file is not  cleaned up successfully.
 
Version-Release number of selected component (if applicable):

server:devenv_2295
client: built from fork_ami_US2597_US2599_US2813_US2817_US2872_US2816_US2814_209

How reproducible:

always

Steps to Reproduce:

1.create an application
2. ssh instance and create a test file in /tmp directory
   cd /var/lib/openshift/9d4254864330483bb5680b58e3ce1031/php-5.3/tmp/
   touch test.txt
   echo test >> test.txt
3.check /tmp directory
4.rhc app tidy -a $appname
  rhc app tidy -a phptest
5.check /tmp directory


Actual results:

3.before tidying

[root@ip-10-60-130-169 openshift]# ls -al 9d4254864330483bb5680b58e3ce1031/php-5.3/tmp
total 12
drwxr-xr-x.  2 9d4254864330483bb5680b58e3ce1031 9d4254864330483bb5680b58e3ce1031 4096 Oct  8 04:19 .
drwxr-xr-x. 10 root                             root                             4096 Oct  8 04:15 ..
-rw-r--r--.  1 root                             root                                5 Oct  8 04:22 text.txt

[root@ip-10-60-130-169 openshift]# cat 9d4254864330483bb5680b58e3ce1031/php-5.3/tmp/text.txt
test

4.rhc app tidy

[sunwei@dhcp-8-229 dev]$ rhc app tidy -a phptest
Password: 


**********

RESULT:
phptest cleaned up

5.after tidying

[root@ip-10-60-130-169 openshift]# ls -al 9d4254864330483bb5680b58e3ce1031/php-5.3/tmp
total 12
drwxr-xr-x.  2 9d4254864330483bb5680b58e3ce1031 9d4254864330483bb5680b58e3ce1031 4096 Oct  8 04:19 .
drwxr-xr-x. 10 root                             root                             4096 Oct  8 04:15 ..
-rw-r--r--.  1 root                             root                                5 Oct  8 04:22 text.txt

[root@ip-10-60-130-169 openshift]# cat 9d4254864330483bb5680b58e3ce1031/php-5.3/tmp/text.txt
test


Expected results:

Clean up /tmp directory ,and test file is cleaned up successfully
Comment 1 Hiro Asari 2012-10-08 10:00:29 EDT
The 'tidy' command is making a REST call to tidy up. If /tmp is not getting cleaned up, then it should be fixed there.

I'll assigned this to myself while I track down who should fix the backend.
Comment 2 Hiro Asari 2012-10-08 10:22:29 EDT
I think Dan McPherson knows best about the actual implementation of this part of the broker.
Comment 3 Dan McPherson 2012-10-08 10:36:59 EDT
/var/lib/openshift/9d4254864330483bb5680b58e3ce1031/php-5.3/tmp/ is not one of the official tmp dirs.

cd /tmp  is one.

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