[LU-7735] No way to revert the "no_primnode" flag on targets Created: 03/Feb/16  Updated: 17/Dec/16  Resolved: 17/Dec/16

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.6.0, Lustre 2.7.0, Lustre 2.5.3, Lustre 2.8.0
Fix Version/s: Lustre 2.10.0

Type: Bug Priority: Trivial
Reporter: Sebastien Piechurski Assignee: Nathaniel Clark
Resolution: Fixed Votes: 0
Labels: patch

Severity: 4
Rank (Obsolete): 9223372036854775807

 Description   

When formatting a target or modifying an existing one with the parameter "--servicenode", the flag no_primnode is set on the target, modifying the way the target is then registered on the MGS to avoid adding the NID of the node actually registering and let only the nids given with --servicenode parameters.

However, if someone wants to revert to the older behavior with the "--failnode" parameter, the no_primnode flag is never unset, and the primary node NID is never added to the mountdata.

A trivial fix is to unset the flag when using the "--failnode" parameter.

I am currently unable to sign in to gerrit, so here is the patch inline:

diff --git a/lustre/utils/mkfs_lustre.c b/lustre/utils/mkfs_lustre.c
index 8bf063a..f2f6f53 100644
--- a/lustre/utils/mkfs_lustre.c
+++ b/lustre/utils/mkfs_lustre.c
@@ -394,6 +394,7 @@ int parse_opts(int argc, char *const argv[], struct mkfs_opts *mop,
                         /* Must update the mgs logs */
                         mop->mo_ldd.ldd_flags |= LDD_F_UPDATE;
                         if (opt == 'f') {
+                               mop->mo_ldd.ldd_flags &= ~LDD_F_NO_PRIMNODE;
                                 failnode_set = 1;
                         } else {
                                 mop->mo_ldd.ldd_flags |= LDD_F_NO_PRIMNODE;


 Comments   
Comment by Peter Jones [ 03/Feb/16 ]

Sebastien

Is your intention to make this a Sev 1 - which indicates a production site out of service? Reading the description it does not sound that way, but, if so, which site is affected?

Thanks

Peter

Comment by Sebastien Piechurski [ 03/Feb/16 ]

Oops, sorry Peter, I inverted the meaning of severity.
Of course this can be set to the lowest severity.

Comment by Peter Jones [ 03/Feb/16 ]

Comment by Peter Jones [ 03/Feb/16 ]

Nathaniel

Could you please look into this proposed change and see why this was changed in the first place?

THanks

Peter

Comment by Gerrit Updater [ 04/Feb/16 ]

Nathaniel Clark (nathaniel.l.clark@intel.com) uploaded a new patch: http://review.whamcloud.com/18304
Subject: LU-7735 utils: Allow revert of NO_PRIMNODE
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: ade3ef7cbfbf6a2cf0aa85a3b63ee4e6bdaeb7a4

Comment by Nathaniel Clark [ 04/Feb/16 ]

Going back to the old behaviour seems to have been overlooked when servicenode was added. I'll add this as a patch.

Comment by Gerrit Updater [ 17/Dec/16 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/18304/
Subject: LU-7735 utils: Allow revert of NO_PRIMNODE
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 9cb507c6061d4d676de27d0b1b1cb471c1f1982d

Comment by Peter Jones [ 17/Dec/16 ]

Landed for 2.10

Generated at Sat Feb 10 02:11:28 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.