Skip to content

Unable to run hoop-gateway with cloud SaaS database #768

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

Open
ilvpozzd opened this issue Apr 6, 2025 · 2 comments
Open

Unable to run hoop-gateway with cloud SaaS database #768

ilvpozzd opened this issue Apr 6, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@ilvpozzd
Copy link

ilvpozzd commented Apr 6, 2025

Good afternoon!

I'm trying to run a Hoop Gateway with a cloud database connection (SaaS Postgres). And because the user role I'm connecting under doesn't provide the ability to create new roles, I get the following error:

Apr 06 02:12:10 srv-hoop hoop-gateway[2209]: 2025-04-06T02:12:10Z        info        pgrest/bootstrap.go:73        loaded migration version=0, is-nil-version=true
Apr 06 02:12:11 srv-hoop hoop-gateway[2209]: 2025-04-06T02:12:11Z        info        pgrest/bootstrap.go:77        processed db migration with success, nochange=false
Apr 06 02:12:11 srv-hoop hoop-gateway[2209]: 2025-04-06T02:12:11Z        info        pgrest/bootstrap.go:246        start bootstrap current state        {"role": "hoop_apiuser", "pguser": "hoop", "version": "1.34.30"}
Apr 06 02:12:11 srv-hoop hoop-gateway[2209]: 2025-04-06T02:12:11Z        info        pgrest/bootstrap.go:303        rolling out app state to schema public with role hoop_apiuser_a, content-length=14514        {"role": "hoop_apiuser", "p>Apr 06 02:12:11 srv-hoop hoop-gateway[2209]: 2025-04-06T02:12:11Z        fatal        gateway/main.go:60        failed applying current app state, reason=pq: permission denied to create role
Apr 06 02:12:11 srv-hoop hoop-gateway[2209]: github.com/hoophq/hoop/gateway.Run
Apr 06 02:12:11 srv-hoop hoop-gateway[2209]:         /home/runner/work/hoop/hoop/gateway/main.go:60
Apr 06 02:12:11 srv-hoop hoop-gateway[2209]: github.com/hoophq/hoop/client/cmd.init.func13
Apr 06 02:12:11 srv-hoop hoop-gateway[2209]:         /home/runner/work/hoop/hoop/client/cmd/start.go:28
Apr 06 02:12:11 srv-hoop hoop-gateway[2209]: github.com/spf13/cobra.(*Command).execute
Apr 06 02:12:11 srv-hoop hoop-gateway[2209]:         /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:920
Apr 06 02:12:11 srv-hoop hoop-gateway[2209]: github.com/spf13/cobra.(*Command).ExecuteC
Apr 06 02:12:11 srv-hoop hoop-gateway[2209]:         /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:1044
Apr 06 02:12:11 srv-hoop hoop-gateway[2209]: github.com/spf13/cobra.(*Command).Execute
Apr 06 02:12:11 srv-hoop hoop-gateway[2209]:         /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968
Apr 06 02:12:11 srv-hoop hoop-gateway[2209]: github.com/hoophq/hoop/client/cmd.Execute
Apr 06 02:12:11 srv-hoop hoop-gateway[2209]:         /home/runner/work/hoop/hoop/client/cmd/root.go:38
Apr 06 02:12:11 srv-hoop hoop-gateway[2209]: main.main
Apr 06 02:12:11 srv-hoop hoop-gateway[2209]:         /home/runner/work/hoop/hoop/client/hoop.go:5
Apr 06 02:12:11 srv-hoop hoop-gateway[2209]: runtime.main
Apr 06 02:12:11 srv-hoop hoop-gateway[2209]:         /opt/hostedtoolcache/go/1.23.7/x64/src/runtime/proc.go:272

When manually creating roles hoop_apiuser_a and hoop_apiuser_b with access to DB I get the following error:

Apr 06 02:17:50 srv-hoop hoop-gateway[2465]: 2025-04-06T02:17:50Z        info        pgrest/bootstrap.go:73        loaded migration version=34, is-nil-version=false
Apr 06 02:17:50 srv-hoop hoop-gateway[2465]: 2025-04-06T02:17:50Z        info        pgrest/bootstrap.go:77        processed db migration with success, nochange=true
Apr 06 02:17:50 srv-hoop hoop-gateway[2465]: 2025-04-06T02:17:50Z        info        pgrest/bootstrap.go:246        start bootstrap current state        {"role": "hoop_apiuser", "pguser": "hoop", "version": "1.34.30"}
Apr 06 02:17:50 srv-hoop hoop-gateway[2465]: 2025-04-06T02:17:50Z        info        pgrest/bootstrap.go:303        rolling out app state to schema public with role hoop_apiuser_a, content-length=14514        {"role": "hoop_apiuser", "p>Apr 06 02:17:50 srv-hoop hoop-gateway[2465]: 2025-04-06T02:17:50Z        fatal        gateway/main.go:60        failed applying current app state, reason=pq: permission denied to drop role
Apr 06 02:17:50 srv-hoop hoop-gateway[2465]: github.com/hoophq/hoop/gateway.Run
Apr 06 02:17:50 srv-hoop hoop-gateway[2465]:         /home/runner/work/hoop/hoop/gateway/main.go:60
Apr 06 02:17:50 srv-hoop hoop-gateway[2465]: github.com/hoophq/hoop/client/cmd.init.func13
Apr 06 02:17:50 srv-hoop hoop-gateway[2465]:         /home/runner/work/hoop/hoop/client/cmd/start.go:28
Apr 06 02:17:50 srv-hoop hoop-gateway[2465]: github.com/spf13/cobra.(*Command).execute
Apr 06 02:17:50 srv-hoop hoop-gateway[2465]:         /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:920
Apr 06 02:17:50 srv-hoop hoop-gateway[2465]: github.com/spf13/cobra.(*Command).ExecuteC
Apr 06 02:17:50 srv-hoop hoop-gateway[2465]:         /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:1044
Apr 06 02:17:50 srv-hoop hoop-gateway[2465]: github.com/spf13/cobra.(*Command).Execute
Apr 06 02:17:50 srv-hoop hoop-gateway[2465]:         /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968
Apr 06 02:17:50 srv-hoop hoop-gateway[2465]: github.com/hoophq/hoop/client/cmd.Execute
Apr 06 02:17:50 srv-hoop hoop-gateway[2465]:         /home/runner/work/hoop/hoop/client/cmd/root.go:38
Apr 06 02:17:50 srv-hoop hoop-gateway[2465]: main.main
Apr 06 02:17:50 srv-hoop hoop-gateway[2465]:         /home/runner/work/hoop/hoop/client/hoop.go:5
Apr 06 02:17:50 srv-hoop hoop-gateway[2465]: runtime.main
Apr 06 02:17:50 srv-hoop hoop-gateway[2465]:         /opt/hostedtoolcache/go/1.23.7/x64/src/runtime/proc.go:272
@sandromello
Copy link
Contributor

Hi @ilvpozzd ,

We don't recommend provisioning the user manually. The user must have at least permission to create roles in the database, otherwise it won't work.

We're already deprecating this process to avoid such issues, however there're still routes that we need to change to remove this.

Which provider exactly are you using it?

@ilvpozzd
Copy link
Author

ilvpozzd commented Apr 7, 2025

Hi @sandromello,

One of the most popular in RU, but not very well known in other regions https://docs.selectel.ru/en/cloud/managed-databases/ (Based on OpenStack)

@sandromello sandromello added the enhancement New feature or request label Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants