[ 
https://issues.apache.org/jira/browse/CASSANDRA-7839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16201520#comment-16201520
 ] 

Jason Brown commented on CASSANDRA-7839:
----------------------------------------

I've rebased [~ramsperger]'s patch on trunk and running tests here:

||7839||
|[branch|https://github.com/jasobrown/cassandra/tree/7839]|
|[dtest|https://builds.apache.org/view/A-D/view/Cassandra/job/Cassandra-devbranch-dtest/366/]|
|[utests|https://circleci.com/gh/jasobrown/cassandra/tree/7839]|

I cleaned up some constants from the original patch, but added a NEWS entry and 
the cross-schema naming check, as per [~pauloricardomg].

bq. should we add a bootstrap check (similar to checkForEndpointCollision) 
failing to boostrap a node if it's using the new scheme and nodes are detected 
in gossip using the legacy scheme

FWIW, this would prevent an operator from adding a new region in the standard 
style to an existing cluster (they would always need to set {{legacy}}). I am 
totally ok with that and it's not worth the extra effort to allow it. I'm just 
noting this point here for posterity.

Further, we should check at all node startups, not just bootstrap, because if 
the value in the {{conf/cassandra-rackdc.properties}} somehow gets flipped to 
the other value, it's gonna mess up the cluster metadata big time as peers will 
think the node is in a different DC/rack now and incorrectly adjust their view 
of the cluster.

I want to add some unit tests for 
{{Ec2Snitch@#hasConflictingDatacenterOrRack}}, and I'd like some feedback on 
the implementation, as well. [~pauloricardomg], if you don't mind taking a 
look, since you've done so in the past for this ticket, I'd appreciate it.

> Support standard EC2 naming conventions in Ec2Snitch
> ----------------------------------------------------
>
>                 Key: CASSANDRA-7839
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7839
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Gregory Ramsperger
>            Assignee: Gregory Ramsperger
>              Labels: docs-impacting
>         Attachments: CASSANDRA-7839-aws-naming-conventions.patch
>
>
> The EC2 snitches use datacenter and rack naming conventions inconsistent with 
> those presented in Amazon EC2 APIs as region and availability zone. A 
> discussion of this is found in CASSANDRA-4026. This has not been changed for 
> valid backwards compatibility reasons. Using SnitchProperties, it is possible 
> to switch between the legacy naming and the full, AWS-style naming. 
> Proposal:
> * introduce a property (ec2_naming_scheme) to switch naming schemes.
> * default to current/legacy naming scheme
> * add support for a new scheme ("standard") which is consistent AWS 
> conventions
> ** data centers will be the region name, including the number
> ** racks will be the availability zone name, including the region name
> Examples:
> * * legacy* : datacenter is the part of the availability zone name preceding 
> the last "\-" when the zone ends in \-1 and includes the number if not \-1. 
> Rack is the portion of the availability zone name following  the last "\-".
> ** us-west-1a => dc: us-west, rack: 1a
> ** us-west-2b => dc: us-west-2, rack: 2b; 
> * *standard* : datacenter is the part of the availability zone name preceding 
> zone letter. rack is the entire availability zone name.
> ** us-west-1a => dc: us-west-1, rack: us-west-1a
> ** us-west-2b => dc: us-west-2, rack: us-west-2b; 



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

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to