[jira] [Commented] (IGNITE-11437) Start grid in remote JVM in test framework fails if TDE is enabled

2019-03-01 Thread Aleksey Plekhanov (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-11437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16781533#comment-16781533
 ] 

Aleksey Plekhanov commented on IGNITE-11437:


Fields {{aesWithPadding}} and {{aesWithoutPadding}} are static now. It's safe 
because all usages of derived from this fields ciphers are stateless inside one 
thread.


Reproducer is passed without error (locally). No new tests were added to this 
patch, but new tests with multi JVM and TDE will be added by ticket 
IGNITE-11336 (currently in progress).

 

[~NIzhikov] could you please review the patch?

> Start grid in remote JVM in test framework fails if TDE is enabled
> --
>
> Key: IGNITE-11437
> URL: https://issues.apache.org/jira/browse/IGNITE-11437
> Project: Ignite
>  Issue Type: Bug
>Reporter: Aleksey Plekhanov
>Assignee: Aleksey Plekhanov
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> When we start grid in remote JVM with enabled TDE, it fails with exception:
> {noformat}
> java.lang.NullPointerException
> at 
> java.lang.ThreadLocal$SuppliedThreadLocal.initialValue(ThreadLocal.java:284)
> at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:180)
> at java.lang.ThreadLocal.get(ThreadLocal.java:170)
> at 
> org.apache.ignite.spi.encryption.keystore.KeystoreEncryptionSpi.encrypt(KeystoreEncryptionSpi.java:211){noformat}
> Test framework uses {{XStream}} to pass Ignite configuration to remote JVM. 
> {{XStream}} cannot serialize lamda expression and replace lambda with 
> {{null}}. So, after deserialization {{ThreadLocal}} object has {{supplier == 
> null}}.
> Reproducer:
> {code:java}
> public class TdeTest extends GridCommonAbstractTest {
> /** {@inheritDoc} */
> @Override protected IgniteConfiguration getConfiguration(String gridName) 
> throws Exception {
> IgniteConfiguration cfg = super.getConfiguration(gridName);
> cfg.setDataStorageConfiguration(new DataStorageConfiguration()
> .setDefaultDataRegionConfiguration(new 
> DataRegionConfiguration().setPersistenceEnabled(true)));
> KeystoreEncryptionSpi encSpi = new KeystoreEncryptionSpi();
> encSpi.setKeyStorePath(AbstractEncryptionTest.KEYSTORE_PATH);
> 
> encSpi.setKeyStorePassword(AbstractEncryptionTest.KEYSTORE_PASSWORD.toCharArray());
> cfg.setEncryptionSpi(encSpi);
> cfg.setCacheConfiguration(new 
> CacheConfiguration().setName("cache").setEncryptionEnabled(true));
> return cfg;
> }
> /** {@inheritDoc} */
> @Override protected boolean isMultiJvm() {
> return true;
> }
> @Test
> public void testTdeMultiJvm() throws Exception {
> startGrids(2);
> }
> }
> {code}



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


[jira] [Commented] (IGNITE-11437) Start grid in remote JVM in test framework fails if TDE is enabled

2019-03-01 Thread Ignite TC Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-11437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16781518#comment-16781518
 ] 

Ignite TC Bot commented on IGNITE-11437:


{panel:title=-- Run :: All: No blockers 
found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel}
[TeamCity *-- Run :: All* 
Results|https://ci.ignite.apache.org/viewLog.html?buildId=3202625buildTypeId=IgniteTests24Java8_RunAll]

> Start grid in remote JVM in test framework fails if TDE is enabled
> --
>
> Key: IGNITE-11437
> URL: https://issues.apache.org/jira/browse/IGNITE-11437
> Project: Ignite
>  Issue Type: Bug
>Reporter: Aleksey Plekhanov
>Assignee: Aleksey Plekhanov
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> When we start grid in remote JVM with enabled TDE, it fails with exception:
> {noformat}
> java.lang.NullPointerException
> at 
> java.lang.ThreadLocal$SuppliedThreadLocal.initialValue(ThreadLocal.java:284)
> at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:180)
> at java.lang.ThreadLocal.get(ThreadLocal.java:170)
> at 
> org.apache.ignite.spi.encryption.keystore.KeystoreEncryptionSpi.encrypt(KeystoreEncryptionSpi.java:211){noformat}
> Test framework uses {{XStream}} to pass Ignite configuration to remote JVM. 
> {{XStream}} cannot serialize lamda expression and replace lambda with 
> {{null}}. So, after deserialization {{ThreadLocal}} object has {{supplier == 
> null}}.
> Reproducer:
> {code:java}
> public class TdeTest extends GridCommonAbstractTest {
> /** {@inheritDoc} */
> @Override protected IgniteConfiguration getConfiguration(String gridName) 
> throws Exception {
> IgniteConfiguration cfg = super.getConfiguration(gridName);
> cfg.setDataStorageConfiguration(new DataStorageConfiguration()
> .setDefaultDataRegionConfiguration(new 
> DataRegionConfiguration().setPersistenceEnabled(true)));
> KeystoreEncryptionSpi encSpi = new KeystoreEncryptionSpi();
> encSpi.setKeyStorePath(AbstractEncryptionTest.KEYSTORE_PATH);
> 
> encSpi.setKeyStorePassword(AbstractEncryptionTest.KEYSTORE_PASSWORD.toCharArray());
> cfg.setEncryptionSpi(encSpi);
> cfg.setCacheConfiguration(new 
> CacheConfiguration().setName("cache").setEncryptionEnabled(true));
> return cfg;
> }
> /** {@inheritDoc} */
> @Override protected boolean isMultiJvm() {
> return true;
> }
> @Test
> public void testTdeMultiJvm() throws Exception {
> startGrids(2);
> }
> }
> {code}



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