Project

General

Profile

Bug #9618

User shouldn't be allowed to create an interface with same identifier of any existing one

Added by Marek Hulán over 7 years ago. Updated about 4 years ago.

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

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1194620
Description of problem:
I created an alias interface and define eth0 in identifier, Form was submitted without any validation error and UI accepted it.

Ideally UI should raise a validation error as you can't create two interfaces with same identifier

here is the snippet from provisioning template:

--
  1. primary interface
    real=`ip -o link | grep 52:54:00:34:ac:fb | awk '{print $2;}' | sed s/://`

cat << EOF > /etc/sysconfig/network-scripts/ifcfg-$real
BOOTPROTO="dhcp"
DEVICE="$real"
HWADDR="52:54:00:34:ac:fb"
ONBOOT=yes
EOF

  1. eth0 interface
    real=`ip -o link | grep 52:54:00:34:ac:fb | awk '{print $2;}' | sed s/:$//`
    real=`echo eth0 | sed s/eth0/$real/`

cat << EOF > /etc/sysconfig/network-scripts/ifcfg-$real
BOOTPROTO="none"
IPADDR="192.168.100.122"
NETMASK="255.255.255.248"
DEVICE="$real"
ONBOOT=yes
PEERDNS=no
PEERROUTES=no
EOF
---

Version-Release number of selected component (if applicable):
sat6.1 beta snap3
Satellite-6.1.0-RHEL-6-20150217.0

How reproducible:
always

Steps to Reproduce:
1. create a new host and add an interface with same identifier as of existing one
2.
3.

Actual results:
no validation error

Expected results:
validation error should be raised on form submation

Additional info:


Related issues

Related to Foreman - Bug #10566: Unique interface identifier requirement prevents host from being edited if duplicate identifier existsClosed2015-05-20

Associated revisions

Revision f2d5f955 (diff)
Added by Marek Hulán over 7 years ago

Fixes #9618 - make identifier uniq per host

Revision 24c39a1e (diff)
Added by Marek Hulán over 7 years ago

Fixes #9618 - make identifier uniq per host

(cherry picked from commit f2d5f95539b5070f5c7aba37196c45346140357d)

History

#1 Updated by Marek Hulán over 7 years ago

  • Category set to Network
  • Status changed from New to Assigned

#2 Updated by The Foreman Bot over 7 years ago

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

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

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

#4 Updated by Dominic Cleal over 7 years ago

  • Legacy Backlogs Release (now unused) set to 28

#5 Updated by Dominic Cleal about 7 years ago

  • Related to Bug #10566: Unique interface identifier requirement prevents host from being edited if duplicate identifier exists added

Also available in: Atom PDF