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

Cannot switch organisations #2521

Closed
davidjmemmett opened this issue Oct 26, 2023 · 9 comments
Closed

Cannot switch organisations #2521

davidjmemmett opened this issue Oct 26, 2023 · 9 comments

Comments

@davidjmemmett
Copy link

Self-Hosted Version

23.10.1

CPU Architecture

x86_64

Docker Version

24.0.6 build ed223bc

Docker Compose Version

v2.21.0

Steps to Reproduce

  1. At top-left, click Organisation name, then "Switch Organisation"
  2. Note that "Create a new organisation" is the only option.

Expected Result

When clicking "Switch Organisation" I expect a list of organisations that I'm a member of

Actual Result

"Create a new organisation" is the only option.

Event ID

No response

@azaslavsky
Copy link
Contributor

If you create a new org in this manner, does it show up in the list?

@joelpoxtonzoo
Copy link

Hi @azaslavsky

No, it doesn't appear like any newly created organisations are available for selection either.

image (7)

image (8)

@hubertdeng123
Copy link
Member

Looks like you're trying to use a multi-org setup here, which is not the default that self-hosted Sentry comes with. Have you set the SENTRY_SINGLE_ORGANIZATION flag in your config file? How are you trying to enable the multi-org setup?

@davidjmemmett
Copy link
Author

Hi @hubertdeng123, we've been successfully using multiple organisations in Sentry On-Premises for quite a few years now, the switcher appears to have broken somewhere between 23.9.1 (the previous, working version) and 23.10.1. The SENTRY_SINGLE_ORGANIZATION flag was toggled when we first started using Sentry On-Premises.

@hubertdeng123
Copy link
Member

Got it, thanks for the context. I think hybrid cloud had some work with the control silo and region silo deployments so wondering if that affected anything here.

@markstory
Copy link
Member

There were some recent changes to how the organization list is fetched as part of the work we're doing to make sentry multi-region. If you open the network panel in your browser, there should be requests going to the path /api/0/organizations/?member=1 those requests power the org switcher menu.

The change I made was to make those requests use a host name instead of inheriting the host from the document. Could you check if the request to that endpoint is failing, and perhaps what if the host is correct?

@davidjmemmett
Copy link
Author

Hi @markstory, we're seeing similar requests prefixed with an additional path delimiter: //api/0/organizations/?member=1 - when navigating to that page, Sentry responds with a HTTP status code of 200 with a "Page Not Found" body.

Removing the extraneous path delimiter does return a JSON document containing the expected organisations. I have diffed our settings sentry/sentry.conf.py against the example settings, and there don't appear to be any settings missing/unset. Where is the host name set?

@davidjmemmett
Copy link
Author

Upon further investigation, it turns out that we had a trailing path delimiter for the system.url-prefix settings in sentry/config.yml:

$ grep system.url-prefix sentry/config.example.yml 
# system.url-prefix: https://example.sentry.com
$ grep system.url-prefix sentry/config.yml 
system.url-prefix: https://redactedhostname/

After updating the system.url-prefix setting and restarting the containers, the issue appears to be resolved.

It may be worth updating the documentation to state that the system.url-prefix setting should not end with a trailing path delimiter.

Cheers,
David

@markstory
Copy link
Member

After updating the system.url-prefix setting and restarting the containers, the issue appears to be resolved.

Great to hear, I'm glad it was a simple fix.

It may be worth updating the documentation to state that the system.url-prefix setting should not end with a trailing path delimiter.

I can do that 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Archived in project
Development

No branches or pull requests

5 participants