image-volume-cache options incorrectly default to None and prevent startup
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Cinder Pure Storage Charm |
Fix Released
|
Undecided
|
Trent Lloyd |
Bug Description
The following image-volume-cache options get written to the configuration file with a value of "None" by default which fails to parse and cinder-volume won't start.
image_volume_
image_volume_
= Error Message =
2022-04-12 05:41:34.758 1194037 ERROR cinder.cmd.volume [req-UUID - - - - -] Volume service cinder-
2022-04-12 05:41:34.758 1194037 ERROR cinder.cmd.volume ValueError: invalid literal for int() with base 10: 'None'
= Cause =
This occurs because the config.yaml defaults are Null and config.get returns a value of "None" in such a case.
In most cases this pattenr works because values are only rendered in a template if they pass an "if VARIABLE_NAME" test which fails if it is None. However in this case the values are sent via relation to charm-cinder which then iterates on the list and renders them directly to the file without checking for a value of None.
= Workaround =
You can explicitly configure the values to 0 (which is the upstream default) to workaround the issue:
juju config cinder-purestorage image-volume-
Changed in charm-cinder-purestorage: | |
assignee: | nobody → Trent Lloyd (lathiat) |
status: | New → Confirmed |
Fix proposed to branch: master /review. opendev. org/c/openstack /charm- cinder- purestorage/ +/844256
Review: https:/