Bug 985934 - Jcr2vfs migration tool does not fail with error when mandatory parameters are missing
Jcr2vfs migration tool does not fail with error when mandatory parameters are...
Status: CLOSED CURRENTRELEASE
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity medium
: ER6
: 6.0.0
Assigned To: Mark Proctor
Petr Široký
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-18 10:23 EDT by Petr Široký
Modified: 2014-08-06 16:19 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-06 16:19:26 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 Petr Široký 2013-07-18 10:23:50 EDT
Description of problem:
Jcr2vfs migration tool does not properly fail if some mandatory parameter is missing. For example when the "inputJcr" directory does not exist, it just displays message about it, but does not fail. Similar thing happens when the "outputVfs" dir already exists, so the migrator can't proceed.

I think if the migration could not be completed the migrator should display error message and return non-zero exit code. Also "Migration ended" should not be displayed in that case.

Example output: 
psiroky@psiroky-laptop bin]$ sh runMigration.sh 
2013-07-18 16:16:26,219 [main] WARN  WELD-001440 Scope type @javax.enterprise.context.SessionScoped() used on injection point [field] @SessionScoped @Inject private org.uberfire.backend.server.UserServicesImpl.identity
The outputVfsRepository (/home/psiroky/work/releases/brms-6.0.0-DR6/migration-tool/bin/outputVfs) already exists.
Migration ended
[psiroky@psiroky-laptop bin]$ sh runMigration.sh 
2013-07-18 16:16:51,578 [main] WARN  WELD-001440 Scope type @javax.enterprise.context.SessionScoped() used on injection point [field] @Inject @SessionScoped private org.uberfire.backend.server.UserServicesImpl.identity
The inputJcrRepository (/home/psiroky/work/releases/brms-6.0.0-DR6/migration-tool/bin/inputJcr) does not exist.
Migration ended


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


Steps to Reproduce:
1. Get the migration tool and just run bin/runMigration.sh


Actual results:
Message about "missing inputJcr" dir is displayed, just before "Migration ended". Also exit code 0 is returned.


Expected results:
The tool should clearly state that the inputJcr dir does not exists and it can't proceed with migration, returning non-zero return code.
Comment 8 Petr Široký 2014-01-15 06:48:52 EST
Verified fixed in 6.0.0-ER7.

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