[LU-2896] IR enabled MGS don't able to register old OST Created: 01/Mar/13  Updated: 07/Mar/13  Resolved: 07/Mar/13

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.3.0, Lustre 2.4.0
Fix Version/s: Lustre 2.4.0

Type: Bug Priority: Blocker
Reporter: Alexey Lyashkov Assignee: James Nunez (Inactive)
Resolution: Fixed Votes: 0
Labels: LB, patch
Environment:

OST 2.1, MGS 2.1+ported IR patch.


Severity: 3
Rank (Obsolete): 6982

 Description   

Xyratex port IR patch from upstream to own code and see MGS don't able to register old OST in new MGS, with EINVAL.

collecting logs point to
mgs_handle_target_reg function and code

        /* Do not support unregistering right now. */
        if (opc != LDD_F_OPC_REG)
                GOTO(out_nolock, rc = -EINVAL);

in case 2.1 OST (or any pre IR target) don't set any flag from list

#define LDD_F_OPC_REG   0x10000000
#define LDD_F_OPC_UNREG 0x20000000
#define LDD_F_OPC_READY 0x40000000
#define LDD_F_OPC_MASK  0xf0000000

at own side and opc is zero. that broke target to be register.

PS. did you have interoperability testing for IR ?



 Comments   
Comment by Alexey Lyashkov [ 02/Mar/13 ]

Fix looks simple, if target isn't IR capable, we must don't search may operations from submited info and assume operation is LDD_F_OPC_REG.

that code was don't need if IR author mark LDD_F_OPC_REG to zero, but now it's protocol change.

Comment by Alexey Lyashkov [ 03/Mar/13 ]
diff --git a/lustre/mgs/mgs_handler.c b/lustre/mgs/mgs_handler.c
index 83fcdb6..f17f81a 100644
--- a/lustre/mgs/mgs_handler.c
+++ b/lustre/mgs/mgs_handler.c
@@ -494,7 +494,12 @@ static int mgs_handle_target_reg(struct ptlrpc_request *req)
 
         mti = req_capsule_client_get(&req->rq_pill, &RMF_MGS_TARGET_INFO);
 
+       if ((req->rq_export->exp_connect_data.ocd_connect_flags 
+               & OBD_CONNECT_IMP_RECOV) == 0)
+               opc = LDD_F_OPC_REG;
+       else
         opc = mti->mti_flags & LDD_F_OPC_MASK;
+
         if (opc == LDD_F_OPC_READY) {
                 CDEBUG(D_MGS, "fs: %s index: %d is ready to reconnect.\n",
                        mti->mti_fsname, mti->mti_stripe_index);

fixes bug for me.

Comment by Alexey Lyashkov [ 04/Mar/13 ]

remote: New Changes:
remote: http://review.whamcloud.com/5574

Xyratex bug: MRP-880

Comment by Jodi Levi (Inactive) [ 04/Mar/13 ]

James,
Could you please see this one to completion?

Comment by James Nunez (Inactive) [ 04/Mar/13 ]

Sure. I've got it.

Comment by Peter Jones [ 07/Mar/13 ]

Landed for 2.4

Generated at Sat Feb 10 01:29:09 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.