Bug 1247545 - Large bundle deployment results in OOM in agent log if deploy.xml has attribute replace="true"
Large bundle deployment results in OOM in agent log if deploy.xml has attribu...
Status: CLOSED WONTFIX
Product: JBoss Operations Network
Classification: JBoss
Component: Provisioning (Show other bugs)
JON 3.3.3
Unspecified Unspecified
unspecified Severity medium
: ---
: JON 3.3.6
Assigned To: Lukas Krejci
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-28 05:45 EDT by Sunil Kondkar
Modified: 2016-05-26 10:50 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-26 10:50:19 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)
stacktrace_AgentLog (5.86 KB, text/plain)
2015-07-28 05:46 EDT, Sunil Kondkar
no flags Details
BundleDeploy_AuditMessage (96.04 KB, image/png)
2015-07-28 05:47 EDT, Sunil Kondkar
no flags Details

  None (edit)
Description Sunil Kondkar 2015-07-28 05:45:57 EDT
Description of problem:

When tried to deploy a large size bundle to a platform, the agent log displays "Failed to deploy bundle [Large File Test Bundle] version [1.0]: java.lang.OutOfMemoryError: Java heap space".

Please refer the attached stack trace and screenshot.

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

3.3.0.GA Update 03
Build Number :	
edc324f:119e8f4

How reproducible:

Always

Steps to Reproduce:

1.  Install and start JBoss ON 3.3.3CR01.
2.  Build a bundle archive that is at least 80 MB in size.

    ~~~
tmpDir="`mktemp -d`"

cat >"${tmpDir}"/deploy.xml <<EOF
<?xml version="1.0"?>
<project name="largeFile"
         default="main"
         xmlns:rhq="antlib:org.rhq.bundle">
  <target name="main" />

  <rhq:bundle name="Large File Test Bundle"
              version="1.0"
              description="A sample bundle consisting of a single large file">
    <rhq:deployment-unit name="files"
                         compliance="filesAndDirectories">
EOF

mkdir "${tmpDir}"/files
for file in {001..001}; do
    echo "This is File #${file}." > "${tmpDir}/files/file-${file}.txt"
    dd if=/dev/urandom of="${tmpDir}/files/file-${file}.bin" bs=8M count=10
    echo '      <rhq:file name="files/file-'"${file}"'.txt" destinationFile="files/file-'"${file}"'.txt" replace="true" />' >> "${tmpDir}"/deploy.xml
    echo '      <rhq:file name="files/file-'"${file}"'.bin" destinationFile="files/file-'"${file}"'.bin" replace="true" />' >> "${tmpDir}"/deploy.xml
done

cat >>"${tmpDir}"/deploy.xml <<EOF
    </rhq:deployment-unit>
  </rhq:bundle>
</project>
EOF
(cd "${tmpDir}" && zip -r /tmp/large-bundle.zip .)
rm -rf "${tmpDir}"
ls -al /tmp/large-bundle.zip

    ~~~

3.  Create a bundle group:

    *   *Name:* `Test01 - Bundle Group`

4. Create new bundle using _/tmp/large-bundle.zip_ and assign it to the _Test01 - Bundle Group_ bundle group.

5. After bundle is created, select the bundle from Bundles menu in UI and click Deploy.
6. Enter Destination name, Select Resource Group as 'DynaGroup - Groups By Platform (Linux).
7. Enter Destination Directory (Ex: /tmp/Test) and click Next.
8. Select Deployment version and click Next->Next->Next and Finish.
9. Observe the agent log for errors.

Actual results:

Large bundle deployment results in OOM error in agent log if deploy.xml has attribute replace="true"

Expected results:

No errors

Additional info:

1) The bundle gets deployed successfully without error if I set : RHQ_AGENT_JAVA_OPTS="-Xms1024m -Xmx1024m -XX:PermSize=256M -XX:MaxPermSize=256M -Djava.net.preferIPv4Stack=true" in 'agentRoot/rhq-agent/bin/rhq-agent-env.sh'

2) If the attribute 'replace in deploy.xml is changed to false (replace="false"). The deployment is successful without errors.
Comment 1 Sunil Kondkar 2015-07-28 05:46:39 EDT
Created attachment 1056982 [details]
stacktrace_AgentLog
Comment 2 Sunil Kondkar 2015-07-28 05:47:21 EDT
Created attachment 1056983 [details]
BundleDeploy_AuditMessage

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