cloudbase / garm-provider-openstack

Garm external provider for OpenStack
https://github.com/cloudbase/garm-provider-openstack
Apache License 2.0
2 stars 3 forks source link

cloud_name should be configurable in provider config #1

Open maigl opened 1 year ago

maigl commented 1 year ago

Hi,

finally I had some time to try out the new provider..

One small finding is that I would love to be able to configure the cloud name in the provider config. We do configure multiple clouds (and even multiple regions) in our clouds.yaml. You explicitly state that one cannot overwrite that:

# This option can NOT be overwritten using extra_specs.
cloud = "my_cloud"

.. but it would be very convenient for us to be able to change this via the extra specs. Ideally, we could overwrite cloud and region.

Michael Kuhnt michael.kuhnt@mercedes-benz.com Mercedes-Benz Tech Innovation GmbH (ProviderInformation)

gabriel-samfira commented 1 year ago

Hi @maigl !

The reason this was made a static config value is because (accidentally) changing it will cause garm to loose track of existing runners. When it tries to consolidate, it will notice they are gone from the provider, but are somehow still active in github.

It may cause confusion during debug and lingering resources. If the runner gets consumed by gthub, garm will think it's already gone and will stay on the provider in the previously configured cloud and region.

This option can be made configurable, but that flexibility comes with a huge warning.

maigl commented 1 year ago

okay .. understood. My alternative is to have different but very similar provider configs for each cloud/region.

But if I change the value in this config the effect would probably be the same, right?

gabriel-samfira commented 1 year ago

Yes. It's just a bit more annoying to do, and less of a chance to change it by mistake :smile:. This was a "best judgement" call, but I am not rigid on the matter. If it helps UX, I am all for making this configurable, given that we add warnings making it clear what would happen if this changed.

gabriel-samfira commented 1 year ago

Will add that customization as soon as time permits. Should be relatively straight forward.