ansible-galaxy icon indicating copy to clipboard operation
ansible-galaxy copied to clipboard

Ancillary config files are incorrectly configured by default

Open pvanheus opened this issue 3 years ago • 2 comments

The changes to how job metrics, dependency resolvers and container resolvers are configured introduced by https://github.com/galaxyproject/ansible-galaxy/pull/133 result in incorrect config in the default case.

What I mean by that is that if, for example, I do not set the galaxy_job_metrics_plugins variable, I get a line in my galaxy.yml like:

job_metrics_config_file: /galaxy_dir/config/job_metrics.conf.xml

and then /galaxy_dir/config/job_metrics.conf.xml is non-existent with the result that Galaxy will now start up with no job metrics config whatsoever, possibly triggering this bug: https://github.com/galaxyproject/galaxy/issues/14557

pvanheus avatar Aug 31 '22 20:08 pvanheus

Also worth noting that Galaxy in its default configuration would load the core plugin, and this I believe prevents that.

natefoo avatar Aug 31 '22 20:08 natefoo

Also worth noting that Galaxy in its default configuration would load the core plugin, and this I believe prevents that.

Exactly. So the behaviour that is wanted is that:

  1. if the user sets galaxy_job_metrics_plugins a yaml file is generated with the appropriate configuration.
  2. if the user sets job_metrics_config_file in their galaxy_config then that value is respected (I think that this should already be the case because the issue noted above impacts the Ansible defaults.
  3. if the user sets neither, the job_metrics_config_file is either not set (preferable) or points to a sample config that maintains the Galaxy default behaviour. I'm not sure how to do this in Ansible - one might need conditionally set config variables that get merged into a final set of defaults.

pvanheus avatar Sep 01 '22 05:09 pvanheus