If I reproduced this issue correct, this doesn't seem to be a neutron bug. In below, I tried to create a security group rule with unicode character. The trace indicated that the error was raised in client side:
$ RULE_ID=$(openstack security group rule create --protocol "icmp" --remote-ip "0.0.0.0/0" --description "ICMP Ping”" default -c id -f value)
$ openstack security group rule delete $RULE_ID
Failed to delete rule with name or ID '576a8d9b-c5db-47aa-bb16-873071ed3f8a': 'ascii' codec can't encode
character u'\u201d' in position 136: ordinal not in range(128)
1 of 1 rules failed to delete.
$ openstack --debug security group rule delete $RULE_ID
...
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/osc_lib/shell.py", line 134, in run
ret_val = super(OpenStackShell, self).run(argv)
File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 279, in run
result = self.run_subcommand(remainder)
File "/usr/local/lib/python2.7/dist-packages/osc_lib/shell.py", line 169, in run_subcommand
ret_value = super(OpenStackShell, self).run_subcommand(argv)
File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 400, in run_subcommand
result = cmd.run(parsed_args)
File "/usr/local/lib/python2.7/dist-packages/osc_lib/command/command.py", line 41, in run
return super(Command, self).run(parsed_args)
File "/usr/local/lib/python2.7/dist-packages/cliff/command.py", line 184, in run
return_code = self.take_action(parsed_args) or 0
File "/usr/local/lib/python2.7/dist-packages/openstackclient/network/common.py", line 120, in take_action
raise exceptions.CommandError(msg)
CommandError: 1 of 1 rules failed to delete.
If I directly delete it through REST API, it worked:
Hi @James,
If I reproduced this issue correct, this doesn't seem to be a neutron bug. In below, I tried to create a security group rule with unicode character. The trace indicated that the error was raised in client side:
$ RULE_ID=$(openstack security group rule create --protocol "icmp" --remote-ip "0.0.0.0/0" --description "ICMP Ping”" default -c id -f value)
$ openstack security group rule delete $RULE_ID c5db-47aa- bb16-873071ed3f 8a': 'ascii' codec can't encode
Failed to delete rule with name or ID '576a8d9b-
character u'\u201d' in position 136: ordinal not in range(128)
1 of 1 rules failed to delete.
$ openstack --debug security group rule delete $RULE_ID lib/python2. 7/dist- packages/ osc_lib/ shell.py" , line 134, in run Shell, self).run(argv) lib/python2. 7/dist- packages/ cliff/app. py", line 279, in run subcommand( remainder) lib/python2. 7/dist- packages/ osc_lib/ shell.py" , line 169, in run_subcommand Shell, self).run_ subcommand( argv) lib/python2. 7/dist- packages/ cliff/app. py", line 400, in run_subcommand parsed_ args) lib/python2. 7/dist- packages/ osc_lib/ command/ command. py", line 41, in run parsed_ args) lib/python2. 7/dist- packages/ cliff/command. py", line 184, in run action( parsed_ args) or 0 lib/python2. 7/dist- packages/ openstackclient /network/ common. py", line 120, in take_action CommandError( msg)
...
Traceback (most recent call last):
File "/usr/local/
ret_val = super(OpenStack
File "/usr/local/
result = self.run_
File "/usr/local/
ret_value = super(OpenStack
File "/usr/local/
result = cmd.run(
File "/usr/local/
return super(Command, self).run(
File "/usr/local/
return_code = self.take_
File "/usr/local/
raise exceptions.
CommandError: 1 of 1 rules failed to delete.
If I directly delete it through REST API, it worked:
$ curl -i -X DELETE -H "Accept: application/json" -H "X-Auth-Token: $TOKEN" 10.0.0. 15:9696/ v2.0/security- group-rules/ $RULE_ID" Request- Id: req-b042e293- 2b00-4a45- a19f-f50566e236 af
"http://
HTTP/1.1 204 No Content
X-Openstack-
Content-Length: 0
Date: Tue, 21 Aug 2018 19:16:58 GMT