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

Oncall 1.91: grafana-oncall-app can' connect to oncall #4850

Closed
bpedersen2 opened this issue Aug 19, 2024 · 5 comments
Closed

Oncall 1.91: grafana-oncall-app can' connect to oncall #4850

bpedersen2 opened this issue Aug 19, 2024 · 5 comments
Labels
bug Something isn't working more info needed

Comments

@bpedersen2
Copy link

What went wrong?

What happened:

  • Upgraded oncall and oncall-app in an external grafana instance to v1.9.1
  • The grafana app could not connect to the backend

error logs in the grafana pod:

2024-08-19 12:20:00.142	
logger=context userId=3 orgId=1 uname=<redacted> t=2024-08-19T10:20:00.142364973Z level=error msg="Request Completed" method=GET path=/api/plugins/grafana-oncall-app/resources/plugin/status status=500 remote_addr=10.42.0.198 time_ms=219 duration=219.648784ms size=144 referer=https://<redacted>/plugins/grafana-oncall-app handler=/api/plugins/:pluginId/resources/* status_source=downstream
2024-08-19 12:20:00.142	
logger=plugin.grafana-oncall-app t=2024-08-19T10:20:00.14224241Z level=error msg="Error validating oncall plugin settings" error="error setting up request headers: failed to parse JSON response: json: cannot unmarshal object into Go value of type []plugin.OnCallPermission "
2024-08-19 12:20:00.142	
logger=plugin.grafana-oncall-app t=2024-08-19T10:20:00.142227995Z level=error msg="Error getting user" error="failed to parse JSON response: json: cannot unmarshal object into Go value of type []plugin.OnCallPermission"
2024-08-19 12:20:00.141	
logger=context userId=11 orgId=1 uname=sa-1-autogen-1-oncall t=2024-08-19T10:20:00.141170208Z level=info msg="Request Completed" method=GET path=/api/access-control/users/3/permissions status=404 remote_addr=10.42.0.198 time_ms=17 duration=17.536455ms size=24 referer= handler=notfound status_source=server
2024-08-19 12:20:00.077	
logger=plugin.grafana-oncall-app t=2024-08-19T10:20:00.077178626Z level=info msg=GetUser user="map[Email:<redacted> Login:<redacted> Name:<redacted> Role:Admin]"

no error logs in oncall pods

What did you expect to happen:

  • successful backend connection

How do we reproduce it?

  1. Upgrade oncall/ oncall app in a setup with external grafana
    • maybe relevant: feature toogle accessControlOnCall is set to true
  2. Try to access oncall
  3. See the oncall is not configured correctly page

Grafana OnCall Version

v1.9.1

Product Area

Other

Grafana OnCall Platform?

Kubernetes

User's Browser?

No response

Anything else to add?

No response

@bpedersen2 bpedersen2 added the bug Something isn't working label Aug 19, 2024
@bpedersen2
Copy link
Author

grafana version used: Grafana v11.3.0-192108 (65a7d8f023) (docker image: grafana/grafana:main)

@mderynck
Copy link
Contributor

  • Are you running Grafana Enterprise with a valid license? accessControlOnCall should only be used in that case
  • Also externalServiceAccounts feature toggle should be enabled

@bpedersen2
Copy link
Author

Yes, that was the solution. it is a oss installation. Until 1.8.13 it was running without problems with these settings. Maybe a hint in the releasenotes would be nice.

github-merge-queue bot pushed a commit that referenced this issue Aug 23, 2024
# What this PR does
consider the grafanaSubUrl in case Grafana is served from subpath

## Which issue(s) this PR closes

Related to 
grafana/oncall-private#2656
#4850

<!--
*Note*: If you want the issue to be auto-closed once the PR is merged,
change "Related to" to "Closes" in the line above.
If you have more than one GitHub issue that this PR closes, be sure to
preface
each issue link with a [closing
keyword](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests#linking-a-pull-request-to-an-issue).
This ensures that the issue(s) are auto-closed once the PR has been
merged.
-->

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] Added the relevant release notes label (see labels prefixed w/
`release:`). These labels dictate how your PR will
    show up in the autogenerated release notes.
@senpro-ingwersenk
Copy link

Ran into the same issue. Thanks for pointing out accessControlOnCall - that was the culprit on our end as well.

@Tchoupinax
Copy link

As precision, do not use accessControlOnCall feature flag if you are using Grafana OSS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working more info needed
Projects
None yet
Development

No branches or pull requests

4 participants