Bug 1272358

Summary: When creating a big bundle via UI the wizard shows errors if user clicks Next button multiple times
Product: [JBoss] JBoss Operations Network Reporter: Filip Brychta <fbrychta>
Component: Content, UIAssignee: Josejulio Martínez <jmartine>
Status: CLOSED ERRATA QA Contact: Filip Brychta <fbrychta>
Severity: medium Docs Contact:
Priority: medium    
Version: JON 3.3.4CC: jmartine, miburman, spinder
Target Milestone: DR01Keywords: Triaged
Target Release: JON 3.3.6   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 15:31:02 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:
Attachments:
Description Flags
wizard screenshot
none
server.log none

Description Filip Brychta 2015-10-16 08:23:02 UTC
Created attachment 1083534 [details]
wizard screenshot

Description of problem:
This issue happens only for big bundles when it takes long time to finish the creation and user clicks the next button more then once.


Version-Release number of selected component (if applicable):
Version :	
3.3.0.GA Update 04
Build Number :	
e9ed05b:aa79ebd

How reproducible:
4/4

Steps to Reproduce:
1.  Install, configure and start JBoss ON 3.3 system.
2.  Build a bundle archive using following script.

    ~~~
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=30M 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 a new user role:

    *   *Permissions:*
        *   *Name:* `Test01 - Bundle Deployer Role`
        *   *Bundle Permissions:*
            *   *Create Bundle In Group:* _Yes_
            *   *Delete Bundle From Group:* _Yes_
            *   *Deploy Bundle To Group:* _Yes_
    *   *Resource Groups:*
        *   *Assigned Resource Groups:* _DynaGroup - Groups by platform ( Linux )_
    *   *Bundle Groups:*
        *   *Assigned Resource Groups:* _Test01 - Bundle Deployer Role_

5.  Create a new user:

    *   *Username:* `TestUser01`
    *   *Password:* `TestUser01`
    *   *First Name:* `Test`
    *   *Last Name:* `User01`
    *   *Email Address:* `testuser01`
    *   *Assigned Roles:* _Test01 - Bundle Deployer Role_
    
6.  Sign-in as _TestUser01_.
7.  Create new bundle using _/tmp/large-bundle.zip_
  a) wait until the bundle is uploaded
  b) assign it to the _Test01 - Bundle Group_ bundle group and click next button multiple times

Actual results:
The bundle is actually created but the wizard shows errors and is not finished successfully.
See attached screenshot.

Expected results:
First click on next button should show some progress bar or notify a user that creation is in progress so he is not tempted to click the button again.
No errors should be visible.


Additional info:
server.log and screenshot is attached

Comment 1 Filip Brychta 2015-10-16 08:23:32 UTC
Created attachment 1083535 [details]
server.log

Comment 2 Michael Burman 2016-05-12 11:53:52 UTC
Remember to get that new Messages.property translated also.

Merged to master:
commit 735d2d8eecb4a258fb723cd4a305755cbff4bd59
Merge: 1bef382 17986c4
Author: Michael Burman <yak>
Date:   Thu May 12 14:50:24 2016 +0300

    Merge pull request #196 from josejulio/BZ-1272358
    
    Bug 1272358 - When creating a big bundle via UI the wizard shows erro…


commit 17986c41f7b179e3fe8a18cfbae9ff80b95dbd2a
Author: jmartine <jmartine>
Date:   Wed Dec 16 10:39:37 2015 -0600

    Bug 1272358 - When creating a big bundle via UI the wizard shows errors if user clicks Next button multiple times
    
    Added a flag to know if the token processing(User doesn't have permission to add withou Bundle Group, so a token processing is needed) is and show a message, similar to the one when shows when click next while uploading a large bundle.

Comment 4 Simeon Pinder 2016-06-18 01:11:53 UTC
Moving to ON_QA as available to test with JON 3.3.6 DR01 brew build:
https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=499890

Comment 7 errata-xmlrpc 2016-07-27 15:31:02 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://rhn.redhat.com/errata/RHSA-2016-1519.html