Skip to content

mv quota_limit and cache_base to cvmfs_param#86

Open
gsaudade99 wants to merge 3 commits intogalaxyproject:mainfrom
gsaudade99:patch/defaults
Open

mv quota_limit and cache_base to cvmfs_param#86
gsaudade99 wants to merge 3 commits intogalaxyproject:mainfrom
gsaudade99:patch/defaults

Conversation

@gsaudade99
Copy link
Contributor

We noticed a small error in our recent additions. This will patch how default configuration values for quota limit and cache base are managed in the main.yml file. Instead of setting cvmfs_quota_limit and cvmfs_cache_base as top-level variables, their default values are now commented out and suggested within the cvmfs_params dictionary.

In this case we don't end-up with both alien cache base and quota_limit set and the default one.
We only want the alien cache in such case.

@gsaudade99
Copy link
Contributor Author

@kysrpex @mira-miracoli @cat-bro

Sorry for the oversight, can we have a new release?

@kysrpex
Copy link
Contributor

kysrpex commented Feb 19, 2026

I would definitely not do it like this, because it is not backwards-compatible and it will therefore break everyone's setup (probably many people for this role).

What about alternatives such as:

  • CVMFS_QUOTA_LIMIT= via cvmfs_quota_limit: "" (not sure if it works)
  • In the template, {% if cvmfs_quota_limit %}CVMFS_QUOTA_LIMIT="{{ cvmfs_quota_limit }}"{% endif %}
  • Or its stricter version, {% if cvmfs_quota_limit is defined %}CVMFS_QUOTA_LIMIT="{{ cvmfs_quota_limit }}"{% endif %}, considering that it is possible to undefine variables

@gsaudade99
Copy link
Contributor Author

You are probably right, but I see that the problem wouldn't be fixed. Before our patches the template was something along:

      CVMFS_QUOTA_LIMIT="{{ cvmfs_quota_limit | default('4000') }}"
      CVMFS_CACHE_BASE="{{ cvmfs_cache_base | default('/var/lib/cvmfs') }}"

Setting up to cvmfs_quota_limit: "" would effectively not work given that the quota_limit and cache_base would still be set no matter what.

I would suggest a major release with breaking changes. I want to believe most setups have the role pinned to a version...

@kysrpex
Copy link
Contributor

kysrpex commented Feb 19, 2026

First, you are not unsetting anything! Look in /etc/cvmfs/default.conf.


You are probably right, but I see that the problem wouldn't be fixed. Before our patches the template was something along:

      CVMFS_QUOTA_LIMIT="{{ cvmfs_quota_limit | default('4000') }}"
      CVMFS_CACHE_BASE="{{ cvmfs_cache_base | default('/var/lib/cvmfs') }}"

Setting up to cvmfs_quota_limit: "" would effectively not work given that the quota_limit and cache_base would still be set no matter what.

I don't see that in the template. Those defaults come from here. (edit: ok, I see you mean this). The default filter will respect empty strings (see here and here).

I would suggest a major release with breaking changes. I want to believe most setups have the role pinned to a version...

Breaking changes still requires effort everybody involved, if the role is pinned it's just deferred effort. Most people don't have an advanced setup like us with different cache managers and may even welcome the existence of cvmfs_quota_limit).

I don't see the value of requiring everyone to make a change just because we don't want to see a line that afaik doesn't even have an effect in one of our config files. I really don't see what is wrong with {% if cvmfs_quota_limit %}CVMFS_QUOTA_LIMIT="{{ cvmfs_quota_limit }}"{% endif %} or the stricter equivalent.

@cat-bro
Copy link

cat-bro commented Feb 19, 2026

I have an abandoned branch where I was adding an alien cache to one of AU’s pulsar clusters. The branch is abandoned but this is what I would have done for default.local:

       CVMFS_REPOSITORIES="{%- for repo in cvmfs_repositories -%}{{ ',' if loop.index0 > 0 else '' }}{{ repo.repository }}{%- endfor -%}"
       CVMFS_HTTP_PROXY="{{ cvmfs_http_proxies | join(';') }}"
+      {% if not cvmfs_alien_cache|d('') %}
       CVMFS_QUOTA_LIMIT="{{ cvmfs_quota_limit | default('4000') }}"
       CVMFS_CACHE_BASE="{{ cvmfs_cache_base | default('/var/lib/cvmfs') }}"
+      {% else %}
+      CVMFS_USE_ALIEN_CACHE=yes
+      CVMFS_SHARED_CACHE=no
+      CVMFS_QUOTA_LIMIT="-1"
+      CVMFS_ALIEN_CACHE="{{ cvmfs_alien_cache }}"
+      {% endif %}

@gsaudade99
Copy link
Contributor Author

gsaudade99 commented Feb 20, 2026

I know what do you mean... Long day yesterday and breaking stuff sounded good (:
Should be fine now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants