Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 866540

Summary: PREFIX item is not accepted into the bootstrap processus
Product: [Retired] oVirt Reporter: exploit
Component: vdsmAssignee: Dan Kenigsberg <danken>
Status: CLOSED NEXTRELEASE QA Contact: Haim <hateya>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.1 GACC: abaron, acathrow, alonbl, bazulay, danken, dougsland, dyasny, exploit, iheim, mgoldboi, yeylon, ykaul
Target Milestone: ---Keywords: EasyFix
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: network
Fixed In Version: vdsm-4.10.3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-02 12:42:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description exploit 2012-10-15 15:18:06 UTC
Description of problem:
adding a new host with a preview PREFIX item into the ifcfg file prevents bootstrap to complete.

Version-Release number of selected component (if applicable):
vdsm-4.10.1-0.18.git112fd54.fc17.x86_64

How reproducible:


Steps to Reproduce:
1.having a host with a previous PREFIX=24 instead of NETMASK=255.255.255.0
2.regestering this host into engine
3.
  
Actual results:
boostrap fails

Expected results:
boostrap successes

Additional info:

Comment 1 Alon Bar-Lev 2012-11-12 00:40:23 UTC
Dan,
I think this is related to addNetwork script.

Comment 2 Dan Kenigsberg 2012-11-12 06:32:11 UTC
It is. It's also about bootstrap blindly passing the content of ifcfg-* to this script.

Comment 3 Alon Bar-Lev 2012-11-12 06:47:25 UTC
(In reply to comment #2)
> It is. It's also about bootstrap blindly passing the content of ifcfg-* to
> this script.

What do you expect, to have the network logic twice, duplicated in bootstrap and in vdsm?

Comment 4 Alon Bar-Lev 2012-11-13 20:08:46 UTC
Dan,

As we talk, this should be handled by the addNetwork script.

I will be happy if this is on the 3.2 schedule.

If that's help, the conversion function I use:

def prefix2netmask(prefix):
    return socket.inet_ntoa(
        struct.pack(
            "!I",
            int(
                (
                    ''.ljust(prefix, '1') +
                    ''.ljust(32-prefix, '0')
                ),
                2
            )
        )
    )

Maybe there is a better way... :)

Comment 5 Dan Kenigsberg 2012-11-19 12:03:50 UTC
http://gerrit.ovirt.org/9322

commit f3d315bc52e8ac5ac59ca2c5fc2bb5d1e0a2bbc0
Author: Dan Kenigsberg <danken>
Date:   Mon Nov 19 13:17:35 2012 +0200

    configNet: support PREFIX option
    
    PREFIX=16 means NETMASK=255.255.0.0.