server cannot be restarted if there is an action rule with left side of form <policy>:<rule> defined in action policy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
congress |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
congress in devstack with last commit 97af67204c0573c
I'm using action policy with 'action' rules (left side of rule is murano:
urano:propertie
scenario
* execute
openstack congress policy create murano_action --kind action
openstack congress policy rule create murano_action 'action(
openstack congress policy rule create murano_action 'murano:
* stop congress server (using screen -r stack and CTRL+C in congress' screen)
* start congress the server (using screen -r stack and cursor-up + enter in congress' screen)
** exception is reported:
2015-04-02 08:58:23.594 13210 DEBUG congress.
/congress/
2015-04-02 08:58:23.594 13210 DEBUG congress.
epsix.py:565
2015-04-02 08:58:23.603 13210 DEBUG keystoneclient.
client" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}7b8b77caa
ckages/
2015-04-02 08:58:23.614 13210 DEBUG congress.
g_debug /opt/stack/
2015-04-02 08:58:23.615 13210 DEBUG congress.
tack/congress/
2015-04-02 08:58:23.616 13210 DEBUG congress.
> log /opt/stack/
2015-04-02 08:58:23.617 13210 DEBUG congress.
/congress/
2015-04-02 08:58:23.617 13210 ERROR congress.service [-] Fatal Exception:
2015-04-02 08:58:23.617 13210 TRACE congress.service Traceback (most recent call last):
2015-04-02 08:58:23.617 13210 TRACE congress.service File "/opt/stack/
2015-04-02 08:58:23.617 13210 TRACE congress.service return f(*args, **kw)
2015-04-02 08:58:23.617 13210 TRACE congress.service File "/opt/stack/
2015-04-02 08:58:23.617 13210 TRACE congress.service cage = harness.
2015-04-02 08:58:23.617 13210 TRACE congress.service File "/opt/stack/
2015-04-02 08:58:23.617 13210 TRACE congress.service {'policy_id': rule.policy_name})
2015-04-02 08:58:23.617 13210 TRACE congress.service File "/opt/stack/
2015-04-02 08:58:23.617 13210 TRACE congress.service "Errors: " + ";".join((str(x) for x in changes)))
2015-04-02 08:58:23.617 13210 TRACE congress.service PolicyException: Errors: Rule head murano:
urano:propertie
2015-04-02 08:58:23.617 13210 TRACE congress.service
congress failed to start
Changed in congress: | |
milestone: | none → kilo-3 |
status: | Fix Committed → Fix Released |
Reviewed: https:/ /review. openstack. org/170255 /git.openstack. org/cgit/ stackforge/ congress/ commit/ ?id=61c6aeaa9b1 a5f67cde4a63f75 383c4c29de19c1
Committed: https:/
Submitter: Jenkins
Branch: master
commit 61c6aeaa9b1a5f6 7cde4a63f75383c 4c29de19c1
Author: Tim Hinrichs <email address hidden>
Date: Thu Apr 2 10:00:35 2015 -0700
Fix bug in action theory on restart
The bug was that creating a theory of kind 'action' produced
an in-memory 'action' policy but stored the type of that policy
as 'nonrecursive' in the database. So on restart, the policy
engine would create a policy of the wrong kind, which would
in turn cause some rules stored in the DB to be incorrectly
rejected, thereby causing a fatal error.
The fix was to change the code that looked up the type of
a theory from checking isinstance() to looking at the
field of the theory that is set to the name of the policy
type.
Change-Id: I869fa835d07a86 3e8d5473a638db5 2e3ed4d6133
Closes-bug: 1439536