storage-node.pp fails to pass swift zone in puppet 3.x

Bug #1190459 reported by Simon Sellar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet-openstack
Fix Released
Undecided
Unassigned

Bug Description

The following code uses $swift_zone instead of $zone from the definition.

This causes an empty string to be used in puppet 3, probably due to new variable scoping.

  define device_endpoint ($swift_local_net_ip, $zone, $weight) {
    @@ring_object_device { "${swift_local_net_ip}:6000/${name}":
      zone => $swift_zone,
      weight => $weight,
    }
    @@ring_container_device { "${swift_local_net_ip}:6001/${name}":
      zone => $swift_zone,
      weight => $weight,
    }
    @@ring_account_device { "${swift_local_net_ip}:6002/${name}":
      zone => $swift_zone,
      weight => $weight,
    }
  }

I have a patch ready to submit that works

Revision history for this message
Simon Sellar (simon-sellar-o) wrote :
description: updated
Revision history for this message
Simon Sellar (simon-sellar-o) wrote :

Please ignore the patch at comment 1, I have now submitted to https://review.openstack.org/#/c/32996/

No rspec available as exported resources don't seem to be able to be checked.

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

Reviewed: https://review.openstack.org/32996
Committed: http://github.com/stackforge/puppet-openstack/commit/296679e6abfb91277bc7ab7aa3ebe310d605e228
Submitter: Jenkins
Branch: master

commit 296679e6abfb91277bc7ab7aa3ebe310d605e228
Author: Simon Sellar <email address hidden>
Date: Fri Jun 14 14:52:39 2013 +0930

    Storage node now uses local zone variable name.

    Puppet 3 scoping changes mean that the exported resources cannot see
    the parent scope $swift_zone variable, and must instead use the $zone
    variable passed to the device_endpoint defined type.

    Change-Id: I9780065c535da713c6d1d4a156f5d688e0ab9c63
    Fixes: bug #1190459

Changed in puppet-openstack:
status: New → Fix Committed
Mathieu Gagné (mgagne)
Changed in puppet-openstack:
status: Fix Committed → Fix Released
Mathieu Gagné (mgagne)
Changed in puppet-openstack:
milestone: none → 2.0.0
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.