From 5413a1633f9e43fa851c03595e346f4e7465236c Mon Sep 17 00:00:00 2001 From: jacob Date: Thu, 7 Jul 2005 22:51:59 +0000 Subject: [PATCH] b=7015 r=adilger add lconf --service foo which is the same as: lconf --group foo --select foo=$(hostname) --- lustre/ChangeLog | 6 ++++++ lustre/doc/lconf.8 | 3 +++ lustre/utils/lconf | 9 ++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 1fe6a58..d50ab23 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -99,6 +99,12 @@ Details : OSTs now allocate memory needed to write out data at memory, it would be unable to do so and the node would become unresponsive. +Severity : enhancement +Bugzilla : 7015 +Description: Addition of lconf --service command line option +Details : lconf now accepts a '--service ' option, which is + shorthand for 'lconf --group --select =' + ------------------------------------------------------------------------------ 2005-06-20 Cluster File Systems, Inc. diff --git a/lustre/doc/lconf.8 b/lustre/doc/lconf.8 index a3e60f1..aee8352 100644 --- a/lustre/doc/lconf.8 +++ b/lustre/doc/lconf.8 @@ -125,6 +125,9 @@ Reformat all the devices. This is essential on the first time the file system is --select Select a particular node for a service .TP +--service +Shorthand for --group --select = +.TP --subsystem Set the portals debug subsystem. .TP diff --git a/lustre/utils/lconf b/lustre/utils/lconf index be78a0e..5cb7479 100755 --- a/lustre/utils/lconf +++ b/lustre/utils/lconf @@ -2716,11 +2716,14 @@ def doUnloadModules(services): # # Load profile for def doHost(lustreDB, hosts): - global is_router, local_node_name + global is_router, local_node_name, tgt_select node_db = None for h in hosts: node_db = lustreDB.lookup_name(h, 'node') if node_db: + if config.service: + tgt_select[config.service] = h + config.group = config.service break if not node_db: panic('No host entry found.') @@ -2995,6 +2998,9 @@ def sanitise_path(): tgt_select = {} def init_select(args): # args = [service=nodeA,service2=nodeB service3=nodeC] + # --service is analagous to: + # --group --select = + # this is handled in doHost() global tgt_select for arg in args: list = string.split(arg, ',') @@ -3017,6 +3023,7 @@ lconf_options = [ ('ldapurl',"LDAP server URL, eg. ldap://localhost", PARAM), ('config', "Cluster config name used for LDAP query", PARAM), ('select', "service=nodeA,service2=nodeB ", PARAMLIST), + ('service', "shorthand for --group --select =", PARAM), ('node', "Load config for ", PARAM), ('cleanup,d', "Cleans up config. (Shutdown)"), ('force,f', "Forced unmounting and/or obd detach during cleanup", -- 1.8.3.1