Project

General

Profile

Bug #8377

Nic::Base.uniq_with_hosts fails if host is nil

Added by Scott Seago about 7 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Network
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

In the staypuft plugin, we've added a VipNic subclass of Nic::Managed to manage virtual IPs for a deployment. In this class, we've overridden require_host? to return 'false' since these will not be associated with a particular host.

The one thing that isn't working for us here is that the uniq_with_hosts validation fails since it's calling host.mac. I will submit a PR which adds a check to see if the host reference is set. If the host is nil, the result is the same as if the host's value is not in conflict -- the validation continues to the elsif in the loop to determine if the value is already in use on another host.

Associated revisions

Revision a95495bf (diff)
Added by Scott Seago about 7 years ago

fixes #8377 - fixes uniq validation for nics without a host

This commit considers a nil host reference equivalent to a non-conflicting
one for the purposes of uniq_with_hosts validation.

History

#1 Updated by The Foreman Bot about 7 years ago

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

#3 Updated by Marek Hulán about 7 years ago

  • Category set to Network
  • Assignee set to Scott Seago
  • Legacy Backlogs Release (now unused) set to 28

#4 Updated by Scott Seago about 7 years ago

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

Also available in: Atom PDF