Bug 1406415 - HE deployment allows input of two MAC addresses at once for the engine.
Summary: HE deployment allows input of two MAC addresses at once for the engine.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-hosted-engine-setup
Classification: oVirt
Component: Network
Version: ---
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ovirt-4.1.0-beta
: 2.1.0
Assignee: Ido Rosenzwig
QA Contact: Nikolai Sednev
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-20 13:15 UTC by Nikolai Sednev
Modified: 2019-04-28 13:25 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-01 14:35:38 UTC
oVirt Team: Integration
Embargoed:
rule-engine: ovirt-4.1+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 68901 0 master MERGED core: Fix unicast MAC address validation 2016-12-22 12:22:39 UTC
oVirt gerrit 68985 0 ovirt-hosted-engine-setup-2.1 MERGED core: Fix unicast MAC address validation 2016-12-22 12:27:08 UTC

Description Nikolai Sednev 2016-12-20 13:15:43 UTC
Description of problem:
HE deployment allows input of two MAC addresses at once for the engine.
   You may specify a unicast MAC address for the VM or accept a randomly generated default [00:16:3e:1e:39:6b]: 00:16:3E:7D:DD:DD00:16:3E:7D:DD:DD
          How should the engine VM network be configured (DHCP, Static)[DHCP]? 
          Add lines for the appliance itself and for this host to /etc/hosts on the engine VM?
          Note: ensuring that this host could resolve the engine VM hostname is still up to you
          (Yes, No)[No] yes
         

I've mistakenly provided the same MAC address twice for HE-VM and deployment procedure accepted that:

[ INFO  ] Stage: Setup validation
         
          --== CONFIGURATION PREVIEW ==--
         
          Bridge interface                   : enp4s0f0
          Engine FQDN                        : nsednev-he-4.scl.lab.tlv.redhat.com
          Bridge name                        : ovirtmgmt
          Host address                       : puma18.scl.lab.tlv.redhat.com
          SSH daemon port                    : 22
          Firewall manager                   : iptables
          Gateway address                    : 10.35.160.254
          Storage Domain type                : nfs3
          Image size GB                      : 50
          Host ID                            : 1
          Storage connection                 : 10.35.110.11:/Compute_NFS/nsednev_he_4
          Console type                       : vnc
          Memory size MB                     : 16384
          MAC address                        : 00:16:3E:7D:DD:DD00:16:3E:7D:DD:DD
          Number of CPUs                     : 6
          OVF archive (for disk boot)        : /usr/share/ovirt-engine-appliance/ovirt-engine-appliance-4.1-20161202.1.el7.centos.ova
          Appliance version                  : 4.1-20161202.1.el7.centos
          Restart engine VM after engine-setup: True
          Engine VM timezone                 : Asia/Jerusalem
          CPU Type                           : model_Westmere
         


Version-Release number of selected component (if applicable):
vdsm-4.18.999-1020.git1ff41b1.el7.centos.x86_64
libvirt-client-2.0.0-10.el7_3.2.x86_64
ovirt-vmconsole-1.0.4-1.el7ev.noarch
ovirt-release41-pre-4.1.0-0.0.beta.20161201085255.git731841c.el7.centos.noarch
sanlock-3.4.0-1.el7.x86_64
qemu-kvm-rhev-2.6.0-28.el7_3.2.x86_64
ovirt-hosted-engine-ha-2.1.0-0.0.master.20161130135331.20161130135328.git3541725.el7.centos.noarch
ovirt-engine-appliance-4.1-20161202.1.el7.centos.noarch
ovirt-host-deploy-1.6.0-0.0.master.20161107121647.gitfd7ddcd.el7.centos.noarch
ovirt-engine-sdk-python-3.6.9.1-1.el7ev.noarch
ovirt-imageio-common-0.5.0-0.201611201242.gitb02532b.el7.centos.noarch
ovirt-vmconsole-host-1.0.4-1.el7ev.noarch
mom-0.5.8-1.el7ev.noarch
ovirt-hosted-engine-setup-2.1.0-0.0.master.20161130101611.gitb3ad261.el7.centos.noarch
ovirt-setup-lib-1.1.0-0.0.master.20161107100014.gitb73abeb.el7.centos.noarch
ovirt-imageio-daemon-0.5.0-0.201611201242.gitb02532b.el7.centos.noarch
Linux version 3.10.0-514.2.2.el7.x86_64 (mockbuild.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Wed Nov 16 13:15:13 EST 2016
Linux 3.10.0-514.2.2.el7.x86_64 #1 SMP Wed Nov 16 13:15:13 EST 2016 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 7.3 (Maipo)


How reproducible:
100%

Steps to Reproduce:
1.During deployment of HE, provide the same MAC address twice, and press enter to continue the deployment.
2.
3.

Actual results:
Deployment proceeds with double value of the same MAC.

Expected results:
Deployment should check for correct MAC address structure, at lest print an error and ask to provide correct MAC address, which should consist no more that of 6 octets.

Additional info:

Comment 1 Doron Fediuck 2016-12-20 14:52:02 UTC
Nice catch.
We need input validation for it.

Comment 2 Nikolai Sednev 2016-12-20 17:25:04 UTC
(In reply to Doron Fediuck from comment #1)
> Nice catch.
> We need input validation for it.

Id be also considering for adding a validation for MAC address itself, there are prohibited addresses like multicast and reserved addresses too. If possible to add such validation, I'd be checking for only 6 octets && if they are unicast addresses only && not from reserved range of MAC addresses.

Comment 3 Nikolai Sednev 2017-01-24 09:31:50 UTC
You may specify a unicast MAC address for the VM or accept a randomly generated default [00:16:3e:30:1b:b4]: 00:16:3E:7B:B8:5300:16:3E:7B:B8:53
[ ERROR ] Invalid unicast MAC address specified: '00:16:3E:7B:B8:5300:16:3E:7B:B8:53'
          You may specify a unicast MAC address for the VM or accept a randomly generated default [00:16:3e:30:1b:b4]: 00:16:3E:7B:B8:53
          How should the engine VM network be configured (DHCP, Static)[DHCP]? 

Works for me on these components on host:
rhevm-appliance-20161214.0-1.el7ev.noarch
ovirt-hosted-engine-ha-2.1.0-1.el7ev.noarch
ovirt-host-deploy-1.6.0-1.el7ev.noarch
ovirt-imageio-common-0.5.0-0.el7ev.noarch
ovirt-vmconsole-host-1.0.4-1.el7ev.noarch
qemu-kvm-rhev-2.6.0-28.el7_3.3.x86_64
libvirt-client-2.0.0-10.el7_3.4.x86_64
mom-0.5.8-1.el7ev.noarch
vdsm-4.19.2-2.el7ev.x86_64
ovirt-hosted-engine-setup-2.1.0-2.el7ev.noarch
ovirt-setup-lib-1.1.0-1.el7ev.noarch
ovirt-engine-sdk-python-3.6.9.1-1.el7ev.noarch
ovirt-imageio-daemon-0.5.0-0.el7ev.noarch
ovirt-vmconsole-1.0.4-1.el7ev.noarch
rhevm-appliance-20161214.0-1.el7ev.noarch
sanlock-3.4.0-1.el7.x86_64
Linux version 3.10.0-514.6.1.el7.x86_64 (mockbuild.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Sat Dec 10 11:15:38 EST 2016
Linux 3.10.0-514.6.1.el7.x86_64 #1 SMP Sat Dec 10 11:15:38 EST 2016 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 7.3 (Maipo)


Note You need to log in before you can comment on or make changes to this bug.