Uploaded image for project: 'Metron (Retired)'
  1. Metron (Retired)
  2. METRON-1131

The Stellar REPL rejects valid hostnames for zookeeper in its CLI options

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • Major
    • Resolution: Done
    • None
    • 0.4.1
    • None

    Description

      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:

       @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());
        }
      

      Attachments

        Issue Links

          Activity

            People

              cestella Casey Stella
              cestella Casey Stella
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: