when installation of grafana fails, error is sqlite3.OperationalError: unable to open database file

Bug #1768058 reported by Jason Hobbs
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Grafana Charm
Fix Released
Low
Paul Henien

Bug Description

hit a hook error with grafana charm:

http://paste.ubuntu.com/p/gqXNWHqJtD/

bundle:
http://paste.ubuntu.com/p/Vyx9SMdyD9/

Turns out this was due to the apt-get install of grafana failing due to a proxy failure. The error message could definitely be improved.

Revision history for this message
Jason Hobbs (jason-hobbs) wrote :
description: updated
Revision history for this message
Christian Reis (kiko) wrote :

What's the relation to bug 1769741?

summary: - sqlite3.OperationalError: unable to open database file
+ when installation of grafana fails, error is sqlite3.OperationalError:
+ unable to open database file
Revision history for this message
Jason Hobbs (jason-hobbs) wrote : Re: [Bug 1768058] Re: when installation of grafana fails, error is sqlite3.OperationalError: unable to open database file

If we hit bug 1769741 (or any other issue that causes us to fail to
install grafana) we hit this bad error message.

On Tue, May 8, 2018 at 10:02 AM, Christian Reis <email address hidden> wrote:
> What's the relation to bug 1769741?
>
> ** Summary changed:
>
> - sqlite3.OperationalError: unable to open database file
> + when installation of grafana fails, error is sqlite3.OperationalError: unable to open database file
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1768058
>
> Title:
> when installation of grafana fails, error is sqlite3.OperationalError:
> unable to open database file
>
> Status in Grafana Charm:
> New
>
> Bug description:
> hit a hook error with grafana charm:
>
> http://paste.ubuntu.com/p/gqXNWHqJtD/
>
> bundle:
> http://paste.ubuntu.com/p/Vyx9SMdyD9/
>
> Turns out this was due to the apt-get install of grafana failing due
> to a proxy failure. The error message could definitely be improved.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/grafana-charm/+bug/1768058/+subscriptions

Revision history for this message
Andrea Ieri (aieri) wrote :

The problem comes from not using the fatal=True flag when running apt_install. When the installation fails, the charm assumes it didn't. The sqlite error is just a consequence of grafana not being installed (the grafana.db file does not exist).
Attached is a small patch that makes the install hook fail on my test host when the apt source is not reachable (so we never get to try to read a non-existent database).

Andrea Ieri (aieri)
Changed in grafana-charm:
assignee: nobody → Paul Henien (phenien)
Paul Henien (phenien)
Changed in grafana-charm:
importance: Undecided → Low
status: New → In Progress
Changed in grafana-charm:
status: In Progress → Fix Committed
Revision history for this message
Tom Haddon (mthaddon) wrote :

I've confirmed this is in cs:grafana, so marking this as fix released

Changed in grafana-charm:
status: Fix Committed → Fix Released
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.