Functional test case are failed "Invalid: Url can't contain 4 byte unicode characters."

Bug #1465188 reported by ranjan kumar on 2015-06-15
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
Undecided
Unassigned

Bug Description

Here is a log trace
2015-06-15 08:09:36,098 INFO 127.0.0.1 - - [15/Jun/2015 08:09:36] "POST /rpc HTTP/1.1" 200 782 0.030830
2015-06-15 08:09:36,099 DEBUG Reloaded policy file: /tmp/tmphXORLJ/etc/policy.json
2015-06-15 08:09:36,100 DEBUG Reloaded policy file: /tmp/tmphXORLJ/etc/policy.json
2015-06-15 08:09:36,107 ERROR RPC Call Error: Url can't contain 4 byte unicode characters.
Traceback (most recent call last):
  File "glance/common/rpc.py", line 180, in __call__
    result = method(req.context, **kwargs)
  File "glance/db/sqlalchemy/api.py", line 129, in image_create
    return _image_update(context, values, None, purge_props=False)
  File "/usr/lib/python2.7/site-packages/retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "/usr/lib/python2.7/site-packages/retrying.py", line 206, in call
    return attempt.get(self._wrap_exception)
  File "/usr/lib/python2.7/site-packages/retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "/usr/lib/python2.7/site-packages/retrying.py", line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "glance/common/utils.py", line 714, in wrapper
    return f(*args, **kwargs)
  File "glance/db/sqlalchemy/api.py", line 795, in _image_update
    session=session)
  File "glance/db/sqlalchemy/api.py", line 886, in _image_locations_set
    image_location_add(context, image_id, loc, session=session)
  File "glance/common/utils.py", line 705, in wrapper
    _check_dict(data_dict)
  File "glance/common/utils.py", line 702, in _check_dict
    raise exception.Invalid(msg)
Invalid: Url can't contain 4 byte unicode characters.

Any pointer to fix this issue

Ian Cordasco (icordasc) wrote :

How did you run the test case?

Ian Cordasco (icordasc) wrote :

Also, what version of glance are you running these tests against? What operating system are you using? etc.

Changed in glance:
status: New → Incomplete
ranjan kumar (ranjankumar188) wrote :

I have checkout out stable/kilo branch from glance repository.
Operation system: RHEL7
Failing test case: ./run_tests.sh glance.tests.functional.db.test_registry
Question: Do we need to start any glance services before running functional test?

ranjan kumar (ranjankumar188) wrote :

When i am using nosetests with --pdb debugger getting this error

Content type=text/x-traceback; charset="utf8"; language="python", value='Traceback (most recent call last):
  File "/glance/glance/tests/functional/db/test_registry.py", line 70, in setUp
    super(TestRegistryDriver, self).setUp()
  File "/glance/glance/tests/functional/db/base.py", line 94, in setUp
    super(TestDriver, self).setUp()
  File "/glance/glance/tests/functional/db/test_registry.py", line 61, in setUp
    use_user_token=True)
  File "/glance/glance/tests/utils.py", line 113, in config
    CONF.set_override(k, v, group)
  File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 1794, in __inner
    result = f(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 2071, in set_override
   opt_info = self._get_opt_info(name, group)
  File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 2384, in _get_opt_info
    raise NoSuchOptError(opt_name, group)\noslo_config.cfg.NoSuchOptError: no such option: use_user_token

Changed in glance:
status: Incomplete → Opinion
Ian Cordasco (icordasc) wrote :

> Question: Do we need to start any glance services before running functional test?

No.

Instead of using nosetests (which OpenStack doesn't use) why not run

$ ./run-tests.sh -d

Further, can you please provide what test this fails on? Which test case is actually failing? Without that there's nothing anyone can do to help you debug this.

Changed in glance:
status: Opinion → Incomplete
ranjan kumar (ranjankumar188) wrote :
Download full text (9.6 KiB)

 $ ./run_tests.sh -d crash just after tests starts Here is a log

# ./run_tests.sh -d
No virtual environment found...create one? (Y/n) n
tail: run_tests.log: file truncated
Tests running...
2015-06-17 08:25:56,817 DEBUG ********************************************************************************
2015-06-17 08:25:56,818 DEBUG Configuration options gathered from:
2015-06-17 08:25:56,818 DEBUG command line args: ['--config-file', '/tmp/tmpQS0vW7/etc/registry.conf']
2015-06-17 08:25:56,819 DEBUG config files: ['/tmp/tmpQS0vW7/etc/registry.conf']
2015-06-17 08:25:56,819 DEBUG ================================================================================
2015-06-17 08:25:56,820 DEBUG admin_role = admin
2015-06-17 08:25:56,820 DEBUG allow_additional_image_properties = True
2015-06-17 08:25:56,820 DEBUG allow_anonymous_access = False
2015-06-17 08:25:56,821 DEBUG allowed_rpc_exception_modules = ['openstack.common.exception', 'glance.common.exception', 'exceptions']
2015-06-17 08:25:56,821 DEBUG api_limit_max = 1000
2015-06-17 08:25:56,821 DEBUG backlog = 4096
2015-06-17 08:25:56,822 DEBUG bind_host = 127.0.0.1
2015-06-17 08:25:56,823 DEBUG bind_port = 45856
2015-06-17 08:25:56,823 DEBUG ca_file = None
2015-06-17 08:25:56,823 DEBUG cert_file = None
2015-06-17 08:25:56,824 DEBUG config_dir = None
2015-06-17 08:25:56,824 DEBUG config_file = ['/tmp/tmpQS0vW7/etc/registry.conf']
2015-06-17 08:25:56,824 DEBUG data_api = glance.db.sqlalchemy.api
2015-06-17 08:25:56,825 DEBUG debug = True
2015-06-17 08:25:56,825 DEBUG default_log_levels = ['amqp=WARN', 'amqplib=WARN', 'boto=WARN', 'qpid=WARN', 'sqlalchemy=WARN', 'suds=INFO', 'oslo.messaging=INFO', 'iso8601=WARN', 'requests.packages.urllib3.connectionpool=WARN', 'urllib3.connectionpool=WARN', 'websocket=WARN', 'requests.packages.urllib3.util.retry=WARN', 'urllib3.util.retry=WARN', 'keystonemiddleware=WARN', 'routes.middleware=WARN', 'stevedore=WARN']
2015-06-17 08:25:56,826 DEBUG default_publisher_id = image.localhost
2015-06-17 08:25:56,826 DEBUG digest_algorithm = sha1
2015-06-17 08:25:56,826 DEBUG disabled_notifications = []
2015-06-17 08:25:56,827 DEBUG enable_v1_api = True
2015-06-17 08:25:56,827 DEBUG enable_v1_registry = True
2015-06-17 08:25:56,827 DEBUG enable_v2_api = True
2015-06-17 08:25:56,828 DEBUG enable_v2_registry = True
2015-06-17 08:25:56,828 DEBUG fatal_deprecations = False
2015-06-17 08:25:56,828 DEBUG http_keepalive = True
2015-06-17 08:25:56,829 DEBUG image_location_quota = 10
2015-06-17 08:25:56,829 DEBUG image_member_quota = 128
2015-06-17 08:25:56,830 DEBUG image_property_quota = 128
2015-06-17 08:25:56,830 DEBUG image_size_cap = 1099511627776
2015-06-17 08:25:56,830 DEBUG image_tag_quota = 128
2015-06-17 08:25:56,831 DEBUG instance_format ...

Read more...

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers