Required opts don't raise exceptions

Bug #1735790 reported by Stephen Finucane
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.config
Confirmed
Low
Unassigned

Bug Description

I have a Tempest plugin that has a number of required opts. Despite not being specified, these options aren't throwing Exceptions. This seems to be because the options are registered _after_ the initial files are loaded. I'm not certain if this is a bug in oslo.config (as opposed to Tempest) but I suspect it is given that I can actually read the options at a later date.

Output of some rough printf debugging below.

---

$ tempest run -r rhostest_tempest_plugin.tests.scenario.test_pointer_device_type [360/363]
!!!
called _check_required_opts
here are the options we're checking
***
default_log_levels
watch-log-file
use-journal
config-dir
logging_default_format_string
use_stderr
log-date-format
rate_limit_burst
logging_context_format_string
instance_format
use-syslog
log-dir
publish_errors
logging_debug_format_suffix
logging_exception_prefix
config-file
syslog-log-facility
instance_uuid_format
log-config-append
rate_limit_except_level
rate_limit_interval
debug
log-file
logging_user_identity_format
disable_process_locking
lock_path
!!!

!!!
called register_opt
target_controller
!!!

!!!
called register_opt
target_ssh_user
!!!

!!!
called register_opt
target_private_key_path
!!!

!!!
called register_opt
containers
!!!

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

I'm not sure what the "required" flag does for "options". I could see throwing an error at the point where they are registered if we've already loaded data and the option isn't included.

Revision history for this message
Ben Nemec (bnemec) wrote :

I'm inclined to think required was intended for cli opts, but we should either document that or make it work for config file opts as well.

Changed in oslo.config:
status: New → Confirmed
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.