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
packages: Upgrade cockroachdb to 2.0.7 #4251
Conversation
This repo has @mesosphere-mergebot integration. You can perform the following commands by submitting a comment. Submit a comment with content "@mesosphere-mergebot help" to view more detailed help text and examples. Be sure the have a look at the mergebot documentation, too.
|
@mesosphere-mergebot bump-ee |
Enterprise Bump PR: mesosphere/dcos-enterprise/pull/4362 |
@mesosphere-mergebot bump-ee |
Enterprise Bump mesosphere/dcos-enterprise/pull/4362 updated. |
@mesosphere-mergebot bump-ee |
Enterprise Bump mesosphere/dcos-enterprise/pull/4362 updated. |
@mesosphere-mergebot bump-ee |
Enterprise Bump mesosphere/dcos-enterprise/pull/4362 updated. |
@mesosphere-mergebot bump-ee |
Enterprise Bump mesosphere/dcos-enterprise/pull/4362 updated. |
@mesosphere-mergebot bump-ee |
Your pull request's branch is not based on the most recent version of |
@mesosphere-mergebot bump-ee |
Your pull request's branch is not based on the most recent version of |
@mesosphere-mergebot bump-ee |
Your pull request's branch is not based on the most recent version of |
@mesosphere-mergebot bump-ee |
Your pull request's branch is not based on the most recent version of |
@mesosphere-mergebot bump-ee |
Your pull request's branch is not based on the most recent version of |
@mesosphere-mergebot bump-ee |
Your pull request's branch is not based on the most recent version of |
@mesosphere-mergebot bump-ee |
Your pull request's branch is not based on the most recent version of |
@mesosphere-mergebot bump-ee |
Your pull request's branch is not based on the most recent version of |
@mesosphere-mergebot bump-ee |
Your pull request's branch is not based on the most recent version of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM, left some comments.
CHANGES.md
Outdated
@@ -57,6 +57,8 @@ This change also aligned the authentication architectures between DC/OS Enterpri | |||
|
|||
* Allow setting environment variables for `docker-gc` in `/var/lib/dcos/docker-gc.env` | |||
|
|||
* CockroachDB has been updated to version 2.0.7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be folded into the existing changelog entry around oss-ing cockroachdb work / left out entirely?
"git": "git@github.com:cockroachdb/cockroach.git", | ||
"ref": "486632793834b3fded5cf8bc87dddf0041f2297e", | ||
"ref_origin": "v1.1.9" | ||
"kind": "url_extract", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC the release tarballs are prepared for more convenient building from source and are not simple tars of the git repo. I suspect this makes using releases more convenient. Martin?
subprocess.run(command, input=config_text.encode('ascii')) | ||
log.info('Command returned') | ||
|
||
zones = ['.default', '.liveness', '.meta'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know whether this was relevant for v1.1.x? We might need to backport to Enterprise DC/OS1.10, 1.11 and 1.12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, otherwise dcos-checks-poststart
would fail on EE clusters.
def _rename_database(oldname: str, newname: str) -> None: | ||
def _replace_database(source: str, existing: str, backup: str) -> None: | ||
transaction = '; '.join([ | ||
'BEGIN', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doubt whther renaming a database is something that can be rolled back in a transaction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested following the case and it seems that capturing DB renames in a transaction works:
./cockroach sql --insecure -e "begin; SAVEPOINT cockroach_restart; ALTER DATABASE iam RENAME TO iam_o
ld; ALTER DATABASE iam_new RENAME TO iam_old; RELEASE SAVEPOINT cockroach_restart; commit;"
Error: pq: the new database name "iam_old" already exists
Failed running "sql"
and ended up with
show databases;
+----------+
| Database |
+----------+
| iam |
| iam_new |
| system |
+----------+
(3 rows)
If a transaction wasn't working I'd expect to end up with iam_old
and iam_new
databases.
@@ -137,25 +147,15 @@ def recover_database(my_internal_ip: str, backup_file_path: str, db_suffix: str) | |||
_drop_database(newdbname) | |||
raise | |||
|
|||
# 3. Then rename the active `iam` database to `iam_old`. | |||
# 3. In a single transaction replace original `iam` database with `iam_new` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto. I suspect this does not work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my reply above.
afc87ea
to
352c79e
Compare
@mesosphere-mergebot bump-ee |
1 similar comment
@mesosphere-mergebot bump-ee |
Enterprise Bump mesosphere/dcos-enterprise/pull/4362 updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@mesosphere-mergebot merge-it |
Enterprise Bump PR mesosphere/dcos-enterprise/pull/4362, and the current PR #4251 are now merged. |
High-level description
This PR:
cockroachdb
to vesion2.0.7
bouncer
to the latest version that is compatible withcockroachdb
version2.0.7
iam-database-restore
script to do the DB rename in a single transactionCorresponding DC/OS tickets (obligatory)
These DC/OS JIRA ticket(s) must be updated (ideally closed) in the moment this PR lands:
Checklist for all PRs
CHANGES.md
or explain why this is not a user-facing change:Checklist for component/package updates:
If you are changing components or packages in DC/OS (e.g. you are bumping the sha or ref of anything underneath
packages
), then in addition to the above please also include:PLEASE FILL IN THE TEMPLATE ABOVE / DO NOT REMOVE ANY SECTIONS ABOVE THIS LINE