Policy rule creation does not support internationalization.

Bug #1751209 reported by sonu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
congress
Confirmed
Undecided
Manik Bindlish

Bug Description

(Reproduced on stable/newton)

root@node-1:/var# openstack --debug congress policy rule create test_policy 'error(?) :- p(?, val1), p(?, val2), not eq(val1, val2)'
(Note: ?->unable to copy international characters)

START with options: [u'--debug', u'congress', u'policy', u'rule', u'create', u'test_policy', u'error(\u3042) :- p(\u3042, val1), p(\u3042, val2), not eq(val1, val2)']

options: Namespace(access_key='', access_secret='***', access_token='***', access_token_endpoint='', access_token_type='', aodh_endpoint='', auth_type='', auth_url='http://192.168.104.12:5000/v3', authorization_code='', cacert=None, cert='', client_id='', client_secret='***', cloud='', consumer_key='', consumer_secret='***', debug=True, default_domain='default', default_domain_id='', default_domain_name='', deferred_help=False, discovery_endpoint='', domain_id='', domain_name='', endpoint='', glare_url='', identity_provider='', identity_provider_url='', insecure=None, interface='', key='', log_file=None, murano_packages_service='glance', murano_url='', old_profile=None, openid_scope='', os_alarming_api_version='2', os_application_catalog_api_version='1', os_baremetal_api_version='1.9', os_beta_command=False, os_clustering_api_version='1', os_compute_api_version='', os_container_infra_api_version='1', os_data_processing_api_version='1.1', os_data_processing_url='', os_dns_api_version='2', os_identity_api_version='3', os_image_api_version='', os_key_manager_api_version='1', os_metrics_api_version='1', os_network_api_version='', os_object_api_version='', os_orchestration_api_version='1', os_policy_api_version='1', os_project_id=None, os_project_name=None, os_queues_api_version='2', os_volume_api_version='', os_workflow_api_version='2', passcode='', password='***', profile=None, project_domain_id='', project_domain_name='Default', project_id='', project_name='admin', protocol='', redirect_uri='', region_name='RegionOne', roles='', timing=False, token='***', trust_id='', url='', user_domain_id='', user_domain_name='Default', user_id='', username='admin', verbose_level=3, verify=None)
Auth plugin password selected
auth_config_hook(): {'auth_type': 'password', 'beta_command': False, u'compute_api_version': u'2', u'orchestration_api_version': '1', u'database_api_version': u'1.0', 'metrics_api_version': '1', u'metering_api_version': u'2', 'policy_api_version': '1', u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', 'networks': [], u'image_api_version': u'2', 'clustering_api_version': '1', 'verify': True, u'dns_api_version': '2', u'object_store_api_version': u'1', 'username': 'admin', 'container_infra_api_version': '1', 'verbose_level': 3, 'region_name': 'RegionOne', 'api_timeout': None, u'baremetal_api_version': '1.9', 'queues_api_version': '2', 'auth': {'user_domain_name': 'Default', 'project_name': 'admin', 'project_domain_name': 'Default'}, 'default_domain': 'default', 'debug': True, u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', 'key': None, 'timing': False, 'password': 'admin', 'application_catalog_api_version': '1', 'murano_packages_service': 'glance', 'cacert': None, u'key_manager_api_version': '1', 'data_processing_api_version': '1.1', 'deferred_help': False, u'identity_api_version': '3', 'workflow_api_version': '2', u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron', u'status': u'active', 'alarming_api_version': '2', u'container_api_version': u'1', 'auth_url': 'http://192.168.104.12:5000/v3', u'interface': None, u'disable_vendor_agent': {}}
defaults: {u'auth_type': 'password', u'status': u'active', u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', 'api_timeout': None, u'baremetal_api_version': u'1', u'image_api_version': u'2', u'metering_api_version': u'2', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', 'cacert': None, u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', u'key_manager_api_version': u'v1', 'verify': True, u'identity_api_version': u'2.0', u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron', u'container_api_version': u'1', u'dns_api_version': u'2', u'object_store_api_version': u'1', u'interface': None, u'disable_vendor_agent': {}}
cloud cfg: {'auth_type': 'password', 'beta_command': False, u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', 'metrics_api_version': '1', u'metering_api_version': u'2', 'policy_api_version': '1', u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', 'networks': [], u'image_api_version': u'2', 'clustering_api_version': '1', 'verify': True, u'dns_api_version': '2', u'object_store_api_version': u'1', 'username': 'admin', 'container_infra_api_version': '1', 'verbose_level': 3, 'region_name': 'RegionOne', 'api_timeout': None, u'baremetal_api_version': '1.9', 'queues_api_version': '2', 'auth': {'username': 'admin', 'project_name': 'admin', 'user_domain_name': 'Default', 'auth_url': 'http://192.168.104.12:5000/v3', 'password': '***', 'project_domain_name': 'Default'}, 'default_domain': 'default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': '1', 'timing': False, 'password': '***', 'application_catalog_api_version': '1', 'murano_packages_service': 'glance', 'cacert': None, u'key_manager_api_version': '1', 'data_processing_api_version': '1.1', 'deferred_help': False, u'identity_api_version': '3', 'workflow_api_version': '2', u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron', u'status': u'active', 'alarming_api_version': '2', 'debug': True, 'auth_url': 'http://192.168.104.12:5000/v3', u'interface': None, u'disable_vendor_agent': {}}
compute API version 2, cmd group openstack.compute.v2
network API version 2, cmd group openstack.network.v2
image API version 2, cmd group openstack.image.v2
volume API version 2, cmd group openstack.volume.v2
identity API version 3, cmd group openstack.identity.v3
object_store API version 1, cmd group openstack.object_store.v1
orchestration API version 1, cmd group openstack.orchestration.v1
alarming API version 2, cmd group openstack.alarming.v2
application_catalog API version 1, cmd group openstack.application_catalog.v1
congressclient API version 1, cmd group openstack.congressclient.v1
baremetal API version 1.9, cmd group openstack.baremetal.v1
neutronclient API version 2, cmd group openstack.neutronclient.v2
dns API version 2, cmd group openstack.dns.v2
metric API version 1, cmd group openstack.metric.v1
container_infra API version 1, cmd group openstack.container_infra.v1
workflow_engine API version 2, cmd group openstack.workflow_engine.v2
key_manager API version 1, cmd group openstack.key_manager.v1
data_processing API version 1.1, cmd group openstack.data_processing.v1
messaging API version 2, cmd group openstack.messaging.v2
clustering API version 1, cmd group openstack.clustering.v1
Auth plugin password selected
auth_config_hook(): {'auth_type': 'password', 'beta_command': False, u'compute_api_version': u'2', u'orchestration_api_version': '1', u'database_api_version': u'1.0', 'metrics_api_version': '1', u'metering_api_version': u'2', 'policy_api_version': '1', u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', 'networks': [], u'image_api_version': u'2', 'clustering_api_version': '1', 'verify': True, u'dns_api_version': '2', u'object_store_api_version': u'1', 'username': 'admin', 'container_infra_api_version': '1', 'verbose_level': 3, 'region_name': 'RegionOne', 'api_timeout': None, u'baremetal_api_version': '1.9', 'queues_api_version': '2', 'auth': {'user_domain_name': 'Default', 'project_name': 'admin', 'project_domain_name': 'Default'}, 'default_domain': 'default', 'debug': True, u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', 'key': None, 'timing': False, 'password': 'admin', 'application_catalog_api_version': '1', 'murano_packages_service': 'glance', 'cacert': None, u'key_manager_api_version': '1', 'data_processing_api_version': '1.1', 'deferred_help': False, u'identity_api_version': '3', 'workflow_api_version': '2', u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron', u'status': u'active', 'alarming_api_version': '2', u'container_api_version': u'1', 'auth_url': 'http://192.168.104.12:5000/v3', u'interface': None, u'disable_vendor_agent': {}}
command: congress policy rule create -> congressclient.osc.v1.policy.CreatePolicyRule
Using auth plugin: password
Using parameters {'username': 'admin', 'project_name': 'admin', 'user_domain_name': 'Default', 'auth_url': 'http://192.168.104.12:5000/v3', 'password': '***', 'project_domain_name': 'Default'}
Get auth_ref
REQ: curl -g -i -X GET http://192.168.104.12:5000/v3 -H "Accept: application/json" -H "User-Agent: osc-lib keystoneauth1/2.12.3 python-requests/2.18.4 CPython/2.7.12"
Starting new HTTP connection (1): 192.168.104.12
http://192.168.104.12:5000 "GET /v3 HTTP/1.1" 200 None
RESP: [200] Date: Wed, 21 Feb 2018 08:33:12 GMT Server: Apache Vary: X-Auth-Token,Accept-Encoding x-openstack-request-id: req-f5851d82-e9c4-4918-95da-f8fe2150ec00 Content-Encoding: gzip Connection: close Transfer-Encoding: chunked Content-Type: application/json
RESP BODY: {"version": {"status": "stable", "updated": "2016-10-06T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.7", "links": [{"href": "http://192.168.104.12:5000/v3/", "rel": "self"}]}}

Making authentication request to http://192.168.104.12:5000/v3/auth/tokens
Resetting dropped connection: 192.168.104.12
http://192.168.104.12:5000 "POST /v3/auth/tokens HTTP/1.1" 201 12381
{"token": {"is_domain": false, "methods": ["password"], "roles": [{"id": "bc9876457e8441b793a40d1f4953c53f", "name": "monasca-user"}, {"id": "0eaa4925042e4c9aafab87bec4fdf93d", "name": "admin"}], "expires_at": "2018-02-21T09:33:13.000000Z", "project": {"domain": {"id": "default", "name": "Default"}, "id": "9a036d420925419c9066e02ae98c4f99", "name": "admin"}, "catalog": [{"endpoints": [{"url": "http://192.168.105.12:8080", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "3c4a22d0e43b465f9cfe18f518347e13"}, {"url": "http://192.168.104.12:8080", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "d691676f70244eda895b21db2446516f"}, {"url": "http://192.168.104.12:8080", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "ff58c1e0929241f4b59ea26e7dc83ddc"}], "type": "s3", "id": "04bba378c8dc4320b84d8fb2a788f402", "name": "swift_s3"}, {"endpoints": [{"url": "http://192.168.105.12:8004/v1/9a036d420925419c9066e02ae98c4f99", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "8902428582ab4f988e0b6db414b239d4"}, {"url": "http://192.168.104.12:8004/v1/9a036d420925419c9066e02ae98c4f99", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "9513bcd0bbcd41fdbc6f3ffeb3673e0f"}, {"url": "http://192.168.104.12:8004/v1/9a036d420925419c9066e02ae98c4f99", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "a2faf98ce513448e9009df1bcc6d8e28"}], "type": "orchestration", "id": "2913877bc8514bcd8646612704be79e2", "name": "heat"}, {"endpoints": [{"url": "http://192.168.104.12:9696", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "0fd7b23eb8214f7e902eedac8da9b8f2"}, {"url": "http://192.168.105.12:9696", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "7b145da132dd4cd3b52e48a96d7be153"}, {"url": "http://192.168.104.12:9696", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "d067fd71009e4a6d95be7e2eb1eea3dc"}], "type": "network", "id": "2cd328d6c48141a794887b7c98e4b05a", "name": "neutron"}, {"endpoints": [{"url": "http://192.168.104.6:8989/v3", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "41a0cbf4338c4da4b56ff36579561cef"}, {"url": "http://192.168.104.6:8989/v2", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "46b0cb0eadc24772aa341b3cc21dcaef"}, {"url": "http://192.168.104.6:8989/v2", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "47b720fe9ed0464bb7ea9d9d5c83ea73"}, {"url": "http://192.168.104.6:8989/v3", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "63b3e4707b844cd4b636dba23de66425"}, {"url": "http://192.168.104.6:8989/v2", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "c561fa73a7a04310a6d2fdb68f435d32"}, {"url": "http://192.168.104.6:8989/v3", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "d93297c4b8f44e169f9e4f805d611400"}], "type": "workflowv2", "id": "3cfef4e9b5654ccf924ff551a0b1a617", "name": "mistral"}, {"endpoints": [{"url": "http://192.168.104.12:8000/v1", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "5230254006fc4ca39df623231a5ba268"}, {"url": "http://192.168.104.12:8000/v1", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "7f71bb616157453e9edc316e0905ec4a"}, {"url": "http://192.168.105.12:8000/v1", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "a5c48ce73bd142768b84c6d6437e0523"}], "type": "cloudformation", "id": "495b18e9d9cc44c1808c8b5c4724a175", "name": "heat-cfn"}, {"endpoints": [{"url": "http://192.168.104.6:9890", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "4aadc5ba5a464859af8c5fb5c1636cbf"}, {"url": "http://192.168.104.6:9890", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "60ddf813a8df47c8aca560fc601f985e"}, {"url": "http://192.168.104.6:9890", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "6c02044a003e4d1ea7c60dc637ca8603"}], "type": "nfv-orchestration", "id": "536b3779b7cf4e9c839d0a66e1fe1d98", "name": "tacker"}, {"endpoints": [{"url": "http://192.168.104.12:1789", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "66e092282d404f51b70cf5da7a877581"}, {"url": "http://192.168.104.12:1789", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "95384823c7004708a7a92e2cad6cd235"}, {"url": "http://192.168.105.12:1789", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "a17ed46a56a94c41af2370e44f3f6278"}], "type": "policy", "id": "5f2358a2c5ea41f2bf0a1e0825bb541b", "name": "congress"}, {"endpoints": [{"url": "http://192.168.105.12:8776/v1/9a036d420925419c9066e02ae98c4f99", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "16adac095e6d4beaa724d4488154901a"}, {"url": "http://192.168.104.12:8776/v1/9a036d420925419c9066e02ae98c4f99", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "a51054d9ef954bfb94d1a440bb8752d9"}, {"url": "http://192.168.104.12:8776/v1/9a036d420925419c9066e02ae98c4f99", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "f51abda9cdf548b59031074886c1e11f"}], "type": "volume", "id": "67b5676d6dbd418a84634bfe137babda", "name": "cinder"}, {"endpoints": [{"url": "http://192.168.105.12:8774/v2/9a036d420925419c9066e02ae98c4f99", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "09c3f0c423264b24980ec4f2a195c475"}, {"url": "http://192.168.104.12:8774/v2/9a036d420925419c9066e02ae98c4f99", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "8532d6cb113a4ec1a33ad47f417f7f67"}, {"url": "http://192.168.104.12:8774/v2/9a036d420925419c9066e02ae98c4f99", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "d40de6c0faf74849a766193cb414869e"}], "type": "compute_legacy", "id": "6998d5c74a4d4dc58e3328bf2f161204", "name": "compute_legacy"}, {"endpoints": [{"url": "http://192.168.104.12:8080/v1/AUTH_9a036d420925419c9066e02ae98c4f99", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "2e4e9e01580d43e28907a8948f71cb22"}, {"url": "http://192.168.105.12:8080/v1/AUTH_9a036d420925419c9066e02ae98c4f99", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "531d39eea5594323bf92383813b0c5b1"}, {"url": "http://192.168.104.12:8080/v1/AUTH_9a036d420925419c9066e02ae98c4f99", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "d4bf831e597d444eb09016d9670f5b66"}], "type": "object-store", "id": "706a29ea521f49c588dc5b6efd7bd1c6", "name": "swift"}, {"endpoints": [{"url": "http://192.168.105.12:8776/v2/9a036d420925419c9066e02ae98c4f99", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "14ac05ef2e17492db19bab40640ed75c"}, {"url": "http://192.168.104.12:8776/v2/9a036d420925419c9066e02ae98c4f99", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "a2ba56597a2e4a2ea6d2b9b9445a1f19"}, {"url": "http://192.168.104.12:8776/v2/9a036d420925419c9066e02ae98c4f99", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "c551659bb5a84b1189ddad5a86c8f079"}], "type": "volumev2", "id": "725e92685f3b427e91739c070659113d", "name": "cinderv2"}, {"endpoints": [{"url": "http://192.168.104.15:8070/v2.0", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "3f4f1e09f2a64051a9701ecd47e0a182"}, {"url": "http://192.168.104.15:8070/v2.0", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "5fee7ddf0cee44b0b2e2c6afb37af313"}, {"url": "http://192.168.104.15:8070/v2.0", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "f69898843163494cb88e911ce23b9506"}], "type": "monitoring", "id": "90581578cc3a4a77b24388061cd7ada6", "name": "monasca"}, {"endpoints": [{"url": "http://192.168.105.12:9494", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "a3b909c8821e4ecaa57f00c97f5616c7"}, {"url": "http://192.168.104.12:9494", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "dae58093a06e4a1e9020325ef82e7df6"}, {"url": "http://192.168.104.12:9494", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "fd65d510670b4f0685a46595c91c9a26"}], "type": "artifact", "id": "c3ed2f06d8ac4536be4251531143ae5c", "name": "glare"}, {"endpoints": [{"url": "http://192.168.105.12:8774/v2.1", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "770318926ccf4895ade8d849af851509"}, {"url": "http://192.168.104.12:8774/v2.1", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "eae2b29959624b039fc21bd1aa794306"}, {"url": "http://192.168.104.12:8774/v2.1", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "ee9cac1ddc354cd28e8b608babfa80be"}], "type": "compute", "id": "c9f9ea25f9fa4c1dad8e0a8a47114884", "name": "nova"}, {"endpoints": [{"url": "http://192.168.104.12:9292", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "2f9b47dd01a248f3a1f2b267c92c0c5c"}, {"url": "http://192.168.104.12:9292", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "5695c7089caf4d84a0c9efcdbfeb584b"}, {"url": "http://192.168.105.12:9292", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "9dd58103f8b3462fa636a48d6579f75e"}], "type": "image", "id": "daf89ec134054e46b5c71e2a77f9a06a", "name": "glance"}, {"endpoints": [{"url": "http://192.168.104.12:5000/v2.0", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "a92db83d382d4bb4bbb8f1f2c9d2c20f"}, {"url": "http://192.168.105.12:5000/v2.0", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "d4a661f171cd4ae8b422ed0ed59f58c2"}, {"url": "http://192.168.104.12:35357/v2.0", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "e9b98cd649224a5288caa527edc24bac"}], "type": "identity", "id": "eb4e27e1d6f64e4696c56cddf0d58ed6", "name": "keystone"}, {"endpoints": [{"url": "http://192.168.104.12:8776/v3/9a036d420925419c9066e02ae98c4f99", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "3e109fd9c4d240a68628618642c56f9c"}, {"url": "http://192.168.104.12:8776/v3/9a036d420925419c9066e02ae98c4f99", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "5bc2a39b6783459fbfa0deaf5dccf51a"}, {"url": "http://192.168.105.12:8776/v3/9a036d420925419c9066e02ae98c4f99", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "63990ccdeb844e30bb0ea2c84a693ce8"}], "type": "volumev3", "id": "eebf50c4aa5941e8a6578fd738a366c7", "name": "cinderv3"}, {"endpoints": [{"url": "http://192.168.104.12:8042", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "0f5c37f3ec6341aaafa8ecfe21bd5e3e"}, {"url": "http://192.168.105.12:8042", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "3bc6970b09ff432c893c0df31c09a967"}, {"url": "http://192.168.104.12:8042", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "96e0c877edf94440ac17b65065dc97bb"}], "type": "alarming", "id": "fb38ffdf868140b783cfdf6671bd58e6", "name": "aodh"}, {"endpoints": [{"url": "http://192.168.104.6:8777", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "a0dbf4367f8f4cf3857c3fb535750f2a"}, {"url": "http://192.168.104.6:8777", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "f7f4ec212b3649e99d33815a7bfb65cd"}, {"url": "http://192.168.104.6:8777", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "f9c0efda3c2649e09888c5b38a84b0a2"}], "type": "metering", "id": "fca7b390b7e84f81bc94d721578f4d21", "name": "ceilometer"}], "user": {"domain": {"id": "default", "name": "Default"}, "id": "4f40ae325991476f8733358eb736ad1e", "name": "admin"}, "audit_ids": ["d-O6-2obQjGnjEqhqumN6Q"], "issued_at": "2018-02-21T08:33:13.000000Z"}}
take_action(Namespace(columns=[], comment=None, formatter='table', max_width=0, noindent=False, policy_name=u'test_policy', prefix='', rule=u'error(\u3042) :- p(\u3042, val1), p(\u3042, val2), not eq(val1, val2)', rule_name=None, variables=[]))
instantiating congress client: <class 'congressclient.v1.client.Client'>
Making authentication request to http://192.168.104.12:5000/v3/auth/tokens
Resetting dropped connection: 192.168.104.12
http://192.168.104.12:5000 "POST /v3/auth/tokens HTTP/1.1" 201 12381
{"token": {"is_domain": false, "methods": ["password"], "roles": [{"id": "bc9876457e8441b793a40d1f4953c53f", "name": "monasca-user"}, {"id": "0eaa4925042e4c9aafab87bec4fdf93d", "name": "admin"}], "expires_at": "2018-02-21T09:33:13.000000Z", "project": {"domain": {"id": "default", "name": "Default"}, "id": "9a036d420925419c9066e02ae98c4f99", "name": "admin"}, "catalog": [{"endpoints": [{"url": "http://192.168.105.12:8080", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "3c4a22d0e43b465f9cfe18f518347e13"}, {"url": "http://192.168.104.12:8080", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "d691676f70244eda895b21db2446516f"}, {"url": "http://192.168.104.12:8080", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "ff58c1e0929241f4b59ea26e7dc83ddc"}], "type": "s3", "id": "04bba378c8dc4320b84d8fb2a788f402", "name": "swift_s3"}, {"endpoints": [{"url": "http://192.168.105.12:8004/v1/9a036d420925419c9066e02ae98c4f99", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "8902428582ab4f988e0b6db414b239d4"}, {"url": "http://192.168.104.12:8004/v1/9a036d420925419c9066e02ae98c4f99", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "9513bcd0bbcd41fdbc6f3ffeb3673e0f"}, {"url": "http://192.168.104.12:8004/v1/9a036d420925419c9066e02ae98c4f99", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "a2faf98ce513448e9009df1bcc6d8e28"}], "type": "orchestration", "id": "2913877bc8514bcd8646612704be79e2", "name": "heat"}, {"endpoints": [{"url": "http://192.168.104.12:9696", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "0fd7b23eb8214f7e902eedac8da9b8f2"}, {"url": "http://192.168.105.12:9696", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "7b145da132dd4cd3b52e48a96d7be153"}, {"url": "http://192.168.104.12:9696", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "d067fd71009e4a6d95be7e2eb1eea3dc"}], "type": "network", "id": "2cd328d6c48141a794887b7c98e4b05a", "name": "neutron"}, {"endpoints": [{"url": "http://192.168.104.6:8989/v3", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "41a0cbf4338c4da4b56ff36579561cef"}, {"url": "http://192.168.104.6:8989/v2", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "46b0cb0eadc24772aa341b3cc21dcaef"}, {"url": "http://192.168.104.6:8989/v2", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "47b720fe9ed0464bb7ea9d9d5c83ea73"}, {"url": "http://192.168.104.6:8989/v3", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "63b3e4707b844cd4b636dba23de66425"}, {"url": "http://192.168.104.6:8989/v2", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "c561fa73a7a04310a6d2fdb68f435d32"}, {"url": "http://192.168.104.6:8989/v3", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "d93297c4b8f44e169f9e4f805d611400"}], "type": "workflowv2", "id": "3cfef4e9b5654ccf924ff551a0b1a617", "name": "mistral"}, {"endpoints": [{"url": "http://192.168.104.12:8000/v1", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "5230254006fc4ca39df623231a5ba268"}, {"url": "http://192.168.104.12:8000/v1", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "7f71bb616157453e9edc316e0905ec4a"}, {"url": "http://192.168.105.12:8000/v1", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "a5c48ce73bd142768b84c6d6437e0523"}], "type": "cloudformation", "id": "495b18e9d9cc44c1808c8b5c4724a175", "name": "heat-cfn"}, {"endpoints": [{"url": "http://192.168.104.6:9890", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "4aadc5ba5a464859af8c5fb5c1636cbf"}, {"url": "http://192.168.104.6:9890", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "60ddf813a8df47c8aca560fc601f985e"}, {"url": "http://192.168.104.6:9890", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "6c02044a003e4d1ea7c60dc637ca8603"}], "type": "nfv-orchestration", "id": "536b3779b7cf4e9c839d0a66e1fe1d98", "name": "tacker"}, {"endpoints": [{"url": "http://192.168.104.12:1789", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "66e092282d404f51b70cf5da7a877581"}, {"url": "http://192.168.104.12:1789", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "95384823c7004708a7a92e2cad6cd235"}, {"url": "http://192.168.105.12:1789", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "a17ed46a56a94c41af2370e44f3f6278"}], "type": "policy", "id": "5f2358a2c5ea41f2bf0a1e0825bb541b", "name": "congress"}, {"endpoints": [{"url": "http://192.168.105.12:8776/v1/9a036d420925419c9066e02ae98c4f99", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "16adac095e6d4beaa724d4488154901a"}, {"url": "http://192.168.104.12:8776/v1/9a036d420925419c9066e02ae98c4f99", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "a51054d9ef954bfb94d1a440bb8752d9"}, {"url": "http://192.168.104.12:8776/v1/9a036d420925419c9066e02ae98c4f99", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "f51abda9cdf548b59031074886c1e11f"}], "type": "volume", "id": "67b5676d6dbd418a84634bfe137babda", "name": "cinder"}, {"endpoints": [{"url": "http://192.168.105.12:8774/v2/9a036d420925419c9066e02ae98c4f99", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "09c3f0c423264b24980ec4f2a195c475"}, {"url": "http://192.168.104.12:8774/v2/9a036d420925419c9066e02ae98c4f99", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "8532d6cb113a4ec1a33ad47f417f7f67"}, {"url": "http://192.168.104.12:8774/v2/9a036d420925419c9066e02ae98c4f99", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "d40de6c0faf74849a766193cb414869e"}], "type": "compute_legacy", "id": "6998d5c74a4d4dc58e3328bf2f161204", "name": "compute_legacy"}, {"endpoints": [{"url": "http://192.168.104.12:8080/v1/AUTH_9a036d420925419c9066e02ae98c4f99", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "2e4e9e01580d43e28907a8948f71cb22"}, {"url": "http://192.168.105.12:8080/v1/AUTH_9a036d420925419c9066e02ae98c4f99", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "531d39eea5594323bf92383813b0c5b1"}, {"url": "http://192.168.104.12:8080/v1/AUTH_9a036d420925419c9066e02ae98c4f99", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "d4bf831e597d444eb09016d9670f5b66"}], "type": "object-store", "id": "706a29ea521f49c588dc5b6efd7bd1c6", "name": "swift"}, {"endpoints": [{"url": "http://192.168.105.12:8776/v2/9a036d420925419c9066e02ae98c4f99", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "14ac05ef2e17492db19bab40640ed75c"}, {"url": "http://192.168.104.12:8776/v2/9a036d420925419c9066e02ae98c4f99", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "a2ba56597a2e4a2ea6d2b9b9445a1f19"}, {"url": "http://192.168.104.12:8776/v2/9a036d420925419c9066e02ae98c4f99", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "c551659bb5a84b1189ddad5a86c8f079"}], "type": "volumev2", "id": "725e92685f3b427e91739c070659113d", "name": "cinderv2"}, {"endpoints": [{"url": "http://192.168.104.15:8070/v2.0", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "3f4f1e09f2a64051a9701ecd47e0a182"}, {"url": "http://192.168.104.15:8070/v2.0", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "5fee7ddf0cee44b0b2e2c6afb37af313"}, {"url": "http://192.168.104.15:8070/v2.0", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "f69898843163494cb88e911ce23b9506"}], "type": "monitoring", "id": "90581578cc3a4a77b24388061cd7ada6", "name": "monasca"}, {"endpoints": [{"url": "http://192.168.105.12:9494", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "a3b909c8821e4ecaa57f00c97f5616c7"}, {"url": "http://192.168.104.12:9494", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "dae58093a06e4a1e9020325ef82e7df6"}, {"url": "http://192.168.104.12:9494", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "fd65d510670b4f0685a46595c91c9a26"}], "type": "artifact", "id": "c3ed2f06d8ac4536be4251531143ae5c", "name": "glare"}, {"endpoints": [{"url": "http://192.168.105.12:8774/v2.1", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "770318926ccf4895ade8d849af851509"}, {"url": "http://192.168.104.12:8774/v2.1", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "eae2b29959624b039fc21bd1aa794306"}, {"url": "http://192.168.104.12:8774/v2.1", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "ee9cac1ddc354cd28e8b608babfa80be"}], "type": "compute", "id": "c9f9ea25f9fa4c1dad8e0a8a47114884", "name": "nova"}, {"endpoints": [{"url": "http://192.168.104.12:9292", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "2f9b47dd01a248f3a1f2b267c92c0c5c"}, {"url": "http://192.168.104.12:9292", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "5695c7089caf4d84a0c9efcdbfeb584b"}, {"url": "http://192.168.105.12:9292", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "9dd58103f8b3462fa636a48d6579f75e"}], "type": "image", "id": "daf89ec134054e46b5c71e2a77f9a06a", "name": "glance"}, {"endpoints": [{"url": "http://192.168.104.12:5000/v2.0", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "a92db83d382d4bb4bbb8f1f2c9d2c20f"}, {"url": "http://192.168.105.12:5000/v2.0", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "d4a661f171cd4ae8b422ed0ed59f58c2"}, {"url": "http://192.168.104.12:35357/v2.0", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "e9b98cd649224a5288caa527edc24bac"}], "type": "identity", "id": "eb4e27e1d6f64e4696c56cddf0d58ed6", "name": "keystone"}, {"endpoints": [{"url": "http://192.168.104.12:8776/v3/9a036d420925419c9066e02ae98c4f99", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "3e109fd9c4d240a68628618642c56f9c"}, {"url": "http://192.168.104.12:8776/v3/9a036d420925419c9066e02ae98c4f99", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "5bc2a39b6783459fbfa0deaf5dccf51a"}, {"url": "http://192.168.105.12:8776/v3/9a036d420925419c9066e02ae98c4f99", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "63990ccdeb844e30bb0ea2c84a693ce8"}], "type": "volumev3", "id": "eebf50c4aa5941e8a6578fd738a366c7", "name": "cinderv3"}, {"endpoints": [{"url": "http://192.168.104.12:8042", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "0f5c37f3ec6341aaafa8ecfe21bd5e3e"}, {"url": "http://192.168.105.12:8042", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "3bc6970b09ff432c893c0df31c09a967"}, {"url": "http://192.168.104.12:8042", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "96e0c877edf94440ac17b65065dc97bb"}], "type": "alarming", "id": "fb38ffdf868140b783cfdf6671bd58e6", "name": "aodh"}, {"endpoints": [{"url": "http://192.168.104.6:8777", "interface": "admin", "region": "RegionOne", "region_id": "RegionOne", "id": "a0dbf4367f8f4cf3857c3fb535750f2a"}, {"url": "http://192.168.104.6:8777", "interface": "public", "region": "RegionOne", "region_id": "RegionOne", "id": "f7f4ec212b3649e99d33815a7bfb65cd"}, {"url": "http://192.168.104.6:8777", "interface": "internal", "region": "RegionOne", "region_id": "RegionOne", "id": "f9c0efda3c2649e09888c5b38a84b0a2"}], "type": "metering", "id": "fca7b390b7e84f81bc94d721578f4d21", "name": "ceilometer"}], "user": {"domain": {"id": "default", "name": "Default"}, "id": "4f40ae325991476f8733358eb736ad1e", "name": "admin"}, "audit_ids": ["QGOMc9pCRWSjQQToRdKAiw"], "issued_at": "2018-02-21T08:33:13.000000Z"}}
REQ: curl -g -i -X POST http://192.168.105.12:1789/v1/policies/test_policy/rules -H "User-Agent: python-congressclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}ce4b1a51cbb4f87b08dcb23ac7e8dd47d2736ab3" -d '{"rule": "error(\u3042) :- p(\u3042, val1), p(\u3042, val2), not eq(val1, val2)"}'
Starting new HTTP connection (1): 192.168.105.12
http://192.168.105.12:1789 "POST /v1/policies/test_policy/rules HTTP/1.1" 400 287
RESP: [400] Content-Type: application/json; charset=UTF-8 Content-Length: 287 X-Openstack-Request-Id: req-f50d3e3e-b746-41e1-b425-bc0780eaf200 Date: Wed, 21 Feb 2018 08:33:13 GMT Connection: close
RESP BODY: {"error": {"message": "Syntax error for rule::Lex failure.\nline:1,col:6 no viable alternative at character u'\\u3042'\nline:1,col:14 no viable alternative at character u'\\u3042'\nline:1,col:26 no viable alternative at character u'\\u3042'", "error_data": null, "error_code": 1002}}

Request returned failure status: 400
Syntax error for rule::Lex failure.
line:1,col:6 no viable alternative at character u'\u3042'
line:1,col:14 no viable alternative at character u'\u3042'
line:1,col:26 no viable alternative at character u'\u3042' (HTTP 400) (Request-ID: req-f50d3e3e-b746-41e1-b425-bc0780eaf200)
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 346, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/cliff/display.py", line 100, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/congressclient/osc/v1/policy.py", line 88, in take_action
    data = client.create_policy_rule(parsed_args.policy_name, body)
  File "/usr/local/lib/python2.7/dist-packages/congressclient/v1/client.py", line 82, in create_policy_rule
    self.policy_rules % policy_name, body=body)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 193, in post
    return self.request(url, 'POST', **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 344, in request
    resp = super(LegacyJsonAdapter, self).request(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 112, in request
    return self.session.request(url, method, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/osc_lib/session.py", line 40, in request
    resp = super(TimingSession, self).request(url, method, **kwargs)
  File "/usr/lib/python2.7/dist-packages/positional/__init__.py", line 94, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/session.py", line 594, in request
    raise exceptions.from_response(resp, method, url)
BadRequest: Syntax error for rule::Lex failure.
line:1,col:6 no viable alternative at character u'\u3042'
line:1,col:14 no viable alternative at character u'\u3042'
line:1,col:26 no viable alternative at character u'\u3042' (HTTP 400) (Request-ID: req-f50d3e3e-b746-41e1-b425-bc0780eaf200)
clean_up CreatePolicyRule: Syntax error for rule::Lex failure.
line:1,col:6 no viable alternative at character u'\u3042'
line:1,col:14 no viable alternative at character u'\u3042'
line:1,col:26 no viable alternative at character u'\u3042' (HTTP 400) (Request-ID: req-f50d3e3e-b746-41e1-b425-bc0780eaf200)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/osc_lib/shell.py", line 135, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 226, in run
    result = self.run_subcommand(remainder)
  File "/usr/local/lib/python2.7/dist-packages/osc_lib/shell.py", line 180, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 346, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/cliff/display.py", line 100, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/congressclient/osc/v1/policy.py", line 88, in take_action
    data = client.create_policy_rule(parsed_args.policy_name, body)
  File "/usr/local/lib/python2.7/dist-packages/congressclient/v1/client.py", line 82, in create_policy_rule
    self.policy_rules % policy_name, body=body)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 193, in post
    return self.request(url, 'POST', **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 344, in request
    resp = super(LegacyJsonAdapter, self).request(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 112, in request
    return self.session.request(url, method, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/osc_lib/session.py", line 40, in request
    resp = super(TimingSession, self).request(url, method, **kwargs)
  File "/usr/lib/python2.7/dist-packages/positional/__init__.py", line 94, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneauth1/session.py", line 594, in request
    raise exceptions.from_response(resp, method, url)
BadRequest: Syntax error for rule::Lex failure.
line:1,col:6 no viable alternative at character u'\u3042'
line:1,col:14 no viable alternative at character u'\u3042'
line:1,col:26 no viable alternative at character u'\u3042' (HTTP 400) (Request-ID: req-f50d3e3e-b746-41e1-b425-bc0780eaf200)

END return value: 1

Tags: newton
sonu (sonu-bhumca11)
description: updated
Changed in congress:
assignee: nobody → Manik Bindlish (manikbindlish)
Revision history for this message
Eric K (ekcs) wrote :

Hi Sonu,

Thank you for the bug report! One question to help me understand the desired behavior in your use case.

Congress does support international characters within strings in a policy rule. For example:
'error("あ") :- p("あ", val1), p("あ", val2), not eq(val1, val2)' is legal and accepted by Congress.

However, with the attempted: 'error(?) :- p(?, val1), p(?, val2), not eq(val1, val2)', the international character is used to construct a variable identifier. But the characters allowed in identifiers are restricted according to the following grammar:
https://github.com/openstack/congress/blob/master/congress/datalog/Congress.g#L224

So the question is, is your use case calling for international characters in strings or international characters in identifiers?

Eric K (ekcs)
Changed in congress:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.