Re: [openstack-dev] [horizon] Augmenting openstack_dashboard settings and possible horizon bug
Thanks to the Ana Krivokapic's comment in https://bugs.launchpad.net/horizon/+bug/1271151 I've found a typo in my code, so it's not Horizon's bug but mine. So, the original approach I used for augmenting openstack_dashboard settings (which is described in the initial letter of this thread) works fine, and it's still more flexible than a new Horizon's mechanism for adding separate dashboards settings, so we'll stick to our approach. Just to keep you informed :). Also, the thing that bothered me most when I thought about how Murano could use this new Horizon's config facility, is changing DATABASES parameter (muranodashboard app needs it to be set) - and more generally, resolving conflicts when different dashboards change some common parameters (such as DATABASES or SESSION_BACKEND) affecting all Django applications. Current algorithm of determining which dashboard sets the actual value of a parameter such as DATABASES seems unreliable to me in sense that it can break other dashboards which failed to set this parameter to the value they needed. On Thu, Jan 16, 2014 at 1:57 PM, Timur Sufiev wrote: > Radomir, > > it looks interesting indeed. I think Murano could use it in case several > additional parameters were added. I will submit a patch with my ideas a bit > later. > > One thing that seemed tricky to me in your patchset is determining which > dashboard will actually be the default one, but I have yet no clue on how > it could be made simpler using pluggable architecture. > > > On Wed, Jan 15, 2014 at 6:57 PM, Radomir Dopieralski < > openst...@sheep.art.pl> wrote: > >> On 15/01/14 15:30, Timur Sufiev wrote: >> > Recently I've decided to fix situation with Murano's dashboard and move >> > all Murano-specific django settings into a separate file (previously >> > they were appended to >> > /usr/share/openstack-dashboard/openstack_dashboard/settings.py). But, as >> > I knew, /etc/openstack_dashboard/local_settings.py is for customization >> > by admins and is distro-specific also - so I couldn't use it for >> > Murano's dashboard customization. >> >> [snip] >> >> > 2. What is the sensible approach for customizing settings for some >> > Horizon's dashboard in that case? >> >> We recently added a way for dashboards to have (some) of their >> configuration provided in separate files, maybe that would be >> helpful for Murano? >> >> The patch is https://review.openstack.org/#/c/56367/ >> >> We can add more settings that can be changed, we just have to know what >> is needed. >> >> -- >> Radomir Dopieralski >> >> >> ___ >> OpenStack-dev mailing list >> OpenStack-dev@lists.openstack.org >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev >> > > > > -- > Timur Sufiev > -- Timur Sufiev ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [horizon] Augmenting openstack_dashboard settings and possible horizon bug
Radomir, it looks interesting indeed. I think Murano could use it in case several additional parameters were added. I will submit a patch with my ideas a bit later. One thing that seemed tricky to me in your patchset is determining which dashboard will actually be the default one, but I have yet no clue on how it could be made simpler using pluggable architecture. On Wed, Jan 15, 2014 at 6:57 PM, Radomir Dopieralski wrote: > On 15/01/14 15:30, Timur Sufiev wrote: > > Recently I've decided to fix situation with Murano's dashboard and move > > all Murano-specific django settings into a separate file (previously > > they were appended to > > /usr/share/openstack-dashboard/openstack_dashboard/settings.py). But, as > > I knew, /etc/openstack_dashboard/local_settings.py is for customization > > by admins and is distro-specific also - so I couldn't use it for > > Murano's dashboard customization. > > [snip] > > > 2. What is the sensible approach for customizing settings for some > > Horizon's dashboard in that case? > > We recently added a way for dashboards to have (some) of their > configuration provided in separate files, maybe that would be > helpful for Murano? > > The patch is https://review.openstack.org/#/c/56367/ > > We can add more settings that can be changed, we just have to know what > is needed. > > -- > Radomir Dopieralski > > > ___ > OpenStack-dev mailing list > OpenStack-dev@lists.openstack.org > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev > -- Timur Sufiev ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [horizon] Augmenting openstack_dashboard settings and possible horizon bug
On 15/01/14 15:30, Timur Sufiev wrote: > Recently I've decided to fix situation with Murano's dashboard and move > all Murano-specific django settings into a separate file (previously > they were appended to > /usr/share/openstack-dashboard/openstack_dashboard/settings.py). But, as > I knew, /etc/openstack_dashboard/local_settings.py is for customization > by admins and is distro-specific also - so I couldn't use it for > Murano's dashboard customization. [snip] > 2. What is the sensible approach for customizing settings for some > Horizon's dashboard in that case? We recently added a way for dashboards to have (some) of their configuration provided in separate files, maybe that would be helpful for Murano? The patch is https://review.openstack.org/#/c/56367/ We can add more settings that can be changed, we just have to know what is needed. -- Radomir Dopieralski ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
[openstack-dev] [horizon] Augmenting openstack_dashboard settings and possible horizon bug
Hi there! Recently I've decided to fix situation with Murano's dashboard and move all Murano-specific django settings into a separate file (previously they were appended to /usr/share/openstack-dashboard/openstack_dashboard/settings.py). But, as I knew, /etc/openstack_dashboard/local_settings.py is for customization by admins and is distro-specific also - so I couldn't use it for Murano's dashboard customization. So the following scheme was devised: change DJANGO_SETTINGS_MODULE in Apache config/WSGI python module to 'muranodashboard.settings' which contains all Murano-specific settings and imports openstack_dashboard.settings, which in turn imports local.local_settings. This approach seemed fine until I coded it and ran: it immediately failed with 'ImproperlyConfigured: The SECRET_KEY setting must not be empty.' exception. After spending some time in debugger, I found out that during 'openstack_dashboard.settings' module evaluation 'django.conf.Settings' class is instantiated and it requires the 'SECRET_KEY' parameter to be present in settings module referenced by DJANGO_SETTINGS_MODULE environment variable (which, in my case is 'muranodashboard.settings'). But if I try to avoid this error and define my own SECRET_KEY in 'muranodashboard.settings', I end up with 2 different SECRET_KEY values (one from muranodashboard.settings, the other hanging somewhere in horizon's machinery from local.local_settings / openstack_dashboard.settings) which is not good either. I have 2 questions: 1. Should this behaviour be considered as a Horizon bug or a Django bug? 2. What is the sensible approach for customizing settings for some Horizon's dashboard in that case? -- Timur Sufiev ___ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev