Shard URI is not checked on creation

Bug #1258591 reported by Mike Panetta
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Allele Dev
Fix Released
Allele Dev

Bug Description

This makes it possible to add a bad or non-existent shard to the system causing errors later due to inability to contact the shard.

Changed in marconi:
status: New → Confirmed
Kurt Griffiths (kgriffs)
Changed in marconi:
importance: Undecided → Medium
Kurt Griffiths (kgriffs)
Changed in marconi:
milestone: none → icehouse-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to marconi (master)

Submitter: Jenkins
Branch: master

commit 280da9d054a521652e9a3c6cb95001fed2985eab
Author: Alejandro Cabrera <email address hidden>
Date: Tue Jan 21 16:13:23 2014 -0500

    fix(shards): guard against registering bad shard URIs

    Whenever an admin would attempt to register a new shard, the shard was
    admitted whether or not the shard URI actually existed, and whether or
    not marconi could handle shards of that type.

    This patch makes it so that a DataDriver instance is temporarily
    instantiated prior to storing the shard entry. This instance uses
    is_alive() to determine whether or not the shard can be reached/is
    supported. This applies to both PUT/PATCH. HTTP 400 is returned if the
    registration fails, as a result.

    To enable this change, the ability to create a dynamic configuration
    object was extracted from sharding.Catalog. Tests were written for
    this new function.

    The unit tests were updated accordingly, expanding the coverage of
    test_shards to include the new failure cases.

    Some changes needed to be made to handle new oslo.cache interface:
    - cache.unset doesn't exist - now using cache.unset_many
    - cache.get_cache() takes a URI, not a ConfigOpts

    Change-Id: I40509f525466da01baad2a5aef81c7b99c8d2f97
    Closes-Bug: #1258591
    Closes-Bug: #1273376
    Closes-Bug: #1273377

Changed in marconi:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in marconi:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in marconi:
milestone: icehouse-3 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers