Schema transformer unit test 'test_vrf_assign_rules' frequently fails

Bug #1798765 reported by Édouard Thuleau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R5.0
Fix Committed
High
Édouard Thuleau
Trunk
Fix Committed
High
Édouard Thuleau

Bug Description

It fails because the unit test framework failed to start schema transformer with that error:

Traceback (most recent call last):
  File "/home/zuul/contrail_repo/build/debug/config/schema-transformer/.venv/local/lib/python2.7/site-packages/gevent/greenlet.py", line 454, in run
    result = self._run(*self.args, **self.kwargs)
  File "../common/tests/test_common.py", line 366, in launch_schema_transformer
    to_bgp.main(args_str)
  File "schema_transformer/to_bgp.py", line 721, in main
    st_logger, args)
  File "/home/zuul/contrail_repo/build/debug/config/schema-transformer/.venv/local/lib/python2.7/site-packages/cfgm_common/zkclient.py", line 506, in master_election
    self._election.run(func, *args, **kwargs)
  File "../common/tests/test_utils.py", line 1201, in run
    cb(*args, **kwargs)
  File "schema_transformer/to_bgp.py", line 665, in run_schema_transformer
    transformer = SchemaTransformer(st_logger, args)
  File "schema_transformer/to_bgp.py", line 198, in __init__
    self.reinit()
  File "schema_transformer/to_bgp.py", line 351, in reinit
    VirtualMachineInterfaceST.reinit()
  File "schema_transformer/config_db.py", line 152, in reinit
    for obj in cls.list_vnc_obj():
  File "/home/zuul/contrail_repo/build/debug/config/schema-transformer/.venv/local/lib/python2.7/site-packages/cfgm_common/vnc_db.py", line 382, in list_vnc_obj
    obj_dicts = cls.list_obj(obj_type, fields)
  File "/home/zuul/contrail_repo/build/debug/config/schema-transformer/.venv/local/lib/python2.7/site-packages/cfgm_common/vnc_db.py", line 373, in list_obj
    field_names=fields)
  File "/home/zuul/contrail_repo/build/debug/config/schema-transformer/.venv/local/lib/python2.7/site-packages/cfgm_common/vnc_cassandra.py", line 521, in wrapper
    return func(*args, **kwargs)
  File "/home/zuul/contrail_repo/build/debug/config/schema-transformer/.venv/local/lib/python2.7/site-packages/cfgm_common/vnc_cassandra.py", line 898, in object_read
    raise NoIdError(obj_uuids[0])
NoIdError: Unknown id: cd733cbb-3f0e-4f37-be87-152b6ce1c657
<Greenlet at 0x7f89fca8d2d0: launch_schema_transformer('TestServicePolicy', 'test.test_service_policy.TestServicePolicy.test_v, '172.16.9.4', 53428, None)> failed with NoIdError

Tags: config
information type: Proprietary → Public
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R5.0

Review in progress for https://review.opencontrail.org/47158
Submitter: Yijie Xiao (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/47183
Submitter: Édouard Thuleau (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/47183
Committed: http://github.com/Juniper/contrail-controller/commit/a32a3c557cbab11118cf10e9f236dbf39c5f77fd
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit a32a3c557cbab11118cf10e9f236dbf39c5f77fd
Author: Édouard Thuleau <email address hidden>
Date: Mon Oct 22 12:28:05 2018 +0200

[config] fix resource type listing in common vnc_db code

The python common lib used by config services (schema-transformer,
svc-monitor...) uses the 'vnc_cassandra.object_read' to list all resources
for a type. That method requires a list of resource UUIDs to be read but
in case that list contains only one UUID and that UUID does not exists
anymore, the 'object_read' method raises a NoIdError exception instead
returning an empty list.

Change-Id: I743767f1e441fb26f726bc0acdc8aa29e2ef74f9
Closes-Bug: #1798765

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R5.0

Review in progress for https://review.opencontrail.org/47284
Submitter: Édouard Thuleau (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/47284
Committed: http://github.com/Juniper/contrail-controller/commit/577558f3ea92301f58da373ed65b4690769f9571
Submitter: Zuul v3 CI (<email address hidden>)
Branch: R5.0

commit 577558f3ea92301f58da373ed65b4690769f9571
Author: Édouard Thuleau <email address hidden>
Date: Mon Oct 22 12:28:05 2018 +0200

[config] fix resource type listing in common vnc_db code

The python common lib used by config services (schema-transformer,
svc-monitor...) uses the 'vnc_cassandra.object_read' to list all resources
for a type. That method requires a list of resource UUIDs to be read but
in case that list contains only one UUID and that UUID does not exists
anymore, the 'object_read' method raises a NoIdError exception instead
returning an empty list.

Change-Id: I743767f1e441fb26f726bc0acdc8aa29e2ef74f9
Closes-Bug: #1798765
(cherry picked from commit a32a3c557cbab11118cf10e9f236dbf39c5f77fd)

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.