Project

General

Profile

Bug #8221

subnet not matching domain available as choice when creating new host

Added by Dominic Cleal over 4 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Host creation
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

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.


Related issues

Related to Foreman - Refactor #5445: Investigate use of Taxonomix.with_taxonomy_scope_override and refactor to use Taxonomix.with_taxonomy_scope when possibleNew2014-04-25
Related to Foreman - Bug #8591: Selecting domain in New Host dialog results in PGError and no subnets being availableClosed2014-12-05

Associated revisions

Revision e23023e2 (diff)
Added by Shlomi Zadok over 4 years ago

fixes #8221 - search for subnet with taxonomy scope

Revision 2a3b436d (diff)
Added by Shlomi Zadok over 4 years ago

fixes #8221 - search for subnet with taxonomy scope

(cherry picked from commit e23023e29632a755582b2bd080fc7b226e606620)

History

#1 Updated by Dominic Cleal over 4 years ago

  • 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.

#2 Updated by Dominic Cleal over 4 years ago

  • Related to Refactor #5445: Investigate use of Taxonomix.with_taxonomy_scope_override and refactor to use Taxonomix.with_taxonomy_scope when possible added

#3 Updated by The Foreman Bot over 4 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/1914 added
  • Pull request deleted ()

#4 Updated by Shlomi Zadok over 4 years ago

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

#5 Updated by Dominic Cleal over 4 years ago

  • Assignee set to Shlomi Zadok
  • Legacy Backlogs Release (now unused) set to 29

#6 Updated by Dominic Cleal over 4 years ago

  • Legacy Backlogs Release (now unused) changed from 29 to 28

#7 Updated by Dominic Cleal over 4 years ago

  • Related to Bug #8591: Selecting domain in New Host dialog results in PGError and no subnets being available added

#8 Updated by Dominic Cleal over 4 years ago

  • Legacy Backlogs Release (now unused) changed from 28 to 29

Also available in: Atom PDF