Details
-
Bug
-
Resolution: Fixed
-
Trivial
-
Lustre 2.6.0, Lustre 2.7.0, Lustre 2.5.3, Lustre 2.8.0
-
4
-
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;