diff --git a/glance/common/config.py b/glance/common/config.py index ecd40a6e2a..a70e7389f2 100644 --- a/glance/common/config.py +++ b/glance/common/config.py @@ -131,6 +131,7 @@ common_opts = [ 'be a security risk, so use this setting with ' 'caution! The overrides show_image_direct_url.')), cfg.IntOpt('image_size_cap', default=1099511627776, + max=9223372036854775808, help=_("Maximum size of image a user can upload in bytes. " "Defaults to 1099511627776 bytes (1 TB)." "WARNING: this value should only be increased after " @@ -159,7 +160,7 @@ common_opts = [ cfg.StrOpt('pydev_worker_debug_host', help=_('The hostname/IP of the pydev process listening for ' 'debug connections')), - cfg.IntOpt('pydev_worker_debug_port', default=5678, + cfg.IntOpt('pydev_worker_debug_port', default=5678, min=1, max=65535, help=_('The port on which a pydev process is listening for ' 'connections.')), cfg.StrOpt('metadata_encryption_key', secret=True, diff --git a/glance/common/wsgi.py b/glance/common/wsgi.py index b71f765468..b42290c9f6 100644 --- a/glance/common/wsgi.py +++ b/glance/common/wsgi.py @@ -60,7 +60,7 @@ bind_opts = [ cfg.StrOpt('bind_host', default='0.0.0.0', help=_('Address to bind the server. Useful when ' 'selecting a particular network interface.')), - cfg.IntOpt('bind_port', + cfg.IntOpt('bind_port', min=1, max=65535, help=_('The port on which the server will listen.')), ] diff --git a/glance/registry/__init__.py b/glance/registry/__init__.py index 9322845299..ea1880138f 100644 --- a/glance/registry/__init__.py +++ b/glance/registry/__init__.py @@ -26,7 +26,7 @@ _ = i18n._ registry_addr_opts = [ cfg.StrOpt('registry_host', default='0.0.0.0', help=_('Address to find the registry server.')), - cfg.IntOpt('registry_port', default=9191, + cfg.IntOpt('registry_port', default=9191, min=1, max=65535, help=_('Port the registry server is listening on.')), ]