Whamcloud - gitweb
LU-7735 utils: Allow revert of NO_PRIMNODE 04/18304/5
authorSebastien Piechurski <sebastien.piechurski@atos.net>
Thu, 4 Feb 2016 16:45:16 +0000 (11:45 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 17 Dec 2016 05:49:20 +0000 (05:49 +0000)
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.

Test-Parameters: trivial testlist=conf-sanity
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: I2251f66236c91365c03e7d138cd8e6508956d73d
Reviewed-on: https://review.whamcloud.com/18304
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/utils/mkfs_lustre.c

index 1a365e9..d300878 100644 (file)
@@ -359,6 +359,7 @@ int parse_opts(int argc, char *const argv[], struct mkfs_opts *mop,
                        /* Must update the mgs logs */
                        ldd->ldd_flags |= LDD_F_UPDATE;
                        if (opt == 'f') {
                        /* Must update the mgs logs */
                        ldd->ldd_flags |= LDD_F_UPDATE;
                        if (opt == 'f') {
+                               ldd->ldd_flags &= ~LDD_F_NO_PRIMNODE;
                                failnode_set = 1;
                        } else {
                                ldd->ldd_flags |= LDD_F_NO_PRIMNODE;
                                failnode_set = 1;
                        } else {
                                ldd->ldd_flags |= LDD_F_NO_PRIMNODE;