Skip to content

DAOS-19803 control: Redirect pool requests away from replicas with no engine - #19402

Open
mjmac wants to merge 2 commits into
masterfrom
mjmac/DAOS-19803
Open

mjmac wants to merge 2 commits into
masterfrom
mjmac/DAOS-19803

Conversation

@mjmac

@mjmac mjmac commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Adds a new system.ErrReplicaNoEngine type that a MS replica may return to
a RPC caller to indicate that the caller should retry with one of its peers.

Also perform a bit of tech debt cleanup on the MS replica address
helpers in the system package. There were multiple implementations of
the same logic for getting the set of peer addresses.

Features: RbldWidelyStriped
Signed-off-by: Michael MacDonald mjmac@vectorsolutionsgroup.com

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Ticket title is 'rebuild/widely_striped.py:RbldWidelyStriped.test_rebuild_widely_striped - self-heal-property lookup caused a misleading rebuild timeout'
Status is 'In Progress'
Labels: '2.8.1rc4,weekly_test'
https://daosio.atlassian.net/browse/DAOS-19803

@daosbuild3

Copy link
Copy Markdown
Collaborator

… engine

Adds a new system.ErrReplicaNoEngine type that a MS replica may return to
a RPC caller to indicate that the caller should retry with one of its peers.

Also perform a bit of tech debt cleanup on the MS replica address
helpers in the system package. There were multiple implementations of
the same logic for getting the set of peer addresses.

Features: RbldWidelyStriped
Signed-off-by: Michael MacDonald <mjmac@vectorsolutionsgroup.com>
@mjmac
mjmac marked this pull request as ready for review November 1, 2026 19:11
@mjmac
mjmac requested review from a team as code owners November 1, 2026 19:11
@mjmac
mjmac requested review from kjacque, knard38 and tanabarr November 1, 2026 19:12
kjacque
kjacque previously approved these changes Nov 3, 2026
@kjacque

kjacque commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Since this is rummaging down in the MS, I'd suggest running against "Features: control" as well as the affected test.

tanabarr
tanabarr previously approved these changes Nov 3, 2026

@knard38 knard38 left a comment

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.

Nothing blocking, just minor remarks

Comment thread src/control/server/mgmt_pool_test.go Outdated
Comment on lines +2556 to +2561
"engine stopped": {
mgmtSvc: noEngine,
req: &mgmtpb.PoolQueryReq{
Id: mockUUID,
},
expErr: &system.ErrReplicaNoEngine{},

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.

Could be nice to also check that the list of replicas to use is properly built with mocking the raft sysdb at line 2513. From my understanding, the default one only have one replica and thus the test will pass even if the list is dropped.

noEngine := newTestMgmtSvc(t, log)
setupTestEngine(t, noEngine.harness.instances[0].(*EngineInstance), 0, true)
// Three replicas (the local one plus two peers), so that the redirect list is not empty.
noEnginePeers := []string{"192.0.2.2:10001", "192.0.2.3:10001"}
noEngine.sysdb = raft.MockDatabaseWithCfg(t, log, &raft.DatabaseConfig{
        SystemName: build.DefaultSystemName,
        Replicas: []*net.TCPAddr{
                common.LocalhostCtrlAddr(),
                {IP: net.ParseIP("192.0.2.2"), Port: build.DefaultControlPort},
                {IP: net.ParseIP("192.0.2.3"), Port: build.DefaultControlPort},
        },
})
Suggested change
"engine stopped": {
mgmtSvc: noEngine,
req: &mgmtpb.PoolQueryReq{
Id: mockUUID,
},
expErr: &system.ErrReplicaNoEngine{},
"engine stopped": {
mgmtSvc: noEngine,
req: &mgmtpb.PoolQueryReq{
Id: mockUUID,
},
expErr: &system.ErrReplicaNoEngine{Replicas: noEnginePeers},

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.

Agreed. Updated.

Comment thread src/control/system/errors.go Resolved
Comment on lines +111 to +114
func (err *ErrReplicaNoEngine) Error() string {
return fmt.Sprintf("no running engine on %s replica (try one of %s)",
build.ManagementServiceName, strings.Join(err.Replicas, ","))
}

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.

NIT

Suggested change
func (err *ErrReplicaNoEngine) Error() string {
return fmt.Sprintf("no running engine on %s replica (try one of %s)",
build.ManagementServiceName, strings.Join(err.Replicas, ","))
}
func (err *ErrReplicaNoEngine) Error() string {
msg := fmt.Sprintf("no running engine on %s replica", build.ManagementServiceName)
if len(err.Replicas) == 0 {
return msg
}
return fmt.Sprintf("%s (try one of %s)", msg, strings.Join(err.Replicas, ","))
}

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.

Fixed, thanks.

* Adjust ErrReplicaNoEngine message when there are no replicas
  to try
* Adjust engine stopped unit test to use a mock with three replicas

Features: control RbldWidelyStriped
Signed-off-by: Michael MacDonald <mjmac@vectorsolutionsgroup.com>
@mjmac
mjmac dismissed stale reviews from tanabarr and kjacque via 3095e2f November 8, 2026 01:24
@mjmac
mjmac requested review from kjacque, knard38 and tanabarr November 8, 2026 01:25
@mjmac

mjmac commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

Since this is rummaging down in the MS, I'd suggest running against "Features: control" as well as the affected test.

Yep, good point. I had to address some other feedback so I included that in the new commit.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants