Skip to content
Snippets Groups Projects
Commit eb553c25 authored by Robert Read's avatar Robert Read
Browse files

* print a message when a duplicate mds or lov name is used

parent cbaef60d
No related branches found
No related tags found
No related merge requests found
...@@ -113,6 +113,10 @@ def error(*args): ...@@ -113,6 +113,10 @@ def error(*args):
print "Error: ", msg print "Error: ", msg
sys.exit(1) sys.exit(1)
def warning(*args):
msg = string.join(map(str,args))
print "Warning: ", msg
# #
# manage names and uuids # manage names and uuids
# need to initialize this by walking tree to ensure # need to initialize this by walking tree to ensure
...@@ -481,6 +485,8 @@ def add_mds(gen, lustre, options, args): ...@@ -481,6 +485,8 @@ def add_mds(gen, lustre, options, args):
error("--mds requires a --node argument") error("--mds requires a --node argument")
mds_name = new_name(options['mds']) mds_name = new_name(options['mds'])
if mds_name != options['mds']:
warning("name:", options['mds'], "already used. using:", mds_name)
devname = args[0] devname = args[0]
if len(args) > 1: if len(args) > 1:
size = args[1] size = args[1]
...@@ -585,7 +591,10 @@ def add_lov(gen, lustre, options, args): ...@@ -585,7 +591,10 @@ def add_lov(gen, lustre, options, args):
if len(args) < 4: if len(args) < 4:
usage() usage()
name = options['lov'] name = new_name(options['lov'])
if name != options['lov']:
warning("name:", options['lov'], "already used. using:", name)
mds_name = args[0] mds_name = args[0]
stripe_sz = args[1] stripe_sz = args[1]
stripe_count = args[2] stripe_count = args[2]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment