Skip to content

mgr/dashboard: provide hub Cluster HA for multi-cluster setup#56847

Merged
aaSharma14 merged 1 commit intoceph:mainfrom
rhcs-dashboard:provide-hub-HA-multi-cluster
Apr 16, 2024
Merged

mgr/dashboard: provide hub Cluster HA for multi-cluster setup#56847
aaSharma14 merged 1 commit intoceph:mainfrom
rhcs-dashboard:provide-hub-HA-multi-cluster

Conversation

@aaSharma14
Copy link
Copy Markdown
Contributor

@aaSharma14 aaSharma14 commented Apr 12, 2024

When adding a cluster to the multi-cluster setup, set all the mgr IP's as cross_origin_url in the connected cluster to provide HA for the hub cluster in case of a mgr failover

Fixes: https://tracker.ceph.com/issues/65499

Screencast.from.2024-04-12.11-16-07.webm

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@aaSharma14 aaSharma14 requested a review from a team as a code owner April 12, 2024 05:58
@aaSharma14 aaSharma14 requested review from avanthakkar and ivoalmeida and removed request for a team April 12, 2024 05:58
inventory_hosts = [host.to_json() for host in orch.hosts.list()]
for host in inventory_hosts:
host_addr = host['addr']
host_url = hub_url.replace(hostname, host_addr)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can this create issue if the user is operating over a hostname and the cors has ip addresses set. Can you check that usecase?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks @cloudbehl for pointing out, To cover this scenario we need to set the cross origin url with IP url and the fqdn as well. updated the PR accordingly.

@aaSharma14 aaSharma14 force-pushed the provide-hub-HA-multi-cluster branch 2 times, most recently from 06e2d2b to 209ff25 Compare April 15, 2024 05:59
@aaSharma14
Copy link
Copy Markdown
Contributor Author

jenkins test api

@aaSharma14
Copy link
Copy Markdown
Contributor Author

jenkins test dashboard

@aaSharma14
Copy link
Copy Markdown
Contributor Author

jenkins test dashboard cephadm

Comment on lines +114 to +120
orch = OrchClient.instance()
inventory_hosts = [host.to_json() for host in orch.hosts.list()]

for host in inventory_hosts:
host_addr = host['addr']
host_ip_url = hub_url.replace(hostname, host_addr)
host_hostname_url = hub_url.replace(hostname, host['hostname'])
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this will break ceph-dev like environments right? where no orchestrator is available?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@nizamial09 , works fine with ceph-dev as well

@aaSharma14 aaSharma14 force-pushed the provide-hub-HA-multi-cluster branch from 209ff25 to 44f04c0 Compare April 16, 2024 06:25
@cloudbehl
Copy link
Copy Markdown
Contributor

jenkins test make check

@aaSharma14 aaSharma14 merged commit 626cee2 into ceph:main Apr 16, 2024
@aaSharma14 aaSharma14 deleted the provide-hub-HA-multi-cluster branch April 16, 2024 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants