fail to start with rule referencing datasource0:table0

Bug #1646280 reported by Eric K
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
congress
Fix Released
High
Eric K

Bug Description

When there is an existing rule referencing datasource0:table0, congress server fails to restart because the policy engine attempts to load the rule before the datasource is started. For example, with the rule 'p(x) :- nova:servers(id=x)', the following failure occurs on server restart (single node):

2016-11-29 13:24:31.732 ERROR congress.service [-] Fatal Exception:
2016-11-29 13:24:31.732 TRACE congress.service Traceback (most recent call last):
2016-11-29 13:24:31.732 TRACE congress.service File "/opt/stack/congress/congress/service.py", line 34, in wrapper
2016-11-29 13:24:31.732 TRACE congress.service return f(*args, **kw)
2016-11-29 13:24:31.732 TRACE congress.service File "/opt/stack/congress/congress/service.py", line 51, in congress_app_factory
2016-11-29 13:24:31.732 TRACE congress.service datasources=flags_dict['datasources'])
2016-11-29 13:24:31.732 TRACE congress.service File "/opt/stack/congress/congress/harness.py", line 88, in create2
2016-11-29 13:24:31.732 TRACE congress.service initialize_policy_engine(services[ENGINE_SERVICE_NAME])
2016-11-29 13:24:31.732 TRACE congress.service File "/opt/stack/congress/congress/harness.py", line 153, in initialize_policy_engine
2016-11-29 13:24:31.732 TRACE congress.service engine.persistent_load_rules()
2016-11-29 13:24:31.732 TRACE congress.service File "/opt/stack/congress/congress/policy_engines/agnostic.py", line 549, in persistent_load_rules
2016-11-29 13:24:31.732 TRACE congress.service rule.policy_name)
2016-11-29 13:24:31.732 TRACE congress.service File "/opt/stack/congress/congress/policy_engines/agnostic.py", line 562, in _safe_process_policy_update
2016-11-29 13:24:31.732 TRACE congress.service [event], persistent=persistent)
2016-11-29 13:24:31.732 TRACE congress.service File "/opt/stack/congress/congress/policy_engines/agnostic.py", line 1859, in process_policy_update
2016-11-29 13:24:31.732 TRACE congress.service self.update_table_subscriptions(oldtables, newtables)
2016-11-29 13:24:31.732 TRACE congress.service File "/opt/stack/congress/congress/policy_engines/agnostic.py", line 1888, in update_table_subscriptions
2016-11-29 13:24:31.732 TRACE congress.service self.subscribe(service, tablename)
2016-11-29 13:24:31.732 TRACE congress.service File "/opt/stack/congress/congress/dse2/data_service.py", line 282, in subscribe
2016-11-29 13:24:31.732 TRACE congress.service self.service_id, service, table)
2016-11-29 13:24:31.732 TRACE congress.service File "/opt/stack/congress/congress/dse2/dse_node.py", line 467, in subscribe_table
2016-11-29 13:24:31.732 TRACE congress.service {'table': table})
2016-11-29 13:24:31.732 TRACE congress.service File "/opt/stack/congress/congress/dse2/dse_node.py", line 354, in invoke_service_rpc
2016-11-29 13:24:31.732 TRACE congress.service raise exception.NotFound(msg % service_id)
2016-11-29 13:24:31.732 TRACE congress.service NotFound: service 'nova' could not be found
2016-11-29 13:24:31.732 TRACE congress.service

Eric K (ekcs)
Changed in congress:
milestone: none → ocata-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to congress (master)

Fix proposed to branch: master
Review: https://review.openstack.org/405017

Changed in congress:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to congress (master)

Reviewed: https://review.openstack.org/405017
Committed: https://git.openstack.org/cgit/openstack/congress/commit/?id=5262be2d304dc7a4400e244e22a444996dd1a105
Submitter: Jenkins
Branch: master

commit 5262be2d304dc7a4400e244e22a444996dd1a105
Author: Eric K <email address hidden>
Date: Wed Nov 30 16:14:42 2016 -0800

    start datasource drivers before policy engine

    Also starts API last to avoid accepting API requests before other
    services are up.

    HA doc updated to start DSD node before PE nodes.

    Change-Id: I27cd1149e1f52b596c1ae77ca1400113a53213f5
    Closes-Bug: 1646280

Changed in congress:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to congress (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/409415

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to congress (stable/newton)

Reviewed: https://review.openstack.org/409415
Committed: https://git.openstack.org/cgit/openstack/congress/commit/?id=d1c551a1acc49a8063afbd45d3f4e4f103ebcdb2
Submitter: Jenkins
Branch: stable/newton

commit d1c551a1acc49a8063afbd45d3f4e4f103ebcdb2
Author: Eric K <email address hidden>
Date: Wed Nov 30 16:14:42 2016 -0800

    start datasource drivers before policy engine

    Also starts API last to avoid accepting API requests before other
    services are up.

    HA doc updated to start DSD node before PE nodes.

    Change-Id: I27cd1149e1f52b596c1ae77ca1400113a53213f5
    Closes-Bug: 1646280

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/congress 5.0.0.0b2

This issue was fixed in the openstack/congress 5.0.0.0b2 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/congress 4.0.1

This issue was fixed in the openstack/congress 4.0.1 release.

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.