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

Bug Report: examples 101 execution is not idempotent, fails to run on existing setup #13372

Closed
shlomi-noach opened this issue Jun 25, 2023 · 0 comments · Fixed by #13373
Closed

Comments

@shlomi-noach
Copy link
Contributor

Overview of the Issue

When running 101_initial_cluster.sh on a non-empty $VTDATAROOT setup, the example fails to run:

add /vitess/global
add /vitess/zone1
add zone1 CellInfo
Error:  105: Key already exists (/vitess/zone1) [6]
Error:  105: Key already exists (/vitess/global) [6]
E0625 06:47:45.565984 3912600 vtctl.go:168] action failed: VtctldCommand node already exists: /vitess/global/cells/zone1/CellInfo
etcd start done...
Starting vtctld...
vtctld is running!
E0625 06:47:45.738598 3912666 main.go:56] rpc error: code = Unknown desc = node already exists: /vitess/global/keyspaces/commerce/Keyspace
ERROR: Failed to create and configure the commerce keyspace

"Examples" execution should be idempotent, It should be possible to run on top of an existing cluster.

Also, CI needs to validate that.

Reproduction Steps

Run the below:

rm -rf /tmp/examples
cp -R examples /tmp/

cd /tmp/examples/local
cp ../common/env.sh .
./101_initial_cluster.sh || exit 1
echo 'export PS1="\[\033[38;5;11m\]\u@\h\[$(tput sgr0)\]: \[$(tput sgr0)\]\[\033[38;5;12m\]\w\[$(tput sgr0)\]\\$ \[$(tput sgr0)\]"' >> ./env.sh
/bin/bash --rcfile ./env.sh -i # go interactive
#
# at this point 101 is running., Exit via ^D
#
pkill -9 -e -f '(vtdataroot|VTDATAROOT)' # kill Vitess processes

Then, run the above again.

Binary Version

v17

Operating System and Environment details

-

Log Fragments

No response

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

Successfully merging a pull request may close this issue.

1 participant