cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jackson Chung (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-7363) PropertyFileSnitch should allow name address that does not yet exist
Date Mon, 09 Jun 2014 22:49:02 GMT


Jackson Chung commented on CASSANDRA-7363:

bq. This isn't possible, it needs to know the IP. Being able to specify a hostname is a convenience.
maybe this makes more sense if there is completely no known host at all ? iow , only throw
the ConfigurationException if the "reloadedMap" is empty in the end?

In aws, since we are not reserving IP, it is not possible to know the ips ahead of time. We
could use a workaround as starting the instances with those hostname first without starting
C*, but, preferably not.

Another flaw about the logic of needs to know the IP is the current check relies on 
host = InetAddress.getByName(hostString); 
This implies "If a literal IP address is supplied, only the validity of the address format
is checked.", ie: not necessary the existence of that IP. So it doesn't seem to make sense
that a non-existing IP will succeed; but a non-existing hostname will fail

> PropertyFileSnitch should allow name address that does not yet exist
> --------------------------------------------------------------------
>                 Key: CASSANDRA-7363
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Jackson Chung
> when starting a new node with PropertyFileSnitch with contains
an unknown host, it fails with:
> {noformat}
> ERROR [main] 2014-06-06 17:48:38,233 (line 116) Fatal configuration
> org.apache.cassandra.exceptions.ConfigurationException: Error instantiating snitch class
>         at org.apache.cassandra.utils.FBUtilities.construct(
>         at org.apache.cassandra.config.DatabaseDescriptor.createEndpointSnitch(
>         at org.apache.cassandra.config.DatabaseDescriptor.applyConfig(
>         at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(
>         at org.apache.cassandra.service.CassandraDaemon.setup(
>         at org.apache.cassandra.service.CassandraDaemon.activate(
>         at org.apache.cassandra.service.CassandraDaemon.main(
> Caused by: org.apache.cassandra.exceptions.ConfigurationException: Unknown host
>         at org.apache.cassandra.locator.PropertyFileSnitch.reloadConfiguration(
>         at org.apache.cassandra.locator.PropertyFileSnitch.<init>(
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
>         at java.lang.reflect.Constructor.newInstance(
>         at java.lang.Class.newInstance(
>         at org.apache.cassandra.utils.FBUtilities.construct(
>         ... 6 more
> Caused by: unknown
>         at Method)
>         at$2.lookupAllHostAddr(
>         at
>         at
>         at
>         at
>         at
>         at org.apache.cassandra.locator.PropertyFileSnitch.reloadConfiguration(
>         ... 13 more
> {noformat}
> The real impact here is we are trying to launch a number of new nodes (via chef) with
pre-configured hostname (and among other variables). The additional hostname (but not yet
alive) made no impact to the existing nodes, which is good (looks like we only catch the ConfigurationException
in the watcher thread, but not on the initial start); but it causes new node fail to start.
(Pretty sure if we restart an existing one, it will fail too).

This message was sent by Atlassian JIRA

View raw message