Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

values for OpenStack charm options openstack-origin and source are not validated #652

Open
pmatulis opened this issue Nov 12, 2021 · 1 comment

Comments

@pmatulis
Copy link

pmatulis commented Nov 12, 2021

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).

@pmatulis 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
@ajkavanagh
Copy link
Contributor

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.

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

No branches or pull requests

2 participants