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

More fine-grained statuses for MicroCluster #311

Open
troyanov opened this issue Jan 9, 2025 · 0 comments
Open

More fine-grained statuses for MicroCluster #311

troyanov opened this issue Jan 9, 2025 · 0 comments

Comments

@troyanov
Copy link
Member

troyanov commented Jan 9, 2025

MicroCluster requires all nodes in a cluster to have the same schema/API version and if update will be triggered when one of the nodes is offline, the update will never finish.

I was thinking if we can prevent such update from happening by adding some guard rails (deb preinst or snap pre-refresh) before doing an update? But it seems to be tricky.

  1. member1 checks cluster status before upgrade, if all online, then it proceeds
+---------+-------------+
|  NAME   |   STATUS    |
+---------+-------------+
| member1 | ONLINE      |
+---------+-------------+
| member2 | ONLINE      |
+---------+-------------+
| member3 | ONLINE      |
+---------+-------------+
  1. member1 is updated

cluster status from member1

+---------+---------------+
|  NAME   |   STATUS      |
+---------+---------------+
| member1 | UPGRADING     |
+---------+---------------+
| member2 | NEEDS UPGRADE |
+---------+---------------+
| member3 | NEEDS UPGRADE |
+---------+---------------+

cluster status from member2

+---------+-------------+
|  NAME   |   STATUS    |
+---------+-------------+
| member1 | UNREACHABLE |
+---------+-------------+
| member2 | ONLINE      |
+---------+-------------+
| member3 | ONLINE      |
+---------+-------------+

Any reason the heartbeat endpoint couldn't be made to return a status indicating the member1 is online but waiting for upgrade instead of unreachable?

P.S. I am using this as a current workaround:

var healthCmd = rest.Endpoint{
    Path:              "health",
    AllowedBeforeInit: true,
    Post:              rest.EndpointAction{Handler: cmdPost, AllowUntrusted: true},
}

func cmdPost(state state.State, r *http.Request) response.Response {
  return response.SyncResponse(true, state.Database().Status())
}
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

No branches or pull requests

1 participant