Storage filter name fails with puppetdb.

Bug #1252998 reported by Sofer Athlan-Guyot
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet-swift
Fix Released
Undecided
Sofer Athlan-Guyot
Havana
Fix Released
Undecided
Unassigned

Bug Description

While using puppet client/server 3.3.2 with puppetdb 1.5.2 on debian wheezy I bump into this regression from a puppet 2.7 without puppetdb on the same os release:

err: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid relationship: Concat::Fragment[swift-account-6002] { before => Swift::Storage::Filter::healthcheck[account] }, because Swift::Storage::Filter::healthcheck[account] doesn't seem to be in the correct format. Resource references should be formatted as: Classname['title'] or Modulename::Classname['title'] (take careful note of the capitalization).
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run

The problem comes from this https://github.com/kbarber/puppetdb/commit/2c9e822a994db393ba0380b7a3be7e8a25a006b0 which is related to this http://projects.puppetlabs.com/issues/19474. (The Barber's puppetdb commit was included into puppetdb there https://github.com/puppetlabs/puppetdb/pull/455)

To sum up, puppetdb's parser is stricter about how one can named resources constraint (before, require, notify) than the puppet's parser.

In the previous error it should be:

 before => Swift::Storage::Filter::Healthcheck[account]

instead of

 before => Swift::Storage::Filter::healthcheck[account]

beware of the capitalization.

Changed in puppet-swift:
assignee: nobody → Athlan-Guyot sofer (sofer-athlan-guyot)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-swift (master)

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

Changed in puppet-swift:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-swift (master)

Reviewed: https://review.openstack.org/57393
Committed: http://github.com/stackforge/puppet-swift/commit/3566f9fa651d8e50a81a3bcb042beb126da46f3d
Submitter: Jenkins
Branch: master

commit 3566f9fa651d8e50a81a3bcb042beb126da46f3d
Author: Sofer Athlan-Guyot <email address hidden>
Date: Wed Nov 20 03:37:58 2013 -0500

    Fix filter name for puppetdb

    When creating the filter class name the last part is not capitalized.
    So Swift::Storage::Filter::Healthcheck[bla] is named
    Swift::Storage::Filter::healthcheck[bla]. Puppet don't detect the
    syntax error as the resource is "created" within a string. But
    puppetdb's parser do not let this work.

    This fix it and adjust the tests.

    Change-Id: If11c3ad0e98d14b9387b3daa4afeb118387100f8
    Closes-Bug: #1252998

Changed in puppet-swift:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-swift (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/65313

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-swift (stable/havana)

Reviewed: https://review.openstack.org/65313
Committed: https://git.openstack.org/cgit/stackforge/puppet-swift/commit/?id=19baf012b4ab08ef66fc37687f55f6caaa01644a
Submitter: Jenkins
Branch: stable/havana

commit 19baf012b4ab08ef66fc37687f55f6caaa01644a
Author: Sofer Athlan-Guyot <email address hidden>
Date: Wed Nov 20 03:37:58 2013 -0500

    Fix filter name for puppetdb

    When creating the filter class name the last part is not capitalized.
    So Swift::Storage::Filter::Healthcheck[bla] is named
    Swift::Storage::Filter::healthcheck[bla]. Puppet don't detect the
    syntax error as the resource is "created" within a string. But
    puppetdb's parser do not let this work.

    This fix it and adjust the tests.

    Change-Id: If11c3ad0e98d14b9387b3daa4afeb118387100f8
    Closes-Bug: #1252998
    (cherry picked from commit 3566f9fa651d8e50a81a3bcb042beb126da46f3d)

tags: added: in-stable-havana
Mathieu Gagné (mgagne)
Changed in puppet-swift:
milestone: none → 3.0.0
Mathieu Gagné (mgagne)
Changed in puppet-swift:
milestone: 3.0.0 → none
Mathieu Gagné (mgagne)
Changed in puppet-swift:
milestone: none → 4.0.0
status: Fix Committed → Fix Released
Revision history for this message
Mark Kirkwood (mark-kirkwood) wrote :

With this patch applied (using 4.1.0), I get:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid relationship: Concat::Fragment[swift-account-6002] { before => Swift::Storage::Filter::Healthcheck[account] }, because Swift::Storage::Filter::Healthcheck[account] doesn't seem to be in the catalog
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Yet the relevant file with the healthcheck define exists.

I did wonder if this was merely a namespace clash with your Pofiles::Swift classes, however renaming this to Profiles::Swiftx did not change the above error...

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.