jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-7925) OakUpgrade for RDBMK: user name and password must match
Date Thu, 29 Nov 2018 14:27:00 GMT

    [ https://issues.apache.org/jira/browse/OAK-7925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16703251#comment-16703251
] 

Thomas Mueller commented on OAK-7925:
-------------------------------------

New patch:

{noformat}
Index: src/main/java/org/apache/jackrabbit/oak/upgrade/cli/parser/MigrationOptions.java
===================================================================
--- src/main/java/org/apache/jackrabbit/oak/upgrade/cli/parser/MigrationOptions.java	(revision
1847713)
+++ src/main/java/org/apache/jackrabbit/oak/upgrade/cli/parser/MigrationOptions.java	(working
copy)
@@ -127,7 +127,7 @@
         this.forceCheckpoints = args.hasOption(OptionParserFactory.FORCE_CHECKPOINTS);
 
         this.srcUser = args.getOption(OptionParserFactory.SRC_USER);
-        this.srcPassword = args.getOption(OptionParserFactory.SRC_USER);
+        this.srcPassword = args.getOption(OptionParserFactory.SRC_PASSWORD);
         this.dstUser = args.getOption(OptionParserFactory.DST_USER);
         this.dstPassword = args.getOption(OptionParserFactory.DST_PASSWORD);
 
Index: src/test/java/org/apache/jackrabbit/oak/upgrade/cli/JdbcToSegmentTest.java
===================================================================
--- src/test/java/org/apache/jackrabbit/oak/upgrade/cli/JdbcToSegmentTest.java	(revision 1847713)
+++ src/test/java/org/apache/jackrabbit/oak/upgrade/cli/JdbcToSegmentTest.java	(working copy)
@@ -45,7 +45,7 @@
 
     @Override
     protected String[] getArgs() {
-        return new String[] { "--src-user", "sa", "--src-password", "sa", source.getDescription(),
+        return new String[] { "--src-user", "sa", "--src-password", "pwd", source.getDescription(),
                 destination.getDescription() };
     }
 
Index: src/test/java/org/apache/jackrabbit/oak/upgrade/cli/SegmentToJdbcTest.java
===================================================================
--- src/test/java/org/apache/jackrabbit/oak/upgrade/cli/SegmentToJdbcTest.java	(revision 1847713)
+++ src/test/java/org/apache/jackrabbit/oak/upgrade/cli/SegmentToJdbcTest.java	(working copy)
@@ -46,7 +46,7 @@
 
     @Override
     protected String[] getArgs() {
-        return new String[] { "--disable-mmap", "--user", "sa", "--password", "sa", source.getDescription(),
+        return new String[] { "--disable-mmap", "--user", "sa", "--password", "pwd", source.getDescription(),
                 destination.getDescription() };
     }
 
Index: src/test/java/org/apache/jackrabbit/oak/upgrade/cli/blob/CopyBinariesTest.java
===================================================================
--- src/test/java/org/apache/jackrabbit/oak/upgrade/cli/blob/CopyBinariesTest.java	(revision
1847713)
+++ src/test/java/org/apache/jackrabbit/oak/upgrade/cli/blob/CopyBinariesTest.java	(working
copy)
@@ -70,7 +70,7 @@
                 "Copy references, no blobstores defined, document -> segment",
                 new JdbcNodeStoreContainer(blob),
                 new SegmentNodeStoreContainer(blob),
-                asList("--src-user=sa", "--src-password=sa"),
+                asList("--src-user=sa", "--src-password=pwd"),
                 DatastoreArguments.BlobMigrationCase.COPY_REFERENCES
         });
         params.add(new Object[]{
@@ -77,7 +77,9 @@
                 "Copy references, no blobstores defined, segment -> document",
                 new SegmentNodeStoreContainer(blob),
                 new JdbcNodeStoreContainer(blob),
-                asList("--user=sa", "--password=sa"),
+                // user name and password are not used, as no login is attepted
+                // for unsupported migration use cases
+                asList("--user=unused", "--password=unused"),
                 DatastoreArguments.BlobMigrationCase.UNSUPPORTED
         });
         params.add(new Object[]{
Index: src/test/java/org/apache/jackrabbit/oak/upgrade/cli/container/JdbcNodeStoreContainer.java
===================================================================
--- src/test/java/org/apache/jackrabbit/oak/upgrade/cli/container/JdbcNodeStoreContainer.java
(revision 1847713)
+++ src/test/java/org/apache/jackrabbit/oak/upgrade/cli/container/JdbcNodeStoreContainer.java
(working copy)
@@ -51,7 +51,7 @@
         this.blob = blob;
         this.h2Dir = createTempDir("repo-h2");
         this.jdbcUri = String.format("jdbc:h2:%s", h2Dir.getAbsolutePath() + "/JdbcNodeStoreContainer");
-        this.jdbcFactory = new JdbcFactory(jdbcUri, 2, "sa", "sa", false);
+        this.jdbcFactory = new JdbcFactory(jdbcUri, 2, "sa", "pwd", false);
     }
 
     @Override
{noformat}

> OakUpgrade for RDBMK: user name and password must match
> -------------------------------------------------------
>
>                 Key: OAK-7925
>                 URL: https://issues.apache.org/jira/browse/OAK-7925
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: upgrade
>    Affects Versions: 1.0.39, 1.0.42, 1.2.30, 1.4.23, 1.6.15, 1.8.9
>            Reporter: Thomas Mueller
>            Priority: Major
>
> The oak-upgrade MigrationOptions class has a very ugly bug:
> {noformat}
>         this.srcUser = args.getOption(OptionParserFactory.SRC_USER);
>         this.srcPassword = args.getOption(OptionParserFactory.SRC_USER);
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message