Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tidb loadbalancer output is empty after terraform apply #1045

Merged
merged 4 commits into from
Oct 25, 2019

Conversation

DanielZhangQD
Copy link
Contributor

@DanielZhangQD DanielZhangQD commented Oct 23, 2019

What problem does this PR solve?

fix #1043

What is changed and how does it work?

Wait for LB ready before computing output data

Check List

Tests

  • Manual test (add detailed scripts or steps below)
    • AWS test

Outputs:

bastion_ip = [
"54.184.41.97",
]
default-cluster_monitor-dns = aeb62d185f56d11e9aeb70ae67ff0b7e-1988083749.us-west-2.elb.amazonaws.com
default-cluster_tidb-dns = aeb748195f56d11e9aeb70ae67ff0b7e-25bbd4125f96646b.elb.us-west-2.amazonaws.com
eks_endpoint = https://3A07AB19D3A05BD1BF7B170A276FE317.yl4.us-west-2.eks.amazonaws.com
eks_version = 1.12
kubeconfig_filename = credentials/kubeconfig_dan-eks
region = us-west-2
- GKE test
Outputs:

how_to_connect_to_default_cluster_tidb_from_bastion = mysql -h 172.31.252.29 -P 4000 -u root
how_to_set_reclaim_policy_of_pv_for_default_tidb_cluster_to_delete = kubectl --kubeconfig /tmp/tidb-operator/deploy/gcp/credentials/kubeconfig_gke-dan get pvc -n tidb-cluster -o jsonpath='{.items[*].spec.volumeName}'|fmt -1 | xargs -I {} kubectl --kubeconfig /tmp/tidb-operator/deploy/gcp/credentials/kubeconfig_gke-dan patch pv {} -p '{"spec":{"persistentVolumeReclaimPolicy":"Delete"}}'
how_to_ssh_to_bastion = gcloud --project smooth-tendril-207212 compute ssh gke-dan-tidb-bastion --zone us-west1-a
kubeconfig_file = /tmp/tidb-operator/deploy/gcp/credentials/kubeconfig_gke-dan
monitor_ilb_ip = 34.83.244.11
monitor_port = 3000
region = us-west1
tidb_version = v3.0.4
- ACK test
Outputs:

bastion_ip = 47.93.233.109
cluster_id = c0b39f3a352e445c98ac1ddddd5ad1643
kubeconfig_file = /tmp/tidb-operator/deploy/aliyun/credentials/kubeconfig
monitor_endpoint = 39.105.218.153:3000
region = cn-beijing
ssh_key_file = /tmp/tidb-operator/deploy/aliyun/credentials/my-cluster-key.pem
tidb_endpoint = 192.168.0.216:4000
tidb_version = v3.0.4
vpc_id = vpc-2zeluubd9sc8upj5qkrjb

Code changes

  • Has terraform scripts change

Side effects

Related changes

  • Need to cherry-pick to the release branch

Does this PR introduce a user-facing change?:

Fix the issue that TiDB Loadbalancer is empty in terraform output.

aylei
aylei previously approved these changes Oct 23, 2019
Copy link
Contributor

@aylei aylei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aylei
Copy link
Contributor

aylei commented Oct 23, 2019

/run-e2e-in-kind

@DanielZhangQD
Copy link
Contributor Author

/run-e2e-in-kind

@DanielZhangQD
Copy link
Contributor Author

@aylei @cofyc Update to wait for monitoring LB too, PTAL again.

@DanielZhangQD
Copy link
Contributor Author

/run-e2e-in-kind

@cofyc
Copy link
Contributor

cofyc commented Oct 25, 2019

can you paste the output of your manual tests?

@@ -145,6 +145,7 @@ module "tidb-cluster" {
kubeconfig_filename = var.kubeconfig_path
base_values = file("${path.module}/values/default.yaml")
wait_on_resource = [google_container_node_pool.tidb_pool, var.tidb_operator_id]
service_ingress_key = "ip"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tidb-cluster-release is used in gcp, aliyun and aws. why this variable is only set for gcp?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already set in aliyun and aws.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, I see. other platforms use its default value.

@DanielZhangQD
Copy link
Contributor Author

can you paste the output of your manual tests?

Done

@DanielZhangQD
Copy link
Contributor Author

/run-e2e-in-kind

Copy link
Contributor

@cofyc cofyc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DanielZhangQD
Copy link
Contributor Author

/run-e2e-in-kind

Copy link
Contributor

@aylei aylei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DanielZhangQD DanielZhangQD merged commit 4a4c982 into pingcap:master Oct 25, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Oct 25, 2019

cherry pick to release-1.0 failed

DanielZhangQD added a commit that referenced this pull request Oct 25, 2019
#1051)

* tidb lb is empty after terraform apply

* update scheduler image for ali and lb key for gcp

* wait for monitoring lb
DanielZhangQD added a commit that referenced this pull request Oct 25, 2019
#1052)

* tidb lb is empty after terraform apply

* update scheduler image for ali and lb key for gcp

* wait for monitoring lb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tidb loadbalancer output is empty after terraform apply
4 participants