[all] CHEF 3694 WARN: Cloning resource attributes for . from prior resource
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack + Chef |
Fix Released
|
Low
|
Mark Vanderwiel |
Bug Description
There are server places where this warning occurs during a basic all-in-one cookbook deploy. Of those, several cases are easily fixable:
Case 1: resource is re-declared when it should be looked up instead:
Example: ops-database mysql-server recipe
WARN: Cloning resource attributes for mysql_service[
WARN: Previous mysql_service[
WARN: Current mysql_service[
Line 48 the mysql_service resource is defined, and then it's redefined on 64 causing the warning.
server_resource = mysql_service node['mysql'
Instead this should be looked up like this:
resources(
Case 2: resource has duplicate name, but it trying to do something different, reiterate the same execution, or same logical resource with possible different options.
WARN: Cloning resource attributes for mysql_database[
WARN: Previous mysql_database[
WARN: Current mysql_database[
Two flush operations are wanted, should be better named (pre/post?)
WARN: Cloning resource attributes for database_user[nova] from prior resource (CHEF-3694)
WARN: Previous database_
WARN: Current database_
Different user operations, create and grant, fix names
WARN: Cloning resource attributes for package[
WARN: Previous yum_package[
WARN: Current yum_package[
Same package installed from multiple resource declares. Can switch to make resource name specific to cookbook and use
package_name to specify package name.
Or if the cookbooks are dependent, the lower level on can do the install and the dependent one can assume it's being handled by the other.
Case 3: resource is used the same way by two different recipes in same cookbook
WARN: Cloning resource attributes for directory[
WARN: Previous directory[
WARN: Current directory[
This is a classic DRY bug that should be move into a common place. Either a common recipe or in the default recipe if needed by all the recipes.
Changed in openstack-chef: | |
status: | New → Confirmed |
importance: | Low → Medium |
Changed in openstack-chef: | |
status: | Confirmed → Triaged |
summary: |
- CHEF 3694 WARN: Cloning resource attributes for . from prior resource + [all] CHEF 3694 WARN: Cloning resource attributes for . from prior + resource |
Changed in openstack-chef: | |
status: | In Progress → Fix Released |
Changed in openstack-chef: | |
status: | In Progress → Fix Released |
Fix proposed to branch: master /review. openstack. org/146653
Review: https:/