Skip to content
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

fixes #9296 - Ensure bond has a mac address of one of attached iface #2142

Closed
wants to merge 1 commit into from

Conversation

bcrochet
Copy link
Member

@bcrochet bcrochet commented Feb 9, 2015

In order for some operations (like changing the IP address) of a bond to
work, it must have a mac address. This ensures that a) a mac address is
assigned, and b) that it belongs to one of the interfaces involved in
the bond.

@theforeman-bot
Copy link
Member

There were the following issues with the commit message:

  • 18f3267 must be in the format Fixes/refs #redmine_number - brief description.

Guidelines are available on the Foreman wiki.


This message was auto-generated by Foreman's prprocessor

…hed iface

In order for some operations (like changing the IP address) of a bond to
work, it must have a mac address. This ensures that a) a mac address is
assigned, and b) that it belongs to one of the interfaces involved in
the bond.
@@ -6,6 +6,7 @@ class Bond < Managed
validates :attached_devices, :format => { :with => /\A[a-z0-9#{SEPARATOR}.:_-]+\Z/ }, :allow_blank => true

before_save :ensure_virtual
after_save :ensure_mac
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't this happen before validation?

@ares
Copy link
Member

ares commented Feb 10, 2015

A unit test for this feature would be appreciated.

@ares ares changed the title Ensure bond has a mac address of one of attached iface fixes #9296 - Ensure bond has a mac address of one of attached iface Feb 10, 2015
@dLobatog
Copy link
Member

[test] because of the latest enabled cops

@ares
Copy link
Member

ares commented Mar 5, 2015

@bcrochet any plans for further work on this PR?

@bcrochet
Copy link
Member Author

bcrochet commented Mar 5, 2015

@ares I'm not sure this is the best approach anymore. Also, I'm not totally convinced that this is the fix for the behaviour that was identified in staypuft. So, I will close this for now.

@bcrochet bcrochet closed this Mar 5, 2015
@ares
Copy link
Member

ares commented Mar 5, 2015

ok, thanks for info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants