diff --git a/confluent_client/doc/man/noderun.ronn b/confluent_client/doc/man/noderun.ronn index 626bb685..d8298ffd 100644 --- a/confluent_client/doc/man/noderun.ronn +++ b/confluent_client/doc/man/noderun.ronn @@ -48,6 +48,10 @@ themselves, see nodeshell(8). `n4: 01 10 00` `n2: 01 10 00` + +* If wanting to use literal {} in the command, they must be escaped by doubling: + `# noderun n1-n4 "echo {node} | awk '{{print $1}}'"` + ## SEE ALSO nodeshell(8) diff --git a/confluent_client/doc/man/nodeshell.ronn b/confluent_client/doc/man/nodeshell.ronn index 7c4c57ba..6dc81ccb 100644 --- a/confluent_client/doc/man/nodeshell.ronn +++ b/confluent_client/doc/man/nodeshell.ronn @@ -27,7 +27,10 @@ as stderr, unlike psh which combines all stdout and stderr into stdout. `n4: hi` * Setting a new static ip address temporarily on secondary interface of four nodes: - `# nodeshell n1-n4 ifconfig eth1 172.30.93.{n1}` + `# nodeshell n1-n4 ifconfig eth1 172.30.93.{n1}` + +* If wanting to use literal {} in the command, they must be escaped by doubling: + `# nodeshell n1-n4 "ps | awk '{{print $1}}'"` ## SEE ALSO diff --git a/confluent_server/confluent/config/configmanager.py b/confluent_server/confluent/config/configmanager.py index 420dda28..24315f19 100644 --- a/confluent_server/confluent/config/configmanager.py +++ b/confluent_server/confluent/config/configmanager.py @@ -200,7 +200,7 @@ def _rpc_master_del_nodes(tenant, nodes): ConfigManager(tenant).del_nodes(nodes) -def _rpc_del_nodes(tenant, nodes) +def _rpc_del_nodes(tenant, nodes): ConfigManager(tenant)._true_del_nodes(nodes) @@ -1432,7 +1432,7 @@ class ConfigManager(object): def del_nodes(self, nodes): if cfgleader: # slaved to a collective - return exec_on_loader('_rpc_master_del_nodes', self.tenant, + return exec_on_leader('_rpc_master_del_nodes', self.tenant, nodes) if cfgstreams: exec_on_followers('_rpc_del_nodes', self.tenant, nodes) diff --git a/confluent_server/confluent/plugins/configuration/attributes.py b/confluent_server/confluent/plugins/configuration/attributes.py index 2e7ddf98..36baf330 100644 --- a/confluent_server/confluent/plugins/configuration/attributes.py +++ b/confluent_server/confluent/plugins/configuration/attributes.py @@ -183,8 +183,10 @@ def _expand_expression(nodes, configmanager, inputdata): pernodeexpressions[expanded[0]] = expanded[1] for node in util.natural_sort(pernodeexpressions): yield msg.KeyValueData({'value': pernodeexpressions[node]}, node) - except ValueError as e: - raise exc.InvalidArgumentException(str(e)) + except (SyntaxError, ValueError) as e: + raise exc.InvalidArgumentException( + 'Bad confluent expression syntax (must use "{{" and "}}" if not ' + 'desiring confluent expansion): ' + str(e))