Load policies on startup if library in DB is empty

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

Bug Description

- add new config option for where policy library files reside
- load policy library files into DB on congress server start-up if DB is empty

Reference:
https://github.com/openstack/congress-specs/blob/master/specs/pike/policy-library.rst#the-policy-library

depends-on: https://bugs.launchpad.net/congress/+bug/1693617
size: < 1 day

Eric K (ekcs)
Changed in congress:
status: New → Triaged
Eric K (ekcs)
tags: added: policy-lib
Revision history for this message
Tim Hinrichs (thinrichs) wrote :

Would this go through the library CRUD API? I'd think it should so there's only 1 way to get policies into and out-of the library.

Revision history for this message
Eric K (ekcs) wrote :

Hmm good thought. I wasn't thinking it would go through the library CRUD API, but rather the db data model interface. But I don't have any definitive thought.

I would think the loading is something that should be finished before the API service launches. But when the library CRUD API is done, we'd definitely want most of the logic in adding/deleting to be shared so we don't have two different pieces of code doing the same thing and maybe doing it slightly differently.

Eric K (ekcs)
Changed in congress:
assignee: nobody → Eric K (ekcs)
status: Triaged → In Progress
tags: added: pike-goal
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to congress (master)

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

commit cd9aa33451ad9c2cf72e2aee4c63b7430cd8cab9
Author: Eric Kao <email address hidden>
Date: Mon Jun 19 17:03:13 2017 -0700

    Automatically load library policy files at start

    harness.py loads library policy from disk files to DB

    uniqueness constraint added on library policy name.

    devstack plugin updated to install library policy files
    to default location

    updated congress stand-alone install instruction

    Partially implements: blueprint policy-library
    Closes-Bug: 1693619
    Closes-Bug: 1693672

    Change-Id: I51097081f6576755751231feb5ed2b0be642d91e

Changed in congress:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/congress 6.0.0.0b3

This issue was fixed in the openstack/congress 6.0.0.0b3 development milestone.

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.