Bug 837484 - Scalable app's snapshot tarball doesn't contain all gears' files under OPENSHIFT_DATA_DIR
Scalable app's snapshot tarball doesn't contain all gears' files under OPENSH...
Status: CLOSED DEFERRED
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Rob Millner
libra bugs
: FutureFeature, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-04 01:14 EDT by jizhao
Modified: 2015-05-14 18:56 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-09 18:44:08 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 jizhao 2012-07-04 01:14:29 EDT
Description of problem:
Create a scalable app, write some code to create files under OPENSHIFT_DATA_DIR. Save snapshot of the app and check the tarball. The file isn't in the tarball.
After creating a scalable app, two dirs are created, one of which contains haproxy. While saving snapshot, only the dir which contains haproxy are snapshoted, but the file we created though our app is in the OPENSHIFT_DATA_DIR of the other dir.

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

How reproducible:
Always

Steps to Reproduce:
1.Create a scalable app(take jbossas-7 for example)
$ rhc app create -a app1 -t jbossas-7 -s -d
2.Write some code to create file under OPENSHIFT_DATA_DIR. Git push all the changes.
==> data.jsp <==
<%@ page contentType="text/html" language="java" import="java.sql.*" %>
<%@ page import="javax.naming.*" %>
<%@ page import="java.io.*"  %>
<%@ page import="java.util.*"  %>

<%
Map map = System.getenv();
String cmd = "dd if=/dev/urandom of=" + map.get("OPENSHIFT_DATA_DIR") + "bigfile bs=1M count=3";
out.println("Command: " + cmd);
Process p = Runtime.getRuntime().exec(cmd);
BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line = null;
while((line = input.readLine()) != null) {
    out.println(line);
}
out.println("<br />");
p.waitFor();
if(p.exitValue() == 0) {
    out.println("The big file has been created under OPENSHIFT_DATA_DIR");
}
else {
    out.println("Failed to create bigfile under OPENSHIFT_DATA_DIR");
}
%>


3.Visit <app_url>/data.jsp to create file under OPENSHIFT_DATA_DIR.

4.Save snapshot of the app. Extract it and check <gear_uuid>/app-root/data/.

5.Use Openshift shell to login the app and check app-root/data/.
  
Actual results:
4. There's no file under <gear_uuid>/app-root/data/.
5. There's no file under app-root/data/.

Expected results:
There file we created should be contained in the snapshot tarball.

Additional info:
Comment 1 Rob Millner 2012-07-05 14:27:45 EDT
This may be due to the backup not gathering files from secondary gears in the application.
Comment 2 Rob Millner 2012-07-09 18:44:08 EDT
User story US2526 opened to track backups/restore of scalable applications.  Deferring this request based on the user story.

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