Bill commented on pull request #5131:
URL: https://github.com/apache/geode/pull/5131#issuecomment-631650854


   Bruce's idea yesterday, of eliminating the numeric IP referencing the local 
locator (up) in locator launcher seems like a good one. Jake thought that the 
`--bind-address` arg to `gfsh locator start` should do the trick: if that's a 
name (not an IP number) it should be passed right through as the way to reach 
the local locator.
   
   I spent a little time experimenting with that this morning to try and find 
exactly where that reference to the local locator was being generated, and how 
to fix it. Here's a test I've been experimenting with (added to 
`LocatorLauncherIntegrationTest`):
   
   ```
    @Test
     public void symbolicBindAddressUsedToStartLocator() throws Exception {
       // given: a new builder
       Builder builder = new Builder();
   
       // when: parsing a symbolic (not-an-IP-number) bind address
       builder.parseArguments("start", "--bind-address", "foo");
   
       
assertThat(builder.getBindAddress()).isEqualTo(InetAddress.getByName("foo"));
   
       final LocatorLauncher launcher = builder.build();
       final Properties dsps = launcher.getDistributedSystemProperties();
   
       // fails: properties has only one property: "name"="foo" ugh
       //assertThat(dsps).containsKey(BIND_ADDRESS);
   
       final DistributionConfigImpl distributionConfig = new 
DistributionConfigImpl(dsps);
   
       // then: no numeric bind addy's in start command args
       // fails: no start locator!
       //assertThat(distributionConfig.getStartLocator()).isEqualTo("foo");
   
       // fails: no locators at all
       assertThat(distributionConfig.getLocators()).isEqualTo("foo");
     }
   ```
   
   It'll take some more chasing to find it.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to