Skip to content
This repository has been archived by the owner on May 26, 2020. It is now read-only.

Install provisioning template that configures bonds #95

Merged
merged 2 commits into from Oct 8, 2014

Conversation

ares
Copy link
Member

@ares ares commented Sep 25, 2014

No description provided.

@ares
Copy link
Member Author

ares commented Sep 26, 2014

waiting on theforeman/foreman#1782

<% next if !interface.managed? || interface.subnet.nil? -%>
<% next if bonded_interfaces.include?(interface.identifier) -%>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Disclaimer: i'm a networking newbie so it's possible that my question is dumb.)

I see that this will exclude all the bond.attached_devices_identifiers for each bond, but will this also exclude the bond itself (the bonding master)? I don't see that being added to bonded_interfaces. Or is it that @host.bond_interfaces never appear in @host.managed_interfaces?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@host.managed_interfaces uses Host#managed scope which does the following

scope :managed, lambda { where(:type => "Nic::Managed") }

bond interfaces have "Nic::Bond" type so they are never listed there

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks for the explanation :)

@bcrochet
Copy link
Member

bcrochet commented Oct 8, 2014

ACK. Merging.

bcrochet added a commit that referenced this pull request Oct 8, 2014
Install provisioning template that configures bonds
@bcrochet bcrochet merged commit 5f3c423 into theforeman:master Oct 8, 2014
@ares ares deleted the bonding branch October 9, 2014 05:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants