Duplicate declaration: Database_user[keystone@127.0.0.1] is already declared

Bug #1206444 reported by Xingchao Yu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet-ceilometer
Fix Released
Undecided
Unassigned
puppet-cinder
Fix Released
Undecided
Unassigned
puppet-glance
Fix Released
Undecided
Unassigned
puppet-heat
Fix Released
Undecided
Unassigned
puppet-keystone
Fix Released
Undecided
Unassigned
puppet-neutron
Fix Released
Undecided
Unassigned
puppet-nova
Fix Released
Undecided
Unassigned

Bug Description

When use the default value of allowed_hosts in openstack:all and openstack::controller, the puppet will complain:
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Database_user[glance@127.0.0.1] is already declared; cannot redeclare at /etc/puppet/modules/production/glance/manifests/db/mysql/host_access.pp:9 on node m1.novalocal
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run

The reason is the Database_user[xxx@127.0.0.1] has been created when the default db is created. So there needs a condition to decide not to add hosts when $hosts's value in $allowed_hosts.

Xingchao Yu (yuxcer)
Changed in puppet-openstack:
assignee: nobody → Yuxingchao (yuxcer)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-nova (master)

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

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

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

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

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

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

Reviewed: https://review.openstack.org/39263
Committed: http://github.com/stackforge/puppet-glance/commit/aee08d0cbbf3f8c13040dbf6abc652f678b88f37
Submitter: Jenkins
Branch: master

commit aee08d0cbbf3f8c13040dbf6abc652f678b88f37
Author: Xingchao Yu <email address hidden>
Date: Tue Jul 30 19:04:34 2013 +0800

    Update allowed_hosts conditional statement

    In the origin glance::db::mysql, if the value of $allowed_hosts
    contains or equals to $host, then puppet will complain duplicate
    declaration error. This patch is aim to update the allowed_hosts
    conditonal statement in glance::db::mysql.

    There are two cases to pass $allowed_hosts to $real_allowed_hosts:

       - If $allowed_hosts is array,then remove $host from $allowed_hosts;
       - elsif $allowed_hosts is string and not equivalent to $host;

    At last, if $real_allowed_hosts is not undef, then run
    glance::db::mysql::host_access

    Fix bug 1206444

    Change-Id: Ic70aaaec493195c7277782abb87469f9809e5baa

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

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

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

Reviewed: https://review.openstack.org/39261
Committed: http://github.com/stackforge/puppet-cinder/commit/e7657de5ba6d7c2c122e1bc99598683f4a7021f3
Submitter: Jenkins
Branch: master

commit e7657de5ba6d7c2c122e1bc99598683f4a7021f3
Author: Xingchao Yu <email address hidden>
Date: Tue Jul 30 18:51:05 2013 +0800

    Update allowed_hosts conditional statement

    In the origin cinder::db::mysql, if the value of $allowed_hosts
    contains or equals to $host, then puppet will complain duplicate
    declaration error. This patch is aim to update the allowed_hosts
    conditonal statement in cinder::db::mysql.

    There are two cases to pass $allowed_hosts to $real_allowed_hosts:

       - If $allowed_hosts is array,then remove $host from $allowed_hosts;
       - elsif $allowed_hosts is string and not equivalent to $host;

    At last, if $real_allowed_hosts is not undef, then run
    cinder::db::mysql::host_access

    Fix bug 1206444
    Change-Id: I7eb9d883c1617d9913899f32ef47a892c1d9a1a2

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

Reviewed: https://review.openstack.org/39260
Committed: http://github.com/stackforge/puppet-nova/commit/e8cebd12f385cda9dfedf97b0c6b0e25e5bf7198
Submitter: Jenkins
Branch: master

commit e8cebd12f385cda9dfedf97b0c6b0e25e5bf7198
Author: Xingchao Yu <email address hidden>
Date: Tue Jul 30 18:40:19 2013 +0800

    Update allowed_hosts conditional statement

    In the origin nova::db::mysql, if the value of $allowed_hosts
    contains or equals to $host, then puppet will complain duplicate
    declaration error. This patch is aim to update the allowed_hosts
    conditonal statement in nova::db::mysql.

    There are two cases to pass $allowed_hosts to $real_allowed_hosts:

       - If $allowed_hosts is array,then remove $host from $allowed_hosts;
       - elsif $allowed_hosts is string and not equivalent to $host;

    At last, if $real_allowed_hosts is not undef, then run
    nova::db::mysql::host_access

    Fix bug 1206444
    Change-Id: If018321095e62e1196e0c2e6b623b30acb535020

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

Reviewed: https://review.openstack.org/39256
Committed: http://github.com/stackforge/puppet-keystone/commit/49b248344f40d61ae7467f1f35547e39d66517ed
Submitter: Jenkins
Branch: master

commit 49b248344f40d61ae7467f1f35547e39d66517ed
Author: Xingchao Yu <email address hidden>
Date: Tue Jul 30 18:03:22 2013 +0800

    Update allowed_hosts conditional statement

    In the origin keystone::db::mysql, if the value of $allowed_hosts
    contains or equals to $host, then puppet will complain duplicate
    declaration error. This patch is aim to update the allowed_hosts
    conditonal statement in keystone::db::mysql.

    There are two cases to pass $allowed_hosts to $real_allowed_hosts:

       - If $allowed_hosts is array,then remove $host from $allowed_hosts;
       - elsif $allowed_hosts is string and not equivalent to $host;

    At last, if $real_allowed_hosts is not undef, then run
    keystone::db::mysql::host_access

    Fix bug 1206444

    Change-Id: I8701aea9344a9151ce3d7ac8fa5792895a5aac6c

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

Reviewed: https://review.openstack.org/39639
Committed: http://github.com/stackforge/puppet-quantum/commit/af3982695f0162f7587b7279df66fbe158817705
Submitter: Jenkins
Branch: master

commit af3982695f0162f7587b7279df66fbe158817705
Author: Xingchao Yu <email address hidden>
Date: Thu Aug 1 15:04:58 2013 +0800

    Update allowed_hosts conditional statement

    In the origin quantum::db::mysql, if the value of $allowed_hosts
    contains or equals to $host, then puppet will complain duplicate
    declaration error. This patch is aim to update the allowed_hosts
    conditonal statement in quantum::db::mysql.

    There are two cases to pass $allowed_hosts to $real_allowed_hosts:

       - If $allowed_hosts is array,then remove $host from $allowed_hosts;
       - elsif $allowed_hosts is string and not equivalent to $host;

    At last, if $real_allowed_hosts is not undef, then run
    quantum::db::mysql::host_access

    Fix bug 1206444

    Change-Id: I4c7aef5b7c002c799e8c78fc45dfc3362d41d6ee

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

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

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

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

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

Reviewed: https://review.openstack.org/40099
Committed: http://github.com/stackforge/puppet-ceilometer/commit/10107796ff2751da858a4616f97e6e3166ec40a8
Submitter: Jenkins
Branch: master

commit 10107796ff2751da858a4616f97e6e3166ec40a8
Author: Xingchao Yu <email address hidden>
Date: Sun Aug 4 17:09:06 2013 +0800

    Update mysql allowed_hosts conditional statement

    In the origin ceilometer::db::mysql, if the value of $allowed_hosts
    contains or equals to $host, then puppet will complain duplicate
    declaration error. This patch is aim to update the allowed_hosts
    conditonal statement in ceilometer::db::mysql.

    There are two cases to pass $allowed_hosts to $real_allowed_hosts:

       - If $allowed_hosts is array,then remove $host from $allowed_hosts;
       - elsif $allowed_hosts is string and not equivalent to $host;

    At last, if $real_allowed_hosts is not undef, then run
    ceilometer::db::mysql::host_access

    Fix bug 1206444

    Change-Id: Ib6c33e6a27113d01326bee32c105fea4003059ce

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

Reviewed: https://review.openstack.org/40165
Committed: http://github.com/stackforge/puppet-heat/commit/e9e261be3bbff99ae95786e9b2089712bfc03eb4
Submitter: Jenkins
Branch: master

commit e9e261be3bbff99ae95786e9b2089712bfc03eb4
Author: Xingchao Yu <email address hidden>
Date: Sun Aug 4 17:57:42 2013 +0800

    Update allowed_hosts conditional statement

    In the origin heat::db::mysql, if the value of $allowed_hosts
    contains or equals to $host, then puppet will complain duplicate
    declaration error. This patch is aim to update the allowed_hosts
    conditonal statement in heat::db::mysql.

    There are two cases to pass $allowed_hosts to $real_allowed_hosts:

       - If $allowed_hosts is array,then remove $host from $allowed_hosts;
       - elsif $allowed_hosts is string and not equivalent to $host;

    At last, if $real_allowed_hosts is not undef, then run
    heat::db::mysql::host_access

    Add heat_db_mysql_spec for related test.

    Fix bug 1206444

    Change-Id: Iac6a32fb614c9ad19f9eaa3aaa883cb3bf9aa2ef

Mathieu Gagné (mgagne)
Changed in puppet-ceilometer:
status: New → Fix Committed
Changed in puppet-cinder:
status: New → Fix Committed
Changed in puppet-glance:
status: New → Fix Committed
Changed in puppet-heat:
status: New → Fix Committed
Changed in puppet-keystone:
status: New → Fix Committed
Changed in puppet-neutron:
status: New → Fix Committed
Changed in puppet-nova:
status: New → Fix Committed
no longer affects: puppet-openstack
Mathieu Gagné (mgagne)
Changed in puppet-neutron:
milestone: none → 2.1.1
Changed in puppet-cinder:
milestone: none → 2.1.0
Mathieu Gagné (mgagne)
Changed in puppet-glance:
milestone: none → 2.1.0
Changed in puppet-keystone:
milestone: none → 2.1.0
Mathieu Gagné (mgagne)
Changed in puppet-nova:
milestone: none → 2.1.0
Mathieu Gagné (mgagne)
Changed in puppet-cinder:
status: Fix Committed → Fix Released
Changed in puppet-glance:
status: Fix Committed → Fix Released
Changed in puppet-keystone:
status: Fix Committed → Fix Released
Changed in puppet-neutron:
status: Fix Committed → Fix Released
Changed in puppet-nova:
status: Fix Committed → Fix Released
Mathieu Gagné (mgagne)
Changed in puppet-heat:
milestone: none → 3.0.0-rc2
status: Fix Committed → Fix Released
Changed in puppet-ceilometer:
milestone: none → 3.0.0-rc2
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.