You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Values provided for OpenStack charm options openstack-origin and source are not validated. Please consider fixing this as it can save users a lot of time and frustration. At least the syntax should be covered ('cloud:<series>-<openstack>'), but ideally the embedded values should be compatible as well (e.g. the xenial series is incompatible with OpenStack release Victoria so a value of 'cloud:xenial-victoria' should not be allowed).
The text was updated successfully, but these errors were encountered:
pmatulis
changed the title
values for openstack charm options openstack-origin and source are not validated
values for OpenStack charm options openstack-origin and source are not validated
Nov 12, 2021
It's possible to validate it, although it would need to be done on a charm-by-charm basis to do the verification prior to the value (attempted to) being used. Otherwise, it's likely the charm would just crash. Note that openstack-origin and source can take a range of values as indicated in the add_source() function at: https://github.com/juju/charm-helpers/blob/master/charmhelpers/fetch/ubuntu.py#L614
@pmatulis The add_source() function can already raise SourceConfigError if an invalid source is provided. What would need to happen is to add a function to charm-helpers called something like validate_source() and use this from each charm's config-changed (or equivalent) function to validate the openstack-origin/source (or other config option) and switch the status to Blocked to indicate an invalid config. Thus, I suspect charm bugs also need to be raised.
Values provided for OpenStack charm options
openstack-origin
andsource
are not validated. Please consider fixing this as it can save users a lot of time and frustration. At least the syntax should be covered ('cloud:<series>-<openstack>'), but ideally the embedded values should be compatible as well (e.g. the xenial series is incompatible with OpenStack release Victoria so a value of 'cloud:xenial-victoria' should not be allowed).The text was updated successfully, but these errors were encountered: