unable to start coordinator

Bug #1689211 reported by Giuseppe Attardi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tooz
Fix Released
Undecided
Julien Danjou

Bug Description

$ sudo -H gnocchi-upgrade --config-file gnocchi.conf
sudo: unable to resolve host juju-0bd5ff-default-4
2017-05-08 00:10:22.051 26637 INFO gnocchi.cli [-] Upgrading indexer <gnocchi.indexer.sqlalchemy.SQLAlchemyIndexer object at 0x7ff6b9ed1208>
2017-05-08 00:10:22.067 26637 INFO alembic.runtime.migration [-] Context impl PostgresqlImpl.
2017-05-08 00:10:22.067 26637 INFO alembic.runtime.migration [-] Will assume transactional DDL.
2017-05-08 00:10:22.079 26637 INFO alembic.runtime.migration [-] Context impl PostgresqlImpl.
2017-05-08 00:10:22.079 26637 INFO alembic.runtime.migration [-] Will assume transactional DDL.
2017-05-08 00:10:22.110 26637 ERROR gnocchi.utils [-] Unable to start coordinator: OperationalError: invalid connection option "username"
2017-05-08 00:10:23.112 26637 ERROR gnocchi.utils [-] Unable to start coordinator: OperationalError: invalid connection option "username"

This is on Ubuntu 16.04 with this gnocchi.conf:

[DEFAULT]
[api]
[archive_policy]
[cors]
[cors.subdomain]
[database]
[healthcheck]
[incoming]
file_basepath = /var/lib/gnocchi
[indexer]
url = 'postgresql://juju_gnocchi:h66cr3KG6TxBK58yrFWbxLBszdVKbSVCpKyMy6f@192.168.250.178:5432/gnocchi'
[metricd]
[oslo_middleware]
[oslo_policy]
[statsd]
[storage]
driver = file
file_basepath = /var/lib/gnocchi

description: updated
Revision history for this message
Julien Danjou (jdanjou) wrote :

What's your version of tooz and psycopg2?

Revision history for this message
Giuseppe Attardi (giuseppe.attardi) wrote : Re: Re: [Bug 1689211] unable to start coordinator

Thank you for the quick answer.
I have tooz 1.56.0 and psycopg2 2.6.1.

BTW, I am trying to build a Juju Charm for automating the installation of Gnocchi.
A beta version is available as cs:~consortium-garr/gnocchi.
If I make it work it might useful for others.

--

> On 08 mag 2017, at 16:22, Julien Danjou <email address hidden> wrote:
>
> What's your version of tooz and psycopg2?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1689211
>
> Title:
> unable to start coordinator
>
> Status in Gnocchi:
> New
>
> Bug description:
> $ sudo -H gnocchi-upgrade --config-file gnocchi.conf
> sudo: unable to resolve host juju-0bd5ff-default-4
> 2017-05-08 00:10:22.051 26637 INFO gnocchi.cli [-] Upgrading indexer <gnocchi.indexer.sqlalchemy.SQLAlchemyIndexer object at 0x7ff6b9ed1208>
> 2017-05-08 00:10:22.067 26637 INFO alembic.runtime.migration [-] Context impl PostgresqlImpl.
> 2017-05-08 00:10:22.067 26637 INFO alembic.runtime.migration [-] Will assume transactional DDL.
> 2017-05-08 00:10:22.079 26637 INFO alembic.runtime.migration [-] Context impl PostgresqlImpl.
> 2017-05-08 00:10:22.079 26637 INFO alembic.runtime.migration [-] Will assume transactional DDL.
> 2017-05-08 00:10:22.110 26637 ERROR gnocchi.utils [-] Unable to start coordinator: OperationalError: invalid connection option "username"
> 2017-05-08 00:10:23.112 26637 ERROR gnocchi.utils [-] Unable to start coordinator: OperationalError: invalid connection option "username"
>
> This is on Ubuntu 16.04 with this gnocchi.conf:
>
> [DEFAULT]
> [api]
> [archive_policy]
> [cors]
> [cors.subdomain]
> [database]
> [healthcheck]
> [incoming]
> file_basepath = /var/lib/gnocchi
> [indexer]
> url = 'postgresql://juju_gnocchi:h66cr3KG6TxBK58yrFWbxLBszdVKbSVCpKyMy6f@192.168.250.178:5432/gnocchi'
> [metricd]
> [oslo_middleware]
> [oslo_policy]
> [statsd]
> [storage]
> driver = file
> file_basepath = /var/lib/gnocchi
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/gnocchi/+bug/1689211/+subscriptions

Revision history for this message
Julien Danjou (jdanjou) wrote :

I think you need to upgrade to psycopg2 >= 2.7. Can you give it a try and tell me if it works better?

affects: gnocchi → python-tooz
Revision history for this message
Giuseppe Attardi (giuseppe.attardi) wrote : Re: [Bug 1689211] Re: unable to start coordinator

No difference:

$ pip show psycopg2
Name: psycopg2
Version: 2.7.1
$ gnocchi-upgrade --config-file gnocchi.conf
2017-05-08 20:55:54.632 17729 INFO gnocchi.cli [-] Upgrading indexer <gnocchi.indexer.sqlalchemy.SQLAlchemyIndexer object at 0x7f0a5503d7f0>
2017-05-08 20:55:54.650 17729 INFO alembic.runtime.migration [-] Context impl PostgresqlImpl.
2017-05-08 20:55:54.650 17729 INFO alembic.runtime.migration [-] Will assume transactional DDL.
2017-05-08 20:55:54.661 17729 INFO alembic.runtime.migration [-] Context impl PostgresqlImpl.
2017-05-08 20:55:54.662 17729 INFO alembic.runtime.migration [-] Will assume transactional DDL.
2017-05-08 20:55:54.691 17729 ERROR gnocchi.utils [-] Unable to start coordinator: ProgrammingError: invalid dsn: invalid connection option "username"

> On 08 mag 2017, at 20:05, Julien Danjou <email address hidden> wrote:
>
> I think you need to upgrade to psycopg2 >= 2.7. Can you give it a try
> and tell me if it works better?
>
> ** Project changed: gnocchi => python-tooz
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1689211
>
> Title:
> unable to start coordinator
>
> Status in tooz:
> New
>
> Bug description:
> $ sudo -H gnocchi-upgrade --config-file gnocchi.conf
> sudo: unable to resolve host juju-0bd5ff-default-4
> 2017-05-08 00:10:22.051 26637 INFO gnocchi.cli [-] Upgrading indexer <gnocchi.indexer.sqlalchemy.SQLAlchemyIndexer object at 0x7ff6b9ed1208>
> 2017-05-08 00:10:22.067 26637 INFO alembic.runtime.migration [-] Context impl PostgresqlImpl.
> 2017-05-08 00:10:22.067 26637 INFO alembic.runtime.migration [-] Will assume transactional DDL.
> 2017-05-08 00:10:22.079 26637 INFO alembic.runtime.migration [-] Context impl PostgresqlImpl.
> 2017-05-08 00:10:22.079 26637 INFO alembic.runtime.migration [-] Will assume transactional DDL.
> 2017-05-08 00:10:22.110 26637 ERROR gnocchi.utils [-] Unable to start coordinator: OperationalError: invalid connection option "username"
> 2017-05-08 00:10:23.112 26637 ERROR gnocchi.utils [-] Unable to start coordinator: OperationalError: invalid connection option "username"
>
> This is on Ubuntu 16.04 with this gnocchi.conf:
>
> [DEFAULT]
> [api]
> [archive_policy]
> [cors]
> [cors.subdomain]
> [database]
> [healthcheck]
> [incoming]
> file_basepath = /var/lib/gnocchi
> [indexer]
> url = 'postgresql://juju_gnocchi:h66cr3KG6TxBK58yrFWbxLBszdVKbSVCpKyMy6f@192.168.250.178:5432/gnocchi'
> [metricd]
> [oslo_middleware]
> [oslo_policy]
> [statsd]
> [storage]
> driver = file
> file_basepath = /var/lib/gnocchi
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/python-tooz/+bug/1689211/+subscriptions

Revision history for this message
Julien Danjou (jdanjou) wrote :

Ok, it seems to be a regression. Can you give a try to the patch https://review.openstack.org/463382 ?

Changed in python-tooz:
assignee: nobody → Julien Danjou (jdanjou)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tooz (master)

Reviewed: https://review.openstack.org/463382
Committed: https://git.openstack.org/cgit/openstack/tooz/commit/?id=c9421c62692072f33e05c64ff068eb48388d66dd
Submitter: Jenkins
Branch: master

commit c9421c62692072f33e05c64ff068eb48388d66dd
Author: Julien Danjou <email address hidden>
Date: Mon May 8 14:03:53 2017 -0400

    Fix psycopg2 connection argument

    commit 6eea97c3efe6dee6c2c036a581354aaa9b8ef5fa modified the kwarg from "user"
    to "username" by mistake.

    Change-Id: Idfe8425d08c065ef19e8952e8fcb205779243a99
    Closes-Bug: #1689211

Changed in python-tooz:
status: In Progress → Fix Released
Revision history for this message
Giuseppe Attardi (giuseppe.attardi) wrote :

That fixes it.
Thank you.

Revision history for this message
Giuseppe Attardi (giuseppe.attardi) wrote :

I have release a Juju Charm for the deployment of Gnocchi that includes the patch at:

    cs:~c-garr/gnocchi

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tooz 1.56.1

This issue was fixed in the openstack/tooz 1.56.1 release.

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.