Project

General

Profile

Bug #14797

Medium validation wrong with Katello and foreman_bootdisk

Added by Timo Goebel about 3 years ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Difficulty:
Triaged:
Yes
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Both foreman_bootdisk and Katello overwrite validate_media? in the Host Model and the wrong order is applied.

What you can try as a workaround is the following:
Remove or comment

alias_method_chain :validate_media?, :bootdisk
from app/models/concerns/foreman_bootdisk/host_ext.rb

See:
https://github.com/Katello/katello/blob/b92a833e38fa3b39deff26839b219c0b7da53bbb/app/models/katello/concerns/host_managed_extensions.rb#L34-L36
https://github.com/theforeman/foreman_bootdisk/blob/master/app/models/concerns/foreman_bootdisk/host_ext.rb#L36-L38


Related issues

Related to Foreman Remote Execution - Refactor #21205: Replace alias_method_chain with Module prepend Closed2017-10-05
Related to Katello - Bug #21243: Rails 5 - Replace alias_method_chain with Module prependClosed2017-10-09
Related to Foreman - Refactor #20957: Replace alias_method_chain with Module prepend Closed2017-09-16
Related to Foreman - Refactor #22219: Refactor validate_media? to be hookableNew2018-01-10
Related to Foreman - Refactor #25680: Allow plugins to override validate_media?Closed

Associated revisions

Revision 1e24194a (diff)
Added by Lukas Zapletal 6 months ago

Fixes #14797 - remove media presence check

History

#1 Updated by Lukas Zapletal over 1 year ago

  • Related to Refactor #21205: Replace alias_method_chain with Module prepend added

#2 Updated by Lukas Zapletal over 1 year ago

Both bootdisk and katello are now on "prepend" FYI. I haven't tested if this helped tho.

https://github.com/Katello/katello/blob/master/app/models/katello/concerns/host_managed_extensions.rb#L9-L11

#3 Updated by Lukas Zapletal over 1 year ago

  • Bugzilla link set to 1513327

#4 Updated by Lukas Zapletal over 1 year ago

  • Related to Bug #21243: Rails 5 - Replace alias_method_chain with Module prepend added

#5 Updated by Lukas Zapletal over 1 year ago

  • Related to Refactor #20957: Replace alias_method_chain with Module prepend added

#6 Updated by Lukas Zapletal over 1 year ago

  • Status changed from New to Need more information

I believe this was fixed both in 10.0.1 and 11.x series of Bootdisk now.

#7 Updated by The Foreman Bot over 1 year ago

  • Assignee set to Lukas Zapletal
  • Status changed from Need more information to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_bootdisk/pull/55 added

#8 Updated by Lukas Zapletal over 1 year ago

  • Related to Refactor #22219: Refactor validate_media? to be hookable added

#9 Updated by Lukas Zapletal 9 months ago

  • Triaged changed from No to Yes
  • Status changed from Ready For Testing to Need more information

Timo, I believe we can close this one.

#10 Updated by Timo Goebel 9 months ago

Lukas Zapletal wrote:

Timo, I believe we can close this one.

I think this still applies. Katello and Foreman Bootdisk still override the same method.

#11 Updated by Lukas Zapletal 7 months ago

  • Related to Refactor #25680: Allow plugins to override validate_media? added

#12 Updated by The Foreman Bot 6 months ago

  • Status changed from Need more information to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_bootdisk/pull/73 added

#13 Updated by Lukas Zapletal 6 months ago

  • Bugzilla link changed from 1513327 to 1659042
  • Pull request deleted (https://github.com/theforeman/foreman_bootdisk/pull/55)

#14 Updated by Anonymous 6 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF