← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1308228] Re: Case sensitivity of booleans in local_settings.py causes 500 when lowercase used

 

** Changed in: horizon
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1308228

Title:
  Case sensitivity of booleans in local_settings.py causes 500 when
  lowercase used

Status in OpenStack Dashboard (Horizon):
  Invalid

Bug description:
  Ubuntu 12.04.04 / OpenStack Havana (RPC 4.2.2)

  Setting a boolean of the wrong case in /etc/openstack-
  dashboard/local_settings.py causes 500s.

  I inadvertently set 'enable_lb': true (lowercase true):

  # The OPENSTACK_NEUTRON_NETWORK settings can be used to enable optional
  # services provided by neutron. Options currenly available are load
  # balancer service, security groups, quotas, VPN service.
  OPENSTACK_NEUTRON_NETWORK = {
      'enable_lb': true,
      'enable_firewall': False,
      'enable_quotas': True,
      'enable_vpn': False,
      # The profile_support option is used to detect if an external router can be
      # configured via the dashboard. When using specific plugins the
      # profile_support can be turned on if needed.
      'profile_support': None,
      #'profile_support': 'cisco',
  }

  caused:

  
  [Tue Apr 15 19:47:36 2014] [error] [client 192.168.1.101]   File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/local/local_settings.py", line 128, in <module>
  [Tue Apr 15 19:47:36 2014] [error] [client 192.168.1.101]     'enable_lb': true,
  [Tue Apr 15 19:47:36 2014] [error] [client 192.168.1.101] NameError: name 'true' is not defined
  [Tue Apr 15 19:47:36 2014] [error] [client 192.168.1.101] mod_wsgi (pid=502): Exception occurred processing WSGI script '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi'.
  [Tue Apr 15 19:47:36 2014] [error] [client 192.168.1.101] Traceback (most recent call last):
  [Tue Apr 15 19:47:36 2014] [error] [client 192.168.1.101]   File "/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 236, in __call__
  [Tue Apr 15 19:47:36 2014] [error] [client 192.168.1.101]     self.load_middleware()
  [Tue Apr 15 19:47:36 2014] [error] [client 192.168.1.101]   File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 45, in load_middleware
  [Tue Apr 15 19:47:36 2014] [error] [client 192.168.1.101]     for middleware_path in settings.MIDDLEWARE_CLASSES:
  [Tue Apr 15 19:47:36 2014] [error] [client 192.168.1.101]   File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 53, in __getattr__
  [Tue Apr 15 19:47:36 2014] [error] [client 192.168.1.101]     self._setup(name)
  [Tue Apr 15 19:47:36 2014] [error] [client 192.168.1.101]   File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 48, in _setup
  [Tue Apr 15 19:47:36 2014] [error] [client 192.168.1.101]     self._wrapped = Settings(settings_module)
  [Tue Apr 15 19:47:36 2014] [error] [client 192.168.1.101]   File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 132, in __init__
  [Tue Apr 15 19:47:36 2014] [error] [client 192.168.1.101]     mod = importlib.import_module(self.SETTINGS_MODULE)
  [Tue Apr 15 19:47:36 2014] [error] [client 192.168.1.101]   File "/usr/lib/python2.7/dist-packages/django/utils/importlib.py", line 35, in import_module
  [Tue Apr 15 19:47:36 2014] [error] [client 192.168.1.101]     __import__(name)
  [Tue Apr 15 19:47:36 2014] [error] [client 192.168.1.101]   File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/settings.py", line 211, in <module>
  [Tue Apr 15 19:47:36 2014] [error] [client 192.168.1.101]     from local.local_settings import *  # noqa
  [Tue Apr 15 19:47:36 2014] [error] [client 192.168.1.101]   File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/local/local_settings.py", line 128, in <module>
  [Tue Apr 15 19:47:36 2014] [error] [client 192.168.1.101]     'enable_lb': true,
  [Tue Apr 15 19:47:36 2014] [error] [client 192.168.1.101] NameError: name 'true' is not defined

  Changing it to "True" fixed the issue.

  I'm all for consistency and details - but seems a bit too strict and
  could cause unnecessary troubleshooting.

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1308228/+subscriptions


References