Bug #8221
closed
subnet not matching domain available as choice when creating new host
Added by Dominic Cleal about 10 years ago.
Updated over 6 years ago.
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1158918
Description of problem:
We've noticed that subnets which are not part of the selected domain are available as a valid choice in the WEBUI when creating a new host.
Version-Release number of selected component (if applicable):
satellite-6.0.4
How reproducible:
Every time
Steps to Reproduce:
1. Go to https://satellite6ga.lab.arn.redhat.com/subnets
2. Select a subnet
3. Go to the "Domains" tab
4. Ensure that there is at least one un-checked domain for your subnet
5. Create a new host
6. On the "Network" tab, select the subnet which was unchecked in the tab above.
7. Note that the subnet for which the domain was unchecked still is a valid option in the "subnets" drop-down
Expected results:
I would expect that only matching subnet/domain pairs would be choosable in the UI.
- Category set to Host creation
Looks like domain_subnets in app/helpers/hosts_and_hostgroups_helper.rb is calling .with_taxonomy_scope_override, but this method is irritatingly using .unscoped (see also: #5445) which means we lose the scoping of subnets specific to that domain, and instead get all subnets.
- Related to Refactor #5445: Investigate use of Taxonomix.with_taxonomy_scope_override and refactor to use Taxonomix.with_taxonomy_scope when possible added
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/1914 added
- Pull request deleted (
)
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
- Assignee set to Shlomi Zadok
- Translation missing: en.field_release set to 29
- Translation missing: en.field_release changed from 29 to 28
- Related to Bug #8591: Selecting domain in New Host dialog results in PGError and no subnets being available added
- Translation missing: en.field_release changed from 28 to 29
Also available in: Atom
PDF