Bug 866540 - PREFIX item is not accepted into the bootstrap processus
Summary: PREFIX item is not accepted into the bootstrap processus
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: vdsm
Version: 3.1 GA
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: Dan Kenigsberg
QA Contact: Haim
URL:
Whiteboard: network
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-15 15:18 UTC by exploit
Modified: 2014-01-13 00:54 UTC (History)
12 users (show)

Fixed In Version: vdsm-4.10.3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-02 12:42:50 UTC
oVirt Team: ---
Embargoed:


Attachments (Terms of Use)

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.


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