Skip to content

Commit

Permalink
mgmtd: fix reply when running ds is not locked
Browse files Browse the repository at this point in the history
At this stage, we should send a SET_CFG reply, not COMMIT_CFG reply.
Commit request is not yet initialized.

Signed-off-by: Igor Ryzhov <[email protected]>
  • Loading branch information
idryzhov committed Nov 21, 2023
1 parent 01af05f commit 354b3c4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions mgmtd/mgmt_txn.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,9 +614,12 @@ static void mgmt_txn_process_set_cfg(struct event *thread)
txn_req->req.set_cfg->dst_ds_id,
txn->txn_id, txn->session_id,
strerror(ret));
mgmt_txn_send_commit_cfg_reply(
txn, MGMTD_DS_LOCK_FAILED,
"running DS not locked for implicit commit");
mgmt_fe_send_set_cfg_reply(
txn->session_id, txn->txn_id,
txn_req->req.set_cfg->ds_id,
txn_req->req_id, MGMTD_DS_LOCK_FAILED,
"running DS not locked for implicit commit",
txn_req->req.set_cfg->implicit_commit);
goto mgmt_txn_process_set_cfg_done;
}

Expand Down

0 comments on commit 354b3c4

Please sign in to comment.