Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin install causes templates to fail #53

Closed
fichtner opened this issue Nov 15, 2016 · 8 comments
Closed

plugin install causes templates to fail #53

fichtner opened this issue Nov 15, 2016 · 8 comments
Assignees
Labels
bug Production bug

Comments

@fichtner
Copy link
Member

Hi Ad, this isn't severe, but I think we should keep track of this. Installed all plugins at once on a fresh 16.7.8 and it gave me the following errors:

Nov 15 15:26:21	configd.py: [1a459910-41df-408a-8c17-9439741483d4] Inline action failed with OPNsense/Tinc OPNsense/Tinc/tinc_deploy.xml 'NoneType' object has no attribute '__getitem__' at Traceback (most recent call last): File "/usr/local/opnsense/service/modules/processhandler.py", line 505, in execute return ph_inline_actions.execute(self, inline_act_parameters) File "/usr/local/opnsense/service/modules/ph_inline_actions.py", line 52, in execute filenames = tmpl.generate(parameters) File "/usr/local/opnsense/service/modules/template.py", line 308, in generate raise render_exception Exception: OPNsense/Tinc OPNsense/Tinc/tinc_deploy.xml 'NoneType' object has no attribute '__getitem__'
Nov 15 15:24:48	configd.py: [4ba75234-bf0b-4000-a785-fac8860cc9a2] Inline action failed with OPNsense/HelloWorld OPNsense/HelloWorld/helloworld.conf 'collections.OrderedDict object' has no attribute 'helloworld' at Traceback (most recent call last): File "/usr/local/opnsense/service/modules/processhandler.py", line 505, in execute return ph_inline_actions.execute(self, inline_act_parameters) File "/usr/local/opnsense/service/modules/ph_inline_actions.py", line 52, in execute filenames = tmpl.generate(parameters) File "/usr/local/opnsense/service/modules/template.py", line 308, in generate raise render_exception Exception: OPNsense/HelloWorld OPNsense/HelloWorld/helloworld.conf 'collections.OrderedDict object' has no attribute 'helloworld'
Nov 15 15:23:57	configd.py: [c8538f17-c3de-4152-822a-9cee9a25c264] Inline action failed with OPNsense/HAProxy OPNsense/HAProxy/haproxy.conf 'collections.OrderedDict object' has no attribute 'HAProxy' at Traceback (most recent call last): File "/usr/local/opnsense/service/modules/processhandler.py", line 505, in execute return ph_inline_actions.execute(self, inline_act_parameters) File "/usr/local/opnsense/service/modules/ph_inline_actions.py", line 52, in execute filenames = tmpl.generate(parameters) File "/usr/local/opnsense/service/modules/template.py", line 308, in generate raise render_exception Exception: OPNsense/HAProxy OPNsense/HAProxy/haproxy.conf 'collections.OrderedDict object' has no attribute 'HAProxy'
@fichtner
Copy link
Member Author

Sorry, tinc had a suboptimal config due to a previous import. With a clean config tinc installs fine.

@AdSchellevis
Copy link
Member

ok, nice, can we close this issue then?

@fichtner
Copy link
Member Author

no, haproxy and helloworld are not perfectly fine, the first thing the user sees is an error during install. it's probably just a guard missing in the templates. I'll look into it.

@fraenki
Copy link
Member

fraenki commented Nov 15, 2016

Regarding HAProxy: I could wrap the whole haproxy.conf template in a {% if helpers.exists('OPNsense.HAProxy') %} clause if this is the way to go. :)

@fichtner
Copy link
Member Author

Yes and no. We need standards hooks for migrations during plugin install that could take care of this, then fix the model, if that is indeed a sensible approach. Not sure yet.

@fichtner
Copy link
Member Author

OPNsense/HAProxy OPNsense/HAProxy/haproxy.conf 'collections.OrderedDict object' has no attribute 'HAProxy'

Still there with a vanilla install of 17.7-RC1

@fichtner fichtner added the bug Production bug label Jul 12, 2017
@fraenki
Copy link
Member

fraenki commented Jul 12, 2017

@fichtner Should I add the previously mentioned if-clause to the HAProxy template?

@fichtner
Copy link
Member Author

@fraenki that would be helpful, I can do the testing

fraenki added a commit to fraenki/plugins that referenced this issue Jul 12, 2017
fichtner pushed a commit that referenced this issue Jul 13, 2017
fichtner added a commit that referenced this issue Aug 9, 2017
@fichtner fichtner closed this as completed Aug 9, 2017
fichtner added a commit that referenced this issue Aug 9, 2017
(cherry picked from commit b138f2e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Production bug
Development

No branches or pull requests

3 participants