database.connection config option has no default value

Bug #1290645 reported by Ruby Loo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Medium
Roman Podoliaka

Bug Description

Before merging of this review: https://review.openstack.org/#/c/76204/, the default value for database.connection was (in etc/ironic/ironic.conf.sample):
    #connection=sqlite:////ironic/openstack/common/db/$sqlite_db

After the merge, there is no default value set.

If you run ironic-dbsync, you'll get an error:
    ironic-dbsync --config-file etc/ironic/ironic.conf.local
    CRITI [ironic] 'NoneType' object has no attribute 'drivername'

aeva black (tenbrae)
Changed in ironic:
status: New → Confirmed
milestone: none → icehouse-rc1
status: Confirmed → Triaged
importance: High → Medium
Revision history for this message
Ruby Loo (rloo) wrote :

There also seems to be a problem in the code, with recognizing sqlite_db option when I set the connection string to use it. :-(

Workaround (this worked for me):

    connection=sqlite:///ironic/openstack/common/db/ironic.sqlite

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

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

Changed in ironic:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in ironic:
assignee: Ruby Loo (rloo) → Roman Podoliaka (rpodolyaka)
Revision history for this message
Ruby Loo (rloo) wrote :

As discussed with Devananda on IRC (http://eavesdrop.openstack.org/irclogs/%23openstack-ironic/%23openstack-ironic.2014-03-12.log, around 2014-03-12T16:43:28), we are OK
1. not using the 'sqlite_db' option in a string template, and
2. generated ironic.conf.sample does not show the default value for 'connection'.
3. changing the default value for 'connection' to be sqlite:///ironic/ironic.sqlite.

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

Reviewed: https://review.openstack.org/80003
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=9f8748d1d88b853d4eb9ed0feab41f418defc033
Submitter: Jenkins
Branch: master

commit 9f8748d1d88b853d4eb9ed0feab41f418defc033
Author: Roman Podoliaka <email address hidden>
Date: Wed Mar 12 19:01:13 2014 +0200

    Set the database.connection option default value

    This was previously set right before ironic-api start, but the
    default value must also be present for ironic-dbsync calls.

    Note: the default value of database.connection is changed here - from
    now on the sqlite database will be stored in ./ironic/ironic.sqlite
    instead of ./ironic/openstack/common/db/ironic.sqlite.

    Closes-Bug: #1290645

    Change-Id: I2c2ab2f10a99ffd564611351e71c0b88adc20ba7

Changed in ironic:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ironic:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: icehouse-rc1 → 2014.1
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.