d1nuc0m | Hi all, I'm having a strange problem - if I set USER_MENU_LINKS at the end of /etc/openstack-dashboard/local_settings it works, but if I put the same snippet in a .py file in /etc/openstack-dashboard/local_settings.d, it does not work... What am I missing? | 12:46 |
---|---|---|
opendevreview | Tobias Urdin proposed openstack/horizon master: Delete container show duplicate toast notifications https://review.opendev.org/c/openstack/horizon/+/922094 | 12:46 |
pas-ha[m] | d1nuc0m: looking at the code, it expects files in the local_settings.d folder to have .conf extension, not .py | 12:51 |
pas-ha[m] | https://opendev.org/openstack/horizon/src/branch/master/openstack_dashboard/settings.py#L236-L237 | 12:51 |
d1nuc0m | pas-ha[m], thanks but this does not seem to have an effect | 12:58 |
d1nuc0m | This is the actual file content https://paste.opendev.org/show/bQTBkhph63F5hQTfahLn/ | 12:59 |
d1nuc0m | Taken from docs (that btw still tell to use .py extension) https://docs.openstack.org/horizon/latest/configuration/settings.html#user-menu-links | 12:59 |
pas-ha[m] | seems like that at some point there was attempt to move to oslo.config based configuration instead of Djang-based py-files... may be both should be usable?.. 🤷 | 13:03 |
d1nuc0m | I don't know, RN I am not able to make it work, nor .py nor .conf | 13:04 |
d1nuc0m | pas-ha[m], interesting enough, there are other .py files in /etc/openstack-dashboard/local_settings.d with a content like this https://paste.opendev.org/show/bGx8zwriHSWTJHu498pk/ | 13:12 |
pas-ha[m] | ok, so py should work. i'd check if any of them re-define USER_MENU_LINKS and is loaded alphabetically after your file.. | 13:13 |
d1nuc0m | Already checked with no luck... | 13:17 |
d1nuc0m | There are also example file in horizon repo (https://opendev.org/openstack/horizon/src/branch/master/openstack_dashboard/local/local_settings.d) | 13:19 |
tkajinam | d1nuc0m, I suspect you need "from django.utils.translation import gettext_lazy as _" | 14:52 |
tkajinam | https://github.com/openstack/horizon/blob/master/openstack_dashboard/settings.py#L269-L280 | 14:52 |
tkajinam | probably you first have to check if that "Can not exec settings snippet" error message is found or not | 14:53 |
tkajinam | I mean you have to add that import line at the top of that file | 14:55 |
d1nuc0m | tkajinam, thanks, added it on top, but still nothing, also searched for the errors in log and nothing | 14:56 |
tkajinam | d1nuc0m, did you restart apache/httpd after you added the line ? | 14:57 |
d1nuc0m | yes | 14:57 |
tkajinam | hm | 14:57 |
tkajinam | maybe I'd try messing the syntax (like removing the ] at the end) and see if the error log appears | 14:58 |
tkajinam | to understand if the file is loaded without error | 14:59 |
d1nuc0m | No, there is no error, searched with grep "Can not exec settings snippet" -Ri /var/log/* | 15:01 |
d1nuc0m | It's like the file is being ignored | 15:01 |
d1nuc0m | But it's owned by apache:apache and has 640 permissions like the other oens | 15:01 |
d1nuc0m | *ones | 15:02 |
tkajinam | d1nuc0m, what's the distribution/install method you use | 15:06 |
d1nuc0m | tkajinam, RDO | 15:09 |
d1nuc0m | On EL9 | 15:09 |
d1nuc0m | Anyway gotta go, will work on it next days, maybe a pause will give a different POV | 15:10 |
d1nuc0m | Thank you for your help :) | 15:11 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!