[common] Chef Infra Client 16.2 does not compile resources

Bug #1886985 reported by Henrique Santos
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack + Chef
Fix Released
Undecided
Lance Albertson

Bug Description

Due to a breaking change in Chef Infra Client 16.2, resource names need to be defined with the "provides" method. From https://docs.chef.io/release_notes/#breaking-change-in-resources :
"
Previously you could set a custom name for a resource via resource_name and under the hood this would also magically set the provides for the resource. Magic is great when it works, but is confusing when it doesn’t. We’ve decided to remove some of this magic and instead rely on more explicit provides statements in resources. For cookbooks that support just Chef Infra Client 16 and later, you should change any resource_name calls to provides instead. If you need to support older releases of Chef Infra Client as well as 16+, you’ll want to include both resource_name and provides for full compatibility.
"

Therefore this "openstack-common" cookbook contains resources that are not compatible with Chef Infra Client >16.2. Possibly there are other OpenStack cookbooks with the same issue, I will review some and create a new related bug report.

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

Fix proposed to branch: master
Review: https://review.opendev.org/740342

Changed in openstack-chef:
assignee: nobody → Henrique Santos (hsantos25)
status: New → In Progress
Changed in openstack-chef:
assignee: Henrique Santos (hsantos25) → Lance Albertson (lance-osuosl)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cookbook-openstack-common (master)

Reviewed: https://review.opendev.org/740342
Committed: https://git.openstack.org/cgit/openstack/cookbook-openstack-common/commit/?id=455790e1e9c3badab13138f646b30def8aae2df6
Submitter: Zuul
Branch: master

commit 455790e1e9c3badab13138f646b30def8aae2df6
Author: Henrique Santos <email address hidden>
Date: Thu Jul 9 18:24:04 2020 +0100

    Adds provides method to define name of resources

    In Chef Infra Client 16.2, resources have to be named using the provides
    method. The resource_name method has not been changed in order to be
    compatible with Chef Infra Client <16.2.

    Also fix URI.encode and URI.decode deprecations.

    Update etcd depends to ~> 6.0 to fix Chef 16 deprecation warnings.

    Depends-On: https://review.opendev.org/747503
    Change-Id: I24be89a3214207bac2df9eb360124871e0d8242f
    Closes-Bug: #1886985
    Signed-off-by: Henrique Santos <email address hidden>
    Signed-off-by: Lance Albertson <email address hidden>

Changed in openstack-chef:
status: In Progress → 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.