diff --git a/confluent_client/bin/nodeconsole b/confluent_client/bin/nodeconsole index 257b0b68..31e45ad0 100755 --- a/confluent_client/bin/nodeconsole +++ b/confluent_client/bin/nodeconsole @@ -40,6 +40,7 @@ if len(args) != 1: argparser.print_help() sys.exit(1) if options.tile: + null = open('/dev/null', 'w') nodes = [] sess = client.Command() for res in sess.read('/noderange/{0}/nodes/'.format(args[0])): @@ -60,13 +61,15 @@ if options.tile: confettypath, node)]) else: subprocess.call(['tmux', 'select-pane', '-t', str(pane)]) + subprocess.call(['tmux', 'set-option', 'pane-border-status', 'top'], stderr=null) pane += 1 subprocess.call( ['tmux', 'split', '-h', '{0} -m 5 start /nodes/{1}/console/session'.format( confettypath, node)]) - subprocess.call(['tmux', 'select-layout', 'tiled']) + subprocess.call(['tmux', 'select-layout', 'tiled'], stdout=null) subprocess.call(['tmux', 'select-pane', '-t', '0']) + subprocess.call(['tmux', 'set-option', 'pane-border-status', 'top'], stderr=null) os.execlp('tmux', 'tmux', 'attach', '-t', 'nodeconsole_{0}'.format( os.getpid())) else: diff --git a/confluent_server/confluent/config/configmanager.py b/confluent_server/confluent/config/configmanager.py index bcddd8a8..76f8ae74 100644 --- a/confluent_server/confluent/config/configmanager.py +++ b/confluent_server/confluent/config/configmanager.py @@ -1,7 +1,7 @@ 7# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2014 IBM Corporation -# Copyright 2015-2018 Lenovo +# Copyright 2015-2019 Lenovo # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -1515,17 +1515,20 @@ class ConfigManager(object): currnodes = list(self.get_nodegroup_attributes( group, ['nodes']).get('nodes', [])) if attribmap[group][attr].get('prepend', False): - newnodes = attribmap[group][attr][ - 'prepend'].split(',') - attribmap[group][attr] = newnodes + currnodes + newnodes = noderange.NodeRange(attribmap[group][attr][ + 'prepend'], config=self).nodes + attribmap[group][attr] = list( + newnodes) + currnodes elif attribmap[group][attr].get('remove', False): - delnodes = attribmap[group][attr][ - 'remove'].split(',') + delnodes = noderange.NodeRange( + attribmap[group][attr]['remove'], + config=self).nodes attribmap[group][attr] = [ x for x in currnodes if x not in delnodes] if not isinstance(attribmap[group][attr], list): if type(attribmap[group][attr]) is unicode or type(attribmap[group][attr]) is str: - attribmap[group][attr]=attribmap[group][attr].split(",") + attribmap[group][attr] = noderange.NodeRange( + attribmap[group][attr], config=self).nodes else: raise ValueError("nodes attribute on group must be list") for node in attribmap[group]['nodes']: diff --git a/confluent_server/confluent/plugins/configuration/attributes.py b/confluent_server/confluent/plugins/configuration/attributes.py index 373397c8..e16dad19 100644 --- a/confluent_server/confluent/plugins/configuration/attributes.py +++ b/confluent_server/confluent/plugins/configuration/attributes.py @@ -1,5 +1,5 @@ # Copyright 2014 IBM Corporation -# Copyright 2017 Lenovo +# Copyright 2017-2019 Lenovo # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.