From a0ebb8d35e41bae075a0762b7002bc4e6a2b6269 Mon Sep 17 00:00:00 2001 From: MostafaTarek124eru <48182100+MostafaTarek124eru@users.noreply.github.com> Date: Mon, 3 Feb 2025 22:03:51 +0200 Subject: [PATCH] fix: correct the path for Chef's cache (#5994) Corrected the path for chef cache in cc_chef, schema-cloud-config-v1, and test_cc_chef. Reference:https://github.com/canonical/cloud-init/commit/a0ebb8d35e41bae075a0762b7002bc4e6a2b6269 Conflict:not change schema-cloud-config-v1.json and .github-cla-signers Fixes GH-5090 --- cloudinit/config/cc_chef.py | 4 ++-- tests/unittests/config/test_cc_chef.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cloudinit/config/cc_chef.py b/cloudinit/config/cc_chef.py index 6aa2836..58293a7 100644 --- a/cloudinit/config/cc_chef.py +++ b/cloudinit/config/cc_chef.py @@ -29,7 +29,7 @@ CHEF_DIRS = tuple( "/etc/chef", "/var/log/chef", "/var/lib/chef", - "/var/cache/chef", + "/var/chef/cache", "/var/backups/chef", "/var/run/chef", ] @@ -58,7 +58,7 @@ CHEF_RB_TPL_DEFAULTS = { "validation_cert": None, "client_key": "/etc/chef/client.pem", "json_attribs": CHEF_FB_PATH, - "file_cache_path": "/var/cache/chef", + "file_cache_path": "/var/chef/cache", "file_backup_path": "/var/backups/chef", "pid_file": "/var/run/chef/client.pid", "show_time": True, diff --git a/tests/unittests/config/test_cc_chef.py b/tests/unittests/config/test_cc_chef.py index 6fad6a7..f3e4ad9 100644 --- a/tests/unittests/config/test_cc_chef.py +++ b/tests/unittests/config/test_cc_chef.py @@ -150,7 +150,7 @@ class TestChef(FilesystemMockingTestCase): environment "_default" node_name "iid-datasource-none" json_attribs "/etc/chef/firstboot.json" - file_cache_path "/var/cache/chef" + file_cache_path "/var/chef/cache" file_backup_path "/var/backups/chef" pid_file "/var/run/chef/client.pid" Chef::Log::Formatter.show_time = true -- 2.33.0