You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've a production Chef-infra where an 'export' is produced.
On a new Chef-infra (that will eventually replace our old production Chef-Infra) we are wanting to 'import' to this new server and this works OK.
Since our old Chef-Infra server is 3 years old, it has a LOT of old and unused cookbook versions we'd like to remove/clean up so we want to run 'tidy' to remove unneeded cookbooks.
Unfortunately, required/used cookbook versions are being removed.
Steps to Reproduce:
On our new Chef-infra server the 'export' from our current Chef-infra is placed in /tmp/export.
We then run:
/usr/bin/knife tidy server clean --backup-path /tmp/reports --yes
and required cookbook versions get removed.
Expected Result:
We have environments pinned to certain roles which contain absolute pinnings for all included cookbooks.
All of our nodes are assigned a role and an environment, so the environment pinning points to a specific role version which in turn points to specific cookbook versions.
When I look at /tmp/reports/ORG_unused_cookbooks.json I see, for example, that for 'windows' it is saying that version '5.3.1' is OK to delete even though we've a role cookbook with absolute pinnings requiring this version.
As a workaround, I can edit /tmp/reports/ORG_unused_cookbooks.json removing 5.3.1 from the 'windows' list, but I shouldn't have to do this.
Actual Result:
Required and needed versions or cookbooks are deleted.
The text was updated successfully, but these errors were encountered:
I ran into this issue as well and suspect it was the feature that added keep_versions. It looks like line 85 of tidy_server_report.rb used_cookbooks = keep_cookbook_versions(cb_list, keep_versions) resets used_cookbooks using the list of call cookbooks ignoring all of the node data.
Version:
2.1.0
Environment:
Amazon Linux AMI
4.14.181-140.257.amzn2.x86_64
Scenario:
We've a production Chef-infra where an 'export' is produced.
On a new Chef-infra (that will eventually replace our old production Chef-Infra) we are wanting to 'import' to this new server and this works OK.
Since our old Chef-Infra server is 3 years old, it has a LOT of old and unused cookbook versions we'd like to remove/clean up so we want to run 'tidy' to remove unneeded cookbooks.
Unfortunately, required/used cookbook versions are being removed.
Steps to Reproduce:
On our new Chef-infra server the 'export' from our current Chef-infra is placed in /tmp/export.
We then run:
and required cookbook versions get removed.
Expected Result:
We have environments pinned to certain roles which contain absolute pinnings for all included cookbooks.
All of our nodes are assigned a role and an environment, so the environment pinning points to a specific role version which in turn points to specific cookbook versions.
When I look at /tmp/reports/ORG_unused_cookbooks.json I see, for example, that for 'windows' it is saying that version '5.3.1' is OK to delete even though we've a role cookbook with absolute pinnings requiring this version.
As a workaround, I can edit /tmp/reports/ORG_unused_cookbooks.json removing 5.3.1 from the 'windows' list, but I shouldn't have to do this.
Actual Result:
Required and needed versions or cookbooks are deleted.
The text was updated successfully, but these errors were encountered: