undefined method `display_bootdisk_link_if_authorized' for #<#<Class:0x0000000aacff80>:0x007f422078a

I've recently started getting this error very persistently when trying to
open any host status page on Foreman 1.6.1 with bootdisk 3.2.0

What can I do?

NoMethodError
*undefined method display_bootdisk_link_if_authorized&#39; for #&lt;#&lt;Class:0x0000000aacff80&gt;:0x007f422078a848&gt;* app/views/hosts/show.html.erb:4:in_04745700c0a93e04447df04d227f2249'
app/models/concerns/foreman/thread_session.rb:33:in clear_thread&#39; lib/middleware/catch_json_parse_errors.rb:9:incall'

Could you raise a bug here please?
http://projects.theforeman.org/projects/bootdisk/issues/new

It'd be useful if you could include the OS and packages you're running
so I can see if I can reproduce it.

Cheers,

··· On 17/10/14 17:22, Ronald van Zantvoort wrote: > I've recently started getting this error very persistently when trying > to open any host status page on Foreman 1.6.1 with bootdisk 3.2.0 > > What can I do? > > /NoMethodError/ > *undefined method `display_bootdisk_link_if_authorized' for > #<#:0x007f422078a848>* > app/views/hosts/show.html.erb:4:in `_04745700c0a93e04447df04d227f2249' > app/models/concerns/foreman/thread_session.rb:33:in `clear_thread' > lib/middleware/catch_json_parse_errors.rb:9:in `call'


Dominic Cleal
Red Hat Engineering

Hi Dominic,

I figured out the issue occurs when loading in Foreman Salt plugin:
http://projects.theforeman.org/issues/8009

··· On Tuesday, 21 October 2014 09:38:33 UTC+2, Dominic Cleal wrote: > > On 17/10/14 17:22, Ronald van Zantvoort wrote: > > I've recently started getting this error very persistently when trying > > to open any host status page on Foreman 1.6.1 with bootdisk 3.2.0 > > > > What can I do? > > > > /NoMethodError/ > > *undefined method `display_bootdisk_link_if_authorized' for > > #<#:0x007f422078a848>* > > app/views/hosts/show.html.erb:4:in `_04745700c0a93e04447df04d227f2249' > > app/models/concerns/foreman/thread_session.rb:33:in `clear_thread' > > lib/middleware/catch_json_parse_errors.rb:9:in `call' > > Could you raise a bug here please? > http://projects.theforeman.org/projects/bootdisk/issues/new > > It'd be useful if you could include the OS and packages you're running > so I can see if I can reproduce it. > > Cheers, > > -- > Dominic Cleal > Red Hat Engineering >

I think 'service httpd restart' should fix it after installing the salt
plugin - can you confirm?

This only happens on Debian, because plug-in packages don't cause
passenger to restart while the RPM ones do.

··· On Tue, Oct 21, 2014 at 05:02:06AM -0700, Ronald van Zantvoort wrote: > Hi Dominic, > > I figured out the issue occurs when loading in Foreman Salt plugin: > http://projects.theforeman.org/issues/8009 > > On Tuesday, 21 October 2014 09:38:33 UTC+2, Dominic Cleal wrote: > > > > On 17/10/14 17:22, Ronald van Zantvoort wrote: > > > I've recently started getting this error very persistently when trying > > > to open any host status page on Foreman 1.6.1 with bootdisk 3.2.0 > > > > > > What can I do? > > > > > > /NoMethodError/ > > > *undefined method `display_bootdisk_link_if_authorized' for > > > #<#:0x007f422078a848>* > > > app/views/hosts/show.html.erb:4:in `_04745700c0a93e04447df04d227f2249' > > > app/models/concerns/foreman/thread_session.rb:33:in `clear_thread' > > > lib/middleware/catch_json_parse_errors.rb:9:in `call' > >


Stephen Benjamin


Red Hat GmbH | http://de.redhat.com/ | Sitz: Grasbrunn
Handelsregister: Amtsgericht München, HRB 153243
Geschäftsführer: Charles Cachera, Michael Cunningham,
Michael O’Neill, Charles Peters

>
> > Hi Dominic,
> >
> > I figured out the issue occurs when loading in Foreman Salt plugin:
> > Bug #8009: Plugin Salt interferes with Bootdisk in Host view - Foreman
> >
> > >
> > > > I've recently started getting this error very persistently when
> trying
> > > > to open any host status page on Foreman 1.6.1 with bootdisk 3.2.0
> > > >
> > > > What can I do?
> > > >
> > > > /NoMethodError/
> > > > *undefined method display_bootdisk_link_if_authorized&#39; for &gt; &gt; &gt; &gt; #&lt;#&lt;Class:0x0000000aacff80&gt;:0x007f422078a848&gt;* &gt; &gt; &gt; &gt; app/views/hosts/show.html.erb:4:in &gt;_04745700c0a93e04447df04d227f2249'
> > > > app/models/concerns/foreman/thread_session.rb:33:in clear_thread&#39; &gt; &gt; &gt; &gt; lib/middleware/catch_json_parse_errors.rb:9:incall'
> > >
>
> I think 'service httpd restart' should fix it after installing the salt
> plugin - can you confirm?
>
>
I can confirm that that didn't solve my problem :wink:
Turns out the problem is that both Salt plugin and Bootdisk plugin try to
extend the same classes, which leads to an ordering problem.
A proposed patch (which works for me) is in the bug now (in
PR https://github.com/theforeman/foreman/pull/1874)

> This only happens on Debian, because plug-in packages don't cause
> passenger to restart while the RPM ones do.
>
>
Which is a well-known nuisance to us by now :wink:

··· On Tuesday, 21 October 2014 15:49:04 UTC+2, Stephen Benjamin wrote: > On Tue, Oct 21, 2014 at 05:02:06AM -0700, Ronald van Zantvoort wrote: > > On Tuesday, 21 October 2014 09:38:33 UTC+2, Dominic Cleal wrote: > > > On 17/10/14 17:22, Ronald van Zantvoort wrote:


Stephen Benjamin


Red Hat GmbH | http://de.redhat.com/ | Sitz: Grasbrunn
Handelsregister: Amtsgericht München, HRB 153243
Geschäftsführer: Charles Cachera, Michael Cunningham,
Michael O’Neill, Charles Peters