Project

General

Profile

Bug #19714

Interface deletion fails with static subnet: undefined method `destroy' for nil:NilClass

Added by Christoph Manns over 4 years ago. Updated over 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
DHCP
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

If I try to delete an interface which has a static subnet defined i get the following error message:

2017-05-31 11:10:46 965c8873 [app] [W] Remove DHCP Settings for bando task failed with the following error: undefined method `destroy' for nil:NilClass
 | NoMethodError: undefined method `destroy' for nil:NilClass
 | /usr/share/foreman/app/models/concerns/orchestration/dhcp.rb:67:in `block in del_dhcp'
 | /usr/share/foreman/app/models/concerns/orchestration/dhcp.rb:67:in `each'
 | /usr/share/foreman/app/models/concerns/orchestration/dhcp.rb:67:in `all?'
 | /usr/share/foreman/app/models/concerns/orchestration/dhcp.rb:67:in `del_dhcp'
 | /usr/share/foreman/app/models/concerns/orchestration.rb:216:in `execute'
 | /usr/share/foreman/app/models/concerns/orchestration.rb:144:in `block in process'
 | /usr/share/foreman/app/models/concerns/orchestration.rb:136:in `each'
 | /usr/share/foreman/app/models/concerns/orchestration.rb:136:in `process'
| /usr/share/foreman/app/models/concerns/orchestration.rb:60:in `on_destroy'

https://gist.github.com/RuriRyan/283b99487a3b54777bb6b8022c5f395d

Apparently it tries to remove DHCP Settings, but the subnet is Static, doesn't make too much sense for me.

History

#1 Updated by Dominic Cleal over 4 years ago

  • Subject changed from Interface deletion fails with static subnet to Interface deletion fails with static subnet: undefined method `destroy' for nil:NilClass
  • Description updated (diff)
  • Category set to Network

The DHCP proxy is probably set on the subnet, under the Proxies tab. If the DHCP proxy is set then reservations will be created, irrespective of the preferred boot mode - the boot mode can still be static and reservations managed. Unset the DHCP proxy to prevent management of reservations.

I'm unsure if this explains the error though.

#2 Updated by Dominic Cleal over 4 years ago

  • Category changed from Network to DHCP

#3 Updated by Christoph Manns over 4 years ago

Thank you for your explanation I know what you mean.

But this was working in 1.14 though.

Also available in: Atom PDF