You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by "Casey Stella (JIRA)" <ji...@apache.org> on 2017/08/24 19:40:00 UTC

[jira] [Created] (METRON-1131) The Stellar REPL rejects valid hostnames for zookeeper in its CLI options

Casey Stella created METRON-1131:
------------------------------------

             Summary: The Stellar REPL rejects valid hostnames for zookeeper in its CLI options
                 Key: METRON-1131
                 URL: https://issues.apache.org/jira/browse/METRON-1131
             Project: Metron
          Issue Type: Bug
            Reporter: Casey Stella


Currently, the REPL defines a valid zookeeper hostname is one which matches a regex rather than defining it as a hostname which is reachable by the machine.  Combining this with the fact that the regex to validate the hostname is denying valid hostnames:
{code}
 @Test
  public void testBadPattern() throws Exception
  {
    Pattern validHostNamePattern = Pattern.compile(
            "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\\\-]*[a-zA-Z0-9])\\\\.)"
                    + "*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\\\-]*[A-Za-z0-9])$");
    Assert.assertFalse(validHostNamePattern.matcher("gzcf0.fold.blarg.com").matches());
    Assert.assertTrue(validHostNamePattern.matcher("host1").matches());
  }
{code}




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)