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

add tidb permit host option #779

Merged
merged 17 commits into from
Sep 9, 2019
Merged

add tidb permit host option #779

merged 17 commits into from
Sep 9, 2019

Conversation

shonge
Copy link
Member

@shonge shonge commented Aug 16, 2019

What problem does this PR solve?

#733

What is changed and how does it work?

Add an option permitHost in values, and add the logic in _initialize_tidb_users.py.tpl

Check List

Tests

  • Manual test

Code changes

  • Has Helm charts change

Side effects

None

Related changes

  • Need to update the documentation

Does this PR introduce a user-facing change?:

Users can designate permitting host in chart values.tidb.permitHost

@sre-bot
Copy link
Contributor

sre-bot commented Aug 16, 2019

Hi contributor, thanks for your PR.

This patch needs to be approved by someone of admins. They should reply with "/ok-to-test" to accept this PR for running test automatically.

1 similar comment
@sre-bot
Copy link
Contributor

sre-bot commented Aug 16, 2019

Hi contributor, thanks for your PR.

This patch needs to be approved by someone of admins. They should reply with "/ok-to-test" to accept this PR for running test automatically.

@CLAassistant
Copy link

CLAassistant commented Aug 16, 2019

CLA assistant check
All committers have signed the CLA.

shonge and others added 5 commits August 16, 2019 16:12
Co-Authored-By: Tennix <tennix@users.noreply.github.com>
move permitHost after passwordSecretName
…y.tpl

Co-Authored-By: Tennix <tennix@users.noreply.github.com>
@weekface
Copy link
Contributor

/run-e2e-in-kind

fix default permit host quote
tennix
tennix previously approved these changes Aug 20, 2019
Copy link
Member

@tennix tennix left a comment

Choose a reason for hiding this comment

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

LGTM

@weekface
Copy link
Contributor

/run-e2e-in-kind

weekface
weekface previously approved these changes Aug 22, 2019
@weekface
Copy link
Contributor

@shonge The e2e failed, can't set password to the tidb cluster

$ kubectl logs -f -n e2e cluster4-tidb-initializer-kfwbt
Traceback (most recent call last):
  File "<string>", line 18, in <module>
  File "/usr/local/lib/python3.6/site-packages/MySQLdb/cursors.py", line 206, in execute
    res = self._query(query)
  File "/usr/local/lib/python3.6/site-packages/MySQLdb/cursors.py", line 312, in _query
    db.query(q)
  File "/usr/local/lib/python3.6/site-packages/MySQLdb/connections.py", line 224, in query
    _mysql.connection.query(self, query)
MySQLdb._exceptions.OperationalError: (1133, "Can't find any matching row in the user table")

https://internal.pingcap.net/idc-jenkins/blue/organizations/jenkins/operator_ghpr_e2e_test_kind/detail/operator_ghpr_e2e_test_kind/135/pipeline

PTAL

@weekface
Copy link
Contributor

/run-e2e-in-kind

@shonge shonge dismissed stale reviews from weekface and tennix via 383ec54 August 26, 2019 08:30
@shonge
Copy link
Member Author

shonge commented Aug 27, 2019

@weekface @tennix PTAL

weekface
weekface previously approved these changes Aug 27, 2019
Copy link
Contributor

@weekface weekface left a comment

Choose a reason for hiding this comment

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

LGTM, thank you.

@weekface
Copy link
Contributor

/run-e2e-in-kind

@weekface
Copy link
Contributor

/run-e2e-in-kind

1 similar comment
@weekface
Copy link
Contributor

/run-e2e-in-kind

@weekface weekface requested a review from cofyc August 28, 2019 11:07
tennix
tennix previously approved these changes Sep 3, 2019
Copy link
Member

@tennix tennix left a comment

Choose a reason for hiding this comment

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

LGTM

@shonge shonge dismissed stale reviews from tennix and weekface via fc415df September 4, 2019 07:36
@weekface
Copy link
Contributor

weekface commented Sep 4, 2019

/run-e2e-in-kind

@weekface
Copy link
Contributor

weekface commented Sep 4, 2019

/run-e2e-in-kind

@cofyc
Copy link
Contributor

cofyc commented Sep 9, 2019

/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

@cofyc
Copy link
Contributor

cofyc commented Sep 9, 2019

@weekface @tennix The reviews were dismissed in last commit. PTAL again.

Copy link
Member

@tennix tennix left a comment

Choose a reason for hiding this comment

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

LGTM

@cofyc cofyc merged commit cfd5f63 into pingcap:master Sep 9, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Sep 9, 2019

cherry pick to release-1.0 in PR #893

@cofyc
Copy link
Contributor

cofyc commented Sep 9, 2019

Thanks for your contribution!

cofyc pushed a commit that referenced this pull request Sep 9, 2019
* add grant permit host option.

* fixed "Can't find any matching in user table"

* add permitHost trigger to job.yaml

* Update charts/tidb-cluster/values.yaml

Co-Authored-By: Tennix <tennix@users.noreply.github.com>

* Update tidb-initializer-job.yaml

move permitHost after passwordSecretName

* Update charts/tidb-cluster/templates/scripts/_initialize_tidb_users.py.tpl

Co-Authored-By: Tennix <tennix@users.noreply.github.com>

* Update _initialize_tidb_users.py.tpl

* Update _initialize_tidb_users.py.tpl

fix default permit host quote

* fix access denied for root when executing initsql.

* delete two duplicate commit lines
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.

6 participants