"unknown option" warnings at config creation

Bug #1920109 reported by Denis Kasanic
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
New
Undecided
Unassigned
keystonemiddleware
New
Undecided
Unassigned

Bug Description

During swift_proxy_server start the following warnings are reported:

2021-03-18T07:56:05.298678000Z swift-proxy-server: STDERR: The option "bind_ip" is not known to keystonemiddleware
2021-03-18T07:56:05.298932000Z swift-proxy-server: STDERR: The option "bind_port" is not known to keystonemiddleware
2021-03-18T07:56:05.299332000Z swift-proxy-server: STDERR: The option "log_udp_host" is not known to keystonemiddleware
2021-03-18T07:56:05.299739000Z swift-proxy-server: STDERR: The option "log_udp_port" is not known to keystonemiddleware
2021-03-18T07:56:05.300058000Z swift-proxy-server: STDERR: The option "log_name" is not known to keystonemiddleware
2021-03-18T07:56:05.300452000Z swift-proxy-server: STDERR: The option "log_facility" is not known to keystonemiddleware
2021-03-18T07:56:05.300836000Z swift-proxy-server: STDERR: The option "log_level" is not known to keystonemiddleware
2021-03-18T07:56:05.301203000Z swift-proxy-server: STDERR: The option "workers" is not known to keystonemiddleware
2021-03-18T07:56:05.301604000Z swift-proxy-server: STDERR: The option "auth_url" is not known to keystonemiddleware
2021-03-18T07:56:05.301985000Z swift-proxy-server: STDERR: The option "project_domain_id" is not known to keystonemiddleware
2021-03-18T07:56:05.302495000Z swift-proxy-server: STDERR: The option "user_domain_id" is not known to keystonemiddleware
2021-03-18T07:56:05.302893000Z swift-proxy-server: STDERR: The option "project_name" is not known to keystonemiddleware
2021-03-18T07:56:05.303346000Z swift-proxy-server: STDERR: The option "username" is not known to keystonemiddleware
2021-03-18T07:56:05.303794000Z swift-proxy-server: STDERR: The option "password" is not known to keystonemiddleware
2021-03-18T07:56:05.304538000Z swift-proxy-server: STDERR: The option "__name__" is not known to keystonemiddleware

At keystonemiddleware initialisation, swift_proxy_server provides configuration options from proxy-server.conf. Provided options are from groups [DEFAULT], [filter:authtoken] and [filter:keystoneauth].
At the init of keystonemiddleware, validation of all config options is executed in the following function:

def _conf_values_type_convert(group_name, all_options, conf):
    """Convert conf values into correct type."""
    if not conf:
        return {}

    opts = {}
    opt_types = {}

    for group, options in all_options:
        # only accept paste overrides for the primary group
        if group != group_name:
            continue

        for o in options:
            type_dest = (getattr(o, 'type', str), o.dest)
            opt_types[o.dest] = type_dest
            # Also add the deprecated name with the same type and dest.
            for d_o in o.deprecated_opts:
                opt_types[d_o.name] = type_dest

        break

    for k, v in conf.items():
        dest = k
        try:
            if v is not None:
                type_, dest = opt_types[k]
                v = type_(v)
        except KeyError: # nosec
            # This option is not known to auth_token. v is not converted.
            _LOG.warning(
                'The option "%s" in conf is not known to auth_token', k)
        except ValueError as e:
            raise exceptions.ConfigurationError(
                _('Unable to convert the value of %(key)s option into correct '
                  'type: %(ex)s') % {'key': k, 'ex': e})
        opts[dest] = v

    return opts

In function, there's a validation of whether the passed option is present in supported options. This validation fails on all options from swift proxy server [DEFAULT] configuration section and on all options relevant to keystoneauth1 plugin type "password" from [filter:authtoken].

These warnings have no impact on functionality of swift_proxy_server or keystonemiddleware itself.

Tags: swift
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.