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

Unable to register more than one namespace #7106

Open
synack-mdevy opened this issue Jan 17, 2025 · 0 comments
Open

Unable to register more than one namespace #7106

synack-mdevy opened this issue Jan 17, 2025 · 0 comments

Comments

@synack-mdevy
Copy link

Expected Behavior

When running temporal with an external PostgreSQL backend, and the namespace doesn't currently exist

tctl n l
Name: temporal-system
Id: 32049b68-7872-4094-8e63-d0dd59896a83
Description: Temporal internal system namespace
OwnerEmail: [email protected]
NamespaceData: map[string]string(nil)
State: Registered
Retention: 168h0m0s
ActiveClusterName: active
Clusters: active
HistoryArchivalState: Disabled
IsGlobalNamespace: false
FailoverVersion: 0
FailoverHistory: []
VisibilityArchivalState: Disabled
Bad binaries to reset:
+-----------------+----------+------------+--------+
| BINARY CHECKSUM | OPERATOR | START TIME | REASON |
+-----------------+----------+------------+--------+
+-----------------+----------+------------+--------+
Name: default
Id: db457208-1382-4c4c-989e-da784c6e329a
Description:
OwnerEmail:
NamespaceData: map[string]string(nil)
State: Registered
Retention: 1h0m0s
ActiveClusterName: active
Clusters: active
HistoryArchivalState: Enabled
IsGlobalNamespace: false
FailoverVersion: 0
FailoverHistory: []
HistoryArchivalURI: <REDACTED>
VisibilityArchivalState: Enabled
VisibilityArchivalURI: <REDACTED>
Bad binaries to reset:
+-----------------+----------+------------+--------+
| BINARY CHECKSUM | OPERATOR | START TIME | REASON |
+-----------------+----------+------------+--------+
+-----------------+----------+------------+--------+

When running

tctl n re test

It should create the namespace test

Actual Behavior

Instead I get this error

Error: Register namespace operation failed.
Error Details: rpc error: code = AlreadyExists desc = Namespace already exists.
('export TEMPORAL_CLI_SHOW_STACKS=1' to see stack traces)

Re-running with TEMPORAL_CLI_SHOW_STACKS=1

 tctl n re test
Error: Register namespace operation failed.
Error Details: rpc error: code = AlreadyExists desc = Namespace already exists.
Stack trace:
goroutine 1 [running]:
runtime/debug.Stack()
        /opt/hostedtoolcache/go/1.22.3/x64/src/runtime/debug/stack.go:24 +0x5e
runtime/debug.PrintStack()
        /opt/hostedtoolcache/go/1.22.3/x64/src/runtime/debug/stack.go:16 +0x13
github.com/temporalio/tctl/cli_curr.printError({0x19b0e08, 0x24}, {0x1edb400, 0xc000718098})
        /home/runner/work/docker-builds/docker-builds/tctl/cli_curr/util.go:393 +0x218
github.com/temporalio/tctl/cli_curr.ErrorAndExit({0x19b0e08?, 0x1eeeb50?}, {0x1edb400?, 0xc000718098?})
        /home/runner/work/docker-builds/docker-builds/tctl/cli_curr/util.go:404 +0x25
github.com/temporalio/tctl/cli_curr.(*namespaceCLIImpl).RegisterNamespace(0xc0007be618, 0xc00016e420)
        /home/runner/work/docker-builds/docker-builds/tctl/cli_curr/namespaceCommands.go:140 +0x92b
github.com/temporalio/tctl/cli_curr.newNamespaceCommands.func1(0xc00016e420)
        /home/runner/work/docker-builds/docker-builds/tctl/cli_curr/namespace.go:77 +0x4c
github.com/urfave/cli.HandleAction({0x16ba300?, 0x1a54110?}, 0x8?)
        /home/runner/go/pkg/mod/github.com/urfave/[email protected]/app.go:526 +0x75
github.com/urfave/cli.Command.Run({{0x197527e, 0x8}, {0x0, 0x0}, {0xc000618ce0, 0x1, 0x1}, {0x199aa05, 0x1b}, {0x0, ...}, ...}, ...)
        /home/runner/go/pkg/mod/github.com/urfave/[email protected]/command.go:173 +0x685
github.com/urfave/cli.(*App).RunAsSubcommand(0xc0005028c0, 0xc00016e000)
        /home/runner/go/pkg/mod/github.com/urfave/[email protected]/app.go:405 +0xdfb
github.com/urfave/cli.Command.startApp({{0x1977538, 0x9}, {0x0, 0x0}, {0xc000619230, 0x1, 0x1}, {0x1998873, 0x1a}, {0x0, ...}, ...}, ...)
        /home/runner/go/pkg/mod/github.com/urfave/[email protected]/command.go:378 +0xb1e
github.com/urfave/cli.Command.Run({{0x1977538, 0x9}, {0x0, 0x0}, {0xc000619230, 0x1, 0x1}, {0x1998873, 0x1a}, {0x0, ...}, ...}, ...)
        /home/runner/go/pkg/mod/github.com/urfave/[email protected]/command.go:102 +0x7c5
github.com/urfave/cli.(*App).Run(0xc000502540, {0xc00003e0c0, 0x4, 0x4})
        /home/runner/go/pkg/mod/github.com/urfave/[email protected]/app.go:277 +0xb3b
main.main()
        /home/runner/work/docker-builds/docker-builds/tctl/cmd/tctl/main.go:47 +0xa5

Steps to Reproduce the Problem

  1. Run temporal with an external PostgreSQL database
  2. Use tctl to create 1 namespace default (succeeds)
  3. Use tctl to create a 2nd namespace test (fails)

Specifications

  • Version: 1.25.1
  • Platform: Self-hosted (K8s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant