state_path needs a saner default

Bug #1279989 reported by Artom Lifshitz
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Designate
Fix Released
Undecided
Artom Lifshitz
Icehouse
Fix Released
Undecided
Artom Lifshitz

Bug Description

When installing from packages (python setup.py install should also be affected), the state-path configuration variable defaults to wherever Designate is installed [1].

If the bind9 backend is in use, it attempts to write zonefiles to the bind9 directory in the state-path directory.

If the defaults are left unchanged, this leads to attempts to create and write to /usr/lib/python2.6/site-packages/bind9. Besides this being forbidden unless Designate is running as root, it's also a very bizarre place to keep state.

[1] https://github.com/stackforge/designate/blob/1f8a9b3a680b065b7c804be92a4a80c7246d7003/designate/__init__.py#L28-L33

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (master)

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

Changed in designate:
assignee: nobody → Artom Lifshitz (notartom)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (master)

Reviewed: https://review.openstack.org/73717
Committed: https://git.openstack.org/cgit/stackforge/designate/commit/?id=49562df128d6b5081eb846b77a11523cffce268d
Submitter: Jenkins
Branch: master

commit 49562df128d6b5081eb846b77a11523cffce268d
Author: Artom Lifshitz <email address hidden>
Date: Fri Feb 14 16:25:40 2014 -0500

    Default state-path to /var/lib/designate

    In a production system, the previous state-path would default to
    something like /usr/lib/python2.6/site-packages. Not only is this a
    bizarre place to keep Designate's state, it also breaks the bind9
    backend, which attemps to create and write to
    /usr/lib/python2.6/site-packages/bind9.

    Since /var/lib is defined in the Filesystem Hierarchy Standard as the
    place to store persistent state information, it's better to explicitly
    use it as the default state-path.

    Change-Id: I91922799ba1dcae1ad33f1abbec79b1eb907307f
    Closes-bug: 1279989

Changed in designate:
status: In Progress → Fix Committed
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.