jetstack / navigator

Managed Database-as-a-Service (DBaaS) on Kubernetes
Apache License 2.0
271 stars 31 forks source link

Allow configuring number of seed nodes per nodepool #264

Open kragniz opened 6 years ago

kragniz commented 6 years ago

This adds a new field to cassandra nodepools, seeds, which controls the number of seed nodes in that nodepool. This defaults to 1, and cannot be greater than the number of replicas.

Allow configuring number of seed nodes per nodepool
kragniz commented 6 years ago

I'll add an e2e test for this once #258 is merged

kragniz commented 6 years ago

/retest

jetstack-ci-bot commented 6 years ago

@kragniz PR needs rebase

kragniz commented 6 years ago

I've changed Seeds to be an *int64, avoiding the awkward validation/defaulting for a value of 0

wallrj commented 6 years ago

That 1.7 E2E test failure is a bit weird.

W0309 11:02:52.659] ++ kubectl run in-cluster-cmd-855 --namespace=test-cassandra-1520593007-14636 --image=cassandra:latest --restart=Never --rm --stdin=true --attach=true --quiet -- /usr/bin/cqlsh cass-test-cql 9042 --debug '--execute=SELECT * FROM space1.testtable1'
W0309 11:02:59.367] Connection error: ('Unable to connect to any servers', {'10.0.0.127': error(None, "Tried connecting to [('10.0.0.127', 9042)]. Last error: timed out")})
W0309 11:02:59.907] + actual=
W0309 11:02:59.907] + grep --quiet testvalue1
W0309 11:02:59.909] + local exit_code=1
W0309 11:02:59.909] ++ date +%s
W0309 11:02:59.910] + local current_time=1520593379
W0309 11:02:59.910] + local remaining_time=205
W0309 11:02:59.911] + [[ 205 -le 0 ]]
W0309 11:02:59.911] + local sleep_time=10
W0309 11:02:59.911] + [[ 205 -lt 10 ]]
W0309 11:02:59.911] + sleep 10
W0309 11:03:09.912] + stdout_matches testvalue1 cql_connect test-cassandra-1520593007-14636 cass-test-cql 9042 --debug '--execute=SELECT * FROM space1.testtable1'
W0309 11:03:09.912] + local expected=testvalue1
W0309 11:03:09.912] + shift
W0309 11:03:09.912] + local actual
W0309 11:03:09.912] ++ cql_connect test-cassandra-1520593007-14636 cass-test-cql 9042 --debug '--execute=SELECT * FROM space1.testtable1'
W0309 11:03:09.912] ++ local namespace=test-cassandra-1520593007-14636
W0309 11:03:09.912] ++ shift
W0309 11:03:09.913] ++ in_cluster_command test-cassandra-1520593007-14636 cassandra:latest /usr/bin/cqlsh cass-test-cql 9042 --debug '--execute=SELECT * FROM space1.testtable1'
W0309 11:03:09.913] ++ local namespace=test-cassandra-1520593007-14636
W0309 11:03:09.913] ++ shift
W0309 11:03:09.913] ++ local image=cassandra:latest
W0309 11:03:09.913] ++ shift
W0309 11:03:09.913] ++ kubectl run in-cluster-cmd-18383 --namespace=test-cassandra-1520593007-14636 --image=cassandra:latest --restart=Never --rm --stdin=true --attach=true --quiet -- /usr/bin/cqlsh cass-test-cql 9042 --debug '--execute=SELECT * FROM space1.testtable1'
W0309 15:03:13.029] + actual=
W0309 15:03:13.030] + grep --quiet testvalue1
W0309 15:03:13.033] + local exit_code=1
W0309 15:03:13.034] ++ date +%s
W0309 15:03:13.035] + local current_time=1520607793
W0309 15:03:13.035] + local remaining_time=-14209
W0309 15:03:13.035] + [[ -14209 -le 0 ]]
W0309 15:03:13.035] + return 1
W0309 15:03:13.035] + fail_test 'Cassandra data was lost'
W0309 15:03:13.035] + FAILURE_COUNT=1
W0309 15:03:13.035] + echo 'TEST FAILURE: Cassandra data was lost'

The command kubectl run in-cluster-cmd-18383 --namespace=test-cassandra-1520593007-14636 --image=cassandra:latest --restart=Never --rm --stdin=true --attach=true --quiet -- /usr/bin/cqlsh cass-test-cql 9042 --debug '--execute=SELECT * FROM space1.testtable1' appears to have hung from 11:03:09 until 15:03:13

jetstack-ci-bot commented 6 years ago

@kragniz PR needs rebase

jetstack-bot commented 6 years ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: To fully approve this pull request, please assign additional approvers. We suggest the following additional approver: wallrj

Assign the PR to them by writing /assign @wallrj in a comment when ready.

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/jetstack/navigator/blob/master/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
jetstack-bot commented 6 years ago

@kragniz: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
navigator-quick-verify 3541a6d1264c5ca6e23419999700611923a9e3f2 link /test verify
navigator-e2e-v1-8 3541a6d1264c5ca6e23419999700611923a9e3f2 link /test e2e v1.8
navigator-e2e-v1-7 3541a6d1264c5ca6e23419999700611923a9e3f2 link /test e2e v1.7
navigator-e2e-v1-9 3541a6d1264c5ca6e23419999700611923a9e3f2 link /test e2e v1.9

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/devel/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
munnerz commented 6 years ago

Should we merge this now, or wait until the actions stuff has merged and redesign this for that new structure? (targeting 0.2)

jetstack-bot commented 6 years ago

@kragniz: PR needs rebase.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/devel/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.