Ignite default consistentId generation is broken on IPv6 nodes using RFC8981 security mode.
- Dominant language
- Java
- Stars
- 5.1k
- Forks
- 1.9k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 46
Description
In correctly configured networks, hosts may implement [RFC8981](https://datatracker.ietf.org/doc/html/rfc8981) which creates a rotating list of temporary IPv6 addresses used for outbound IPv6 traffic. This prevents leaking internal host addresses to untrusted external services as IPv6 does not rely on NAT. In the referenced code, Ignite will create a default `consistentId` which is too long for use as a pathname for local persistence, for example.
https://github.com/apache/ignite/blob/6c388682ef37cf28bd81860366db39c716546009/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/internal/TcpDiscoveryNode.java#L191
https://github.com/apache/ignite/blob/6c388682ef37cf28bd81860366db39c716546009/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java#L1190
https://github.com/apache/ignite/blob/da8a6bb4756c998aa99494d395752be96d841ec8/modules/zookeeper/src/main/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpi.java#L279
The following error log (IPv6 addresses obfuscated to protect my network) shows this behavior. This may not be the only symptom.
```
SYNC modes due to message queues growth on sender and receiver sides.
Apr 13, 2023 5:53:10 PM org.apache.ignite.logger.java.JavaLogger error
SEVERE: Exception during start processors, node will be stopped and close connections
class org.apache.ignite.IgniteCheckedException: Failed to start processor: GridProcessorAdapter []
at org.apache.ignite.internal.IgniteKernal.startProcessor(IgniteKernal.java:1787)
at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:1066)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1757)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1679)
at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1121)
at org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:1015)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:921)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:840)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:710)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:679)
at org.apache.ignite.Ignition.start(Ignition.java:353)
at training.ServerStartup.main(ServerStartup.java:23)
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to create page store work directory: /Volumes/workspaces/jeremy.mcmillan/ignite-essentials-developer-training.git/ignite/work/db/0_0_0_0_0_0_0_1_lo0_10_0_1_96_127_0_0_1_2100_f00f_f00f_f00f_f00f_f00f_f00f_f00f_en0_2100_f00f_f00f_f00f_f00f_f00f_f00f_f00f_en0_2100_f00f_f00f_f00f_f00f_f00f_f00f_f00f_en0_2100_f00f_f00f_f00f_f00f_f00f_f00f_f00f_en0_2100_f00f_f00f_f00f_f00f_f00f_f00f_f00f_en0_47500
at org.apache.ignite.internal.util.IgniteUtils.ensureDirectory(IgniteUtils.java:9971)
at org.apache.ignite.internal.processors.cache.GridLocalConfigManager.(GridLocalConfigManager.java:127)
at org.apache.ignite.internal.processors.cache.GridCacheProcessor.start(GridCacheProcessor.java:618)
at org.apache.ignite.internal.IgniteKernal.startProcessor(IgniteKernal.java:1784)
... 11 more
```
See Also:
* #10598
Contributor guide
Research direction
Start by reading the linked consistentId code in TcpDiscoveryNode.java, TcpDiscoverySpi.java, and ZookeeperDiscoverySpi.java, then inspect the reported page-store path failure. Reproduce the behavior with rotating IPv6 addresses and determine how the default identifier is formed. Done means RFC8981-style addresses no longer produce an unusable local-persistence pathname.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases, distributed-systems, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100