quattor / CCM

Configuration Cache Manager
www.quattor.org
Other
4 stars 13 forks source link

ccm-purge always removes profiles cached under /var/lib/ccm/data #124

Closed gombasg closed 5 years ago

gombasg commented 8 years ago

There seems to be a misunderstanding between ccm-purge and the CCM library about the contents of /var/lib/ccm/data. src/main/perl/Fetch/Download.pm contains:

my $cache = join("/", $self->{CACHE_ROOT}, $DATA_DN, $self->EncodeURL($url));

where ->EncodeURL() is basically BASE64.

But ccm-purge thinks:

$url = read_url("${CacheDir}/${profile}/profile.url");
$md5 = md5_hex($url);
delete($NonactiveURL{$md5});

Since BASE64 and MD5 does not return the same result, ccm-purge always removes all cached profiles.

gombasg commented 8 years ago

This issue combined with #123 means profile changes which are compiled between ccm-purge and the next regular ccm-fetch are not getting applied.

jrha commented 5 years ago

Fixed by #199.