galaxyproject / ansible-galaxy

An Ansible role for managing a Galaxy server
https://galaxy.ansible.com/galaxyproject/galaxy
57 stars 75 forks source link

Ancillary config files are incorrectly configured by default #168

Open pvanheus opened 2 years ago

pvanheus commented 2 years ago

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

natefoo commented 2 years ago

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

pvanheus commented 2 years ago

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.