Bug #10994
closedExtra interface added when selecting compute profile
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
Updated by Dominic Cleal over 9 years ago
- Related to Bug #10849: We send form templates as part of params added
Updated by Dominic Cleal over 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.
Updated by Dominic Cleal over 9 years ago
- Status changed from New to Assigned
- Assignee set to Dominic Cleal
Updated by The Foreman Bot over 9 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2541 added
- Pull request deleted (
)
Updated by Dominic Cleal over 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 6ed467064817c2a47071e2459f3973f729d9acaf.
Updated by Dominic Cleal over 9 years ago
- Related to Refactor #11130: Calling set_table_name is deprecated added