Bug #21874
openValidation error should be raised on creating alias interface when primary interface doesn't have any device identifier set
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1325777
Description of problem:
I was trying to configure an alias interface while provisioning a virtual host. I defined an alias interface, however didn't set the identifier for first/primary interface. So alias configuration failed like below:
[root@sghai ~]# cat /etc/sysconfig/network-scripts/ifcfg-.1
BOOTPROTO="none"
IPADDR="192.168.100.126"
NETMASK="255.255.255.248"
GATEWAY="192.168.100.1"
DEVICE=.1
ONBOOT=yes
PEERDNS=no
PEERROUTES=no
VLAN=yes
[root@sghai ~]# cat /etc/sysconfig/network-scripts/ifcfg-_0
BOOTPROTO="none"
IPADDR="192.168.100.125"
NETMASK="255.255.255.248"
GATEWAY="192.168.100.1"
DEVICE=:0
ONBOOT=yes
PEERDNS=no
PEERROUTES=no
TYPE=Alias
[root@sghai ~]#
But user got to know only when host was provisioned successfully. So user should get a validation error if user doesn't/forgot to set the identifier for primary interface while creating alias of it.
Version-Release number of selected component (if applicable):
sat6.2 beta snap6.2
How reproducible:
Steps to Reproduce:
1. define a static subnet
2. create new host ( do not specify identifier for primary interface)
3. add an alias interface and specify primary interface's identifier under attached_to interface like eth0 while creating alias interface
Actual results:
alias interface configuration sliently failed, no error to user, but an incorrect device name as shown above in alias interface config file.
Expected results:
user should get a validation error that 'Interface to which alias interface going to attach should have proper device identifier set.
Additional info:
No data to display