Project

General

Profile

Actions

Bug #10994

closed

Extra interface added when selecting compute profile

Added by Dominic Cleal almost 9 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Compute resources
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Recently a second interface has started to be added when I select a compute profile, giving my new host two. The first remains as the primary/provision interface but with the default settings, while the new interface is the one from the compute profile with the right compute/VM settings.

This seems to be fine on 1.8-stable, just a problem on develop.

My compute attributes (vm_attrs) from the console:

{"cpus"=>"2", "memory"=>"1073741824", "nics_attributes"=>{"new_nics"=>{"type"=>"bridge", "_delete"=>"", "bridge"=>"em1", "model"=>"virtio"}, "0"=>{"type"=>"network", "_delete"=>"", "network"=>"default", "model"=>"virtio"}}, "volumes_attributes"=>{"new_volumes"=>{"pool_name"=>"default", "capacity"=>"10G", "allocation"=>"0G", "format_type"=>"raw", "_delete"=>""}, "0"=>{"pool_name"=>"default", "capacity"=>"10G", "allocation"=>"0G", "format_type"=>"qcow2", "_delete"=>""}}}

In the "interfaces tab" screenshot, note the network name beneath each - the "NAT default" is correct and used to just be set on the first interface.


Files

Screenshot from 2015-07-03 14_28_24.png View Screenshot from 2015-07-03 14_28_24.png 20.4 KB NICs inside compute profile Dominic Cleal, 07/03/2015 09:30 AM
Screenshot from 2015-07-03 14_28_31.png View Screenshot from 2015-07-03 14_28_31.png 74.5 KB selection of CR and profile Dominic Cleal, 07/03/2015 09:32 AM
Screenshot from 2015-07-03 14_28_34.png View Screenshot from 2015-07-03 14_28_34.png 66.9 KB interfaces tab Dominic Cleal, 07/03/2015 09:32 AM

Related issues 2 (0 open2 closed)

Related to Foreman - Bug #10849: We send form templates as part of paramsClosedMarek Hulán06/17/2015Actions
Related to Foreman - Refactor #11130: Calling set_table_name is deprecatedClosedShlomi Zadok07/16/2015Actions
Actions #1

Updated by Dominic Cleal almost 9 years ago

  • Related to Bug #10849: We send form templates as part of params added
Actions #2

Updated by Dominic Cleal almost 9 years ago

#10849 started filtering out "new_" fields during form submit, but for existing compute profiles which have stored "new_" values then the change to ComputeAttribute to remove the filter-on-retrieval means "new_" values in the attribute hash get merged into the NICs by the InterfaceMerge.

Without the filtering, InterfaceMerge#run is given this for compute_attrs:

=> [{"type"=>"bridge", "_delete"=>"", "bridge"=>"em1", "model"=>"virtio"},
{"type"=>"network", "_delete"=>"", "network"=>"default", "model"=>"virtio"}]

With it, it's given:

=> [{"type"=>"network", "_delete"=>"", "network"=>"default", "model"=>"virtio"}]

We might need to do a DB migration to tidy up existing ComputeAttributes or leave the filtering code (https://github.com/theforeman/foreman/commit/77c68e4#diff-b77a3b27475fc9f077bd0694bd8bbeccL40) in place.

Actions #3

Updated by Dominic Cleal almost 9 years ago

  • Status changed from New to Assigned
  • Assignee set to Dominic Cleal
Actions #4

Updated by The Foreman Bot almost 9 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2541 added
  • Pull request deleted ()
Actions #5

Updated by Dominic Cleal almost 9 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #6

Updated by Dominic Cleal almost 9 years ago

Actions

Also available in: Atom PDF