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

Fix grafana 404 in some scenarios #665

Merged
merged 1 commit into from
Mar 1, 2024
Merged

Conversation

w13915984028
Copy link
Member

@w13915984028 w13915984028 commented Feb 27, 2024

Problem:

Grafana is not working in some scenairos.

Solution:

Add processing for all scenarios

This PR also includes all commits in #664

UI issue: harvester/harvester#5217, UI fix: harvester/dashboard#958

NOTE
In Harvester v1.2.1 & v1.2.2, there are some slightly differences in grafana, the PR and workaround will be made separately. DO NOT merge automatically. PR for v1.2.2: #666

Related Issue:
harvester/harvester#5221

Test plan:

Grafana can be both embedded in Harvester UI and opened in new UI window, and here are the full scenarios in Harvester.

A local Harvester cluster:

(1) dashboard -> embedded grafana & link -> grafana new window; login
(2) vm -> vm metrics, embedded grafana
(3) addon-> grafana link-> grafana new window (not working, UI fix harvester/dashboard#958); login`(not working, this fix: ~./dashboard/harvester/c/(c-m-.+)/harvesterhci.io.addon/cattle-monitoring-system/. '"appSubUrl":"/k8s/clusters/$1/api/v1/namespaces/cattle-monitoring-system/services/http:rancher-monitoring-grafana:80/proxy"';
)

Rancher managed cluster:

(1) Rancher- > virtualization management -> click cluster to open, then repeat all above operation
(2) Rancher- > virtualization management -> click "Manage" to open a new manage window, then explore, the grafana is embedded. (not working: this fix, ~./dashboard/c/(c-m-.+)/. '"appSubUrl":"/k8s/clusters/$1/api/v1/namespaces/cattle-monitoring-system/services/http:rancher-monitoring-grafana:80/proxy"';
)

Note:
In Rancher, virtualization management, the result is different when click the link of cluster name and click Manage.
Need to validate all them.
image

@w13915984028
Copy link
Member Author

@Mergifyio backport v1.3

Copy link

mergify bot commented Feb 27, 2024

backport v1.3

❌ No backport have been created

  • Backport to branch v1.3 failed

GitHub error: Branch not found

@w13915984028
Copy link
Member Author

w13915984028 commented Feb 27, 2024

NOTE
In Harvester v1.2.1 & v1.2.2, there are some slightly differences in grafana, the PR and workaround will be made separately. DO NOT backport merge this PR automatically. Another PR will be added for v1.2.2.

PR for v1.2.2 #666

@bk201
Copy link
Member

bk201 commented Feb 29, 2024

This PR also includes all commits in #664

Do we need to co-author https://github.com/stalin4suse in the commit?

@w13915984028
Copy link
Member Author

This PR also includes all commits in #664

Do we need to co-author https://github.com/stalin4suse in the commit?

Sure, at the time of commiting, did not have his info, now is updated.

Signed-off-by: Jian Wang <w13915984028@gmail.com>

Co-authored-by: Stalin Stepin <stalin.stepin@suse.com>
Copy link
Contributor

@ibrokethecloud ibrokethecloud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. thanks.
I was able to re-produce the cluster by exploring the harvester 1.3.0-rc3 cluster via cluster explorer view in Rancher. The Cluster dashboard is unable to render the grafana content.

To test, patched the grafana-nginx-proxy-config configmap in the cattle-monitoring-system namespace, and delete the existing grafana pod.

Once grafana is running, cluster explorer is able to render the grafana dashboards.

@bk201 bk201 merged commit d6c8309 into harvester:master Mar 1, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants