-
Notifications
You must be signed in to change notification settings - Fork 898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter out the hosts with the selected network. #14946
Conversation
Once a network is selected, the available hosts should be filtered out to the hosts that are on the selected network. https://bugzilla.redhat.com/show_bug.cgi?id=1435814
Checked commit lfu@4c80745 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
return all_hosts unless vlan_name | ||
|
||
_log.info "Filtering hosts with the following network: <#{vlan_name}>" | ||
all_hosts.reject { |h| !h.lans.pluck(:name).include?(vlan_name) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gmcculloug yes host -> lan will work for all infra providers (at least RHV and SCVMM, I don't see any lans in openstack::infra
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Openstack infra is only for managing the undercloud - registering new baremetal nodes, adding more compute nodes, etc. In other words, there is no provisioning for Openstack Infra.
The only thing we should check on other providers (RHV/SCVMM) is how this behaves if you have two networks with the same name, since those two providers don't use the name for the UID like VMware does. I don't think we have the UID in |
The available hosts for RHEVM provisioning is limited to the same data center where the template is located. And it is not allowed to have two networks with the same name per data center. @bronaghs How about SCVMM? Is it possible to have two networks with the same name in SCVMM that the selected host would actually be the wrong one and is not on the selected network? |
Filter out the hosts with the selected network. (cherry picked from commit acf7681) https://bugzilla.redhat.com/show_bug.cgi?id=1458363
Fine backport details:
|
Once a network is selected, the available hosts should be filtered out to the hosts that are on the selected network.
https://bugzilla.redhat.com/show_bug.cgi?id=1435814
@miq-bot assign @gmcculloug
@miq-bot add_label bug, fine/yes, provisioning
cc @agrare