← Back to team overview

openstack team mailing list archive

Re: [Netstack] Interaction between nova and melange : ip fixed not found

 

2012/2/29 Dan Wendlandt <dan@xxxxxxxxxx>:
>
>
> 2012/2/29 Jérôme Gallard <jeronimo974@xxxxxxxxx>
>>
>> Hi Jason,
>>
>> Thank you very much for your answer.
>> The problem about the wrong ip address is solved now! Perhaps this
>> octect should be excluded automatically by nova at the network
>> creation time?
>
>
> I agree that it seems reasonable to have the default exclude the .0
> address.
>

Agree that it would  be nice if Melange is smart enough to exclude the
network and broadcast addresses... but excluding  .0 might not always
be accurate - e.g. when subnetting, melange will still allocate
network addresses.

>>
>>
>> Regarding the other problem about nova/melange, in fact, I creates all
>> my networks with the nova-manage command:
>> nova-manage network create --label=public
>> --project_id=def761d251814aa8a10a1e268206f02d
>> --fixed_range_v4=172.16.0.0/24 --priority=0 --gateway=172.16.0.1
>> But it seems that the nova.fixed_ips table is not well filled.
>
>
> When using melange, the nova DB is not used to store IP address allocations.
>  They are stored in Melange.  We allow network create using nova-manage
> purely for backward compatibility.  The underlying implementation is totally
> different, with Nova effectively acting as a client to proxy calls to
> Quantum + Melange.  Hope that helps.
>
> Dan
>
>
>>
>>
>> Thanks again,
>> Jérôme
>>
>> On Tue, Feb 28, 2012 at 16:31, Jason Kölker <jkoelker@xxxxxxxxxxxxx>
>> wrote:
>> > On Tue, 2012-02-28 at 11:52 +0100, Jérôme Gallard wrote:
>> >> Hi all,
>> >>
>> >> I use the trunk version of Nova, Quantum (with the OVS plugin) and
>> >> Melange.
>> >> I created networks, everything seems to be right.
>> >>
>> >> I have two questions :
>> >> - the first VM I boot takes always a wrong IP address (for instance
>> >> 172.16.0.0). However, when I boot a second VM, this one takes a good
>> >> IP (for instance 172.16.0.2). Do you know why this can happened ?
>> >
>> > The default melange policy allows assignment of the network address and
>> > synthesise a gateway address (if it is not specified). It will not hand
>> > out the gateway address. The "fix" is to create an ip policy that
>> > restricts the octect 0. I think the syntax is something like
>> >
>> > `melange policy create -t {tennant} name={block_name}
>> > desc={policy_name}` (This should return the policy_id for the next
>> > command)
>> >
>> > `melange unusable_ip_octet create -t {tennant} policy_id={policy_id}
>> > octect=0`
>> >
>> > `melange ip_block update -t {tennant} id={block_id}
>> > policy_id={policy_id}`
>> >
>> >
>> >> - I have an error regarding an fixed IP not found. Effectively, when I
>> >> check the nova database, the fixed_ip table is empty but as I am using
>> >> quantum and melange and their tables seems to be nicely filled. Do you
>> >> have an idea about this issue ?
>> >> This is a copy/paste of the error:
>> >> 2012-02-28 10:45:53 DEBUG nova.rpc.common [-] received
>> >> {u'_context_roles': [u'admin'], u'_context_request_id':
>> >> u'req-461788a6-3570-4fa9-8620-6705eb69243c', u│··
>> >> '_context_read_deleted': u'no', u'args': {u'address': u'172.16.0.2'},
>> >> u'_context_auth_token': None, u'_context_strategy': u'noauth',
>> >> u'_context_is_admin': Tr│··
>> >> ue, u'_context_project_id': None, u'_context_timestamp':
>> >> u'2012-02-28T09:45:53.484445', u'_context_user_id': None, u'method':
>> >> u'lease_fixed_ip', u'_context_r│··
>> >> emote_address': None} from (pid=8844) _safe_log
>> >> /usr/local/src/nova/nova/rpc/common.py:144 │··
>> >> 2012-02-28 10:45:53 DEBUG nova.rpc.common
>> >> [req-461788a6-3570-4fa9-8620-6705eb69243c None None] unpacked context:
>> >> {'request_id': u'req-461788a6-3570-4fa9-8620│··
>> >> -6705eb69243c', 'user_id': None, 'roles': [u'admin'], 'timestamp':
>> >> '2012-02-28T09:45:53.484445', 'is_admin': True, 'auth_token': None,
>> >> 'project_id': None, 'r│··
>> >> emote_address': None, 'read_deleted': u'no', 'strategy': u'noauth'}
>> >> from (pid=8844) unpack_context
>> >> /usr/local/src/nova/nova/rpc/amqp.py:187 │··
>> >> 2012-02-28 10:45:53 DEBUG nova.network.manager
>> >> [req-461788a6-3570-4fa9-8620-6705eb69243c None None] Leased IP
>> >> |172.16.0.2| from (pid=8844) lease_fixed_ip
>> >> /us│··r/local/src/nova/nova/network/manager.py:1186 │··
>> >> 2012-02-28 10:45:53 ERROR nova.rpc.common [-] Exception during message
>> >> handling │··(nova.rpc.common): TRACE: Traceback (most recent call
>> >> last): │··
>> >> (nova.rpc.common): TRACE: File "/usr/local/src/nova/nova/rpc/amqp.py",
>> >> line 250, in _process_data │··(nova.rpc.common): TRACE: rval =
>> >> node_func(context=ctxt, **node_args) │··(nova.rpc.common): TRACE: File
>> >> "/usr/local/src/nova/nova/network/manager.py", line 1187, in
>> >> lease_fixed_ip │··(nova.rpc.common): TRACE: fixed_ip =
>> >> self.db.fixed_ip_get_by_address(context, address) │··
>> >> (nova.rpc.common): TRACE: File "/usr/local/src/nova/nova/db/api.py",
>> >> line 473, in fixed_ip_get_by_address │··(nova.rpc.common): TRACE:
>> >> return IMPL.fixed_ip_get_by_address(context, address)
>> >> │··(nova.rpc.common): TRACE: File
>> >> "/usr/local/src/nova/nova/db/sqlalchemy/api.py", line 119, in wrapper
>> >> │··
>> >> (nova.rpc.common): TRACE: return f(*args, **kwargs)
>> >> │··(nova.rpc.common): TRACE: File
>> >> "/usr/local/src/nova/nova/db/sqlalchemy/api.py", line 1131, in
>> >> fixed_ip_get_by_address │··
>> >> (nova.rpc.common): TRACE: raise
>> >> exception.FixedIpNotFoundForAddress(address=address) │··
>> >> (nova.rpc.common): TRACE: FixedIpNotFoundForAddress: Fixed ip not
>> >> found for address 172.16.0.2. │··
>> >> (nova.rpc.common): TRACE:
>> >
>> > You need to create your networks through nova-manage, otherwise the nova
>> > tables don't get filled in. The next release we are axing the nova
>> > tables as it was just a crutch to get it "usable".
>> >
>> > Happy Hacking!
>> >
>> > 7-11
>> >
>> >
>> > _______________________________________________
>> > Mailing list: https://launchpad.net/~openstack
>> > Post to     : openstack@xxxxxxxxxxxxxxxxxxx
>> > Unsubscribe : https://launchpad.net/~openstack
>> > More help   : https://help.launchpad.net/ListHelp
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~openstack
>> More help   : https://help.launchpad.net/ListHelp
>
>
>
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Dan Wendlandt
> Nicira Networks: www.nicira.com
> twitter: danwendlandt
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> --
> Mailing list: https://launchpad.net/~netstack
> Post to     : netstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~netstack
> More help   : https://help.launchpad.net/ListHelp
>


References