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

remaining nodes publish xxxDeleted message for peer removed or lost #393

Merged
merged 11 commits into from
Aug 16, 2023

Conversation

cgalibern
Copy link
Contributor

No description provided.

…ll be done on detection like other nodes

We don't need to drop peer node from daemon data in a synchronous call.
event msgbus.ClusterConfigUpdated with removed nodes cluster can be used instead on all remaining cluster nodes

TODO: drop peer on msgbus.ClusterConfigUpdated
…<peer>}

TODO: update dropPeer to publish related deletion, and drop peer from instance and node data holders
…r.node.<node>.monitor

NodeMonitorDeleted is published when nmon ends (during daemon stop)
Deleting all d.clusterData.Cluster.Node[<node>] can panic daemondata commitPendingOps:
    panic: nil d.clusterData.Cluster.Node[d.localNode].Status.Gen

    goroutine 281 [running]:
    github.com/opensvc/om3/daemon/daemondata.(*data).commitPendingOps(0xc004ed4280)
        daemon/daemondata/apply_commit.go:36 +0x3ad
    github.com/opensvc/om3/daemon/daemondata.(*data).run(0xc004ed4280, {0x2aa49b0, 0xc004ddb400}, 0xc004daff80, 0xc004ed8000, 0x2625a00)
        daemon/daemondata/data.go:262 +0xbd7
    github.com/opensvc/om3/daemon/daemondata.Start.func1()
        daemon/daemondata/main.go:49 +0x70
    created by github.com/opensvc/om3/daemon/daemondata.Start
        daemon/daemondata/main.go:47 +0x19b
    FAIL    github.com/opensvc/om3/daemon/daemon    3.386s

Now ApplyMessage(NodeMonitorDeleted{Node:<node>}) will simply update cluster.node.<node>.monitor with state shutting:
 => cluster.node.<node>.monitor = {State: node.MonitorStateShutting, StateUpdatedAt: time.Now()}}
daemondata has the responsibility of peer data updates (has what is done during apply patch and apply full)

On drop peer, daemondata must create and publish deleted object from dropped peer
…tance and node data holder

databus.DropPeerNode(peer) does this

This commits also update log when drop peer is called
…of msgbus.ForgetPeer

Since daemondata drop peer publish msgbus.InstanceXXXDeleted messages we can use them to clean
the local imon cache.
…of msgbus.ForgetPeer

Since daemondata drop peer publish msgbus.InstanceXXXDeleted messages we can use them to clean
the local omon cache.
…node

reduce log level to info for messages:
 - forget removed peer %s => new live peers ...
 - forget <removed|lost> peer %s, we still have nodes quorum
@cgalibern cgalibern merged commit e0f343d into opensvc:main Aug 16, 2023
1 check passed
@cgalibern cgalibern deleted the move-cluster-node-gen-rebase branch August 16, 2023 07:55
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.

None yet

1 participant