scylladb / scylla-ami

7 stars 29 forks source link

Cluster Name ignored on setup #35

Closed CarlGill closed 6 years ago

CarlGill commented 6 years ago

It appears the clustername that is passed through to ds2_configure.py, ends up being commented out and unused.

Example scylla config after ds2_configure.py has completed:

# The name of the cluster. This is mainly used to prevent machines in
# one logical cluster from joining another.
# It is recommended to change the default value when creating a new cluster.
# You can NOT modify this value for an existing cluster
#cluster_name: example_cluster_name
From the system table:
 cluster_name | host_id
--------------+--------------------------------------
              | 257865d9-446f-42d3-a362-3a714a29806d

The worrisome part is there is no failure, and my cluster ends up starting up fine, and had I not been fighting with getting the ec2snitch to work ( Restrictive Security groups ), I would not have been looking.

I believe we just need to ensure that # is replaced. I will put up a PR shortly. But I wanted to make sure there was no sane reason to leave it alone.

https://github.com/scylladb/scylla-ami/blob/025644dfd8f50c7d424c9985476c69695d0e6f89/ds2_configure.py#L432-L434

glommer commented 6 years ago

@tzach @amnonh @slivne I just hit this as well with a user. Can we look into merging the pull request that Carl added here ?

slivne commented 6 years ago

I tried to check where this is originating from - we had this working in the past.


commit 06089474c92111c3f4e56eb5180ac780d80f2b93 Author: Daniel Fiala daniel@scylladb.com Date: Tue Aug 8 13:33:22 2017 +0200

Print warning if user uses default cluster_name

* Configuration for cluster_name is commented-out in config file.
* Default value set to empty string and if not rewritten by user then
  warning is printed and value is reset to "ScyllaDB Cluster".

Fixes #2648.

Message-Id: <20170808113322.9313-1-daniel@scylladb.com>

diff --git a/conf/scylla.yaml b/conf/scylla.yaml index 807bddcca..a885f3c72 100644 --- a/conf/scylla.yaml +++ b/conf/scylla.yaml @@ -14,7 +14,7 @@

one logical cluster from joining another.

It is recommended to change the default value when creating a new

cluster.

You can NOT modify this value for an existing cluster

-cluster_name: 'Test Cluster' +#cluster_name: 'ScyllaDB Cluster'


The issue is that scylla.yaml was changed and it now comments out cluster_name.

(the other change in this patch with a different default cluster name was reverted already).

This is the source of all evil.

So indeed we need to change the ds2_configure in the ami and fix it to set the value and uncomment the cluster name part

On Thu, Jun 28, 2018 at 1:44 AM, Glauber Costa notifications@github.com wrote:

@tzach https://github.com/tzach @amnonh https://github.com/amnonh @slivne https://github.com/slivne I just hit this as well with a user. Can we look into merging the pull request that Carl added here ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/scylladb/scylla-ami/issues/35#issuecomment-400853057, or mute the thread https://github.com/notifications/unsubscribe-auth/ADThCLu07iZtz0JwLsz4iXTYt3PFK9kZks5uBArmgaJpZM4UNOke .

tzach commented 6 years ago

More users are hitting this

tzach commented 6 years ago

@syuu1228 can you please take a look?

tzach commented 6 years ago

Nice. Will this be a part of the next 2.3 AMI?