Nova Flat network configuration

Asked by Shiny Sebastian

Hi,

I am trying to install nova on multiple nodes following your documentation at http://wiki.openstack.org/NovaInstall/MultipleServer.
In /etc/nova/nova.conf there are two parameters to be configured fixed_range and network_size. For instance I have configured them as :
--fixed_range=65.123.202.121/30
--network_size=4
(i.e Only 121-124 IPs are available for VMs)
Since network_size could be derived from fixed_range aren't these redundant?

Also, as I run "$nova-manage network create", it goes into an infinite loop. I assumed it to pick values from nova.conf.
Later I tried providing options in the command prompt. It throws error as below.

{{{
## nova-manage network create 65.123.202.121/30 4 124
Traceback (most recent call last):
  File "/usr/bin/nova-manage", line 513, in <module>
    main()
  File "/usr/bin/nova-manage", line 505, in main
    fn(*argv)
  File "/usr/bin/nova-manage", line 430, in create
    int(vpn_start))
  File "/usr/lib/pymodules/python2.6/nova/network/manager.py", line 471, in create_networks
    fixed_net = IPy.IP(cidr)
  File "/usr/lib/pymodules/python2.6/IPy.py", line 203, in __init__
    raise ValueError, "%s has invalid prefix length (%s)" % (repr(self), self._prefixlen)
ValueError: IP('65.123.202.121/30') has invalid prefix length (30)
}}}

Could you please tell me if num_networks is the same as network_size in nova.conf and what does total_ips mean. Also isnt cidr same as fixed_range of nova.conf?

Thanks
Shiny

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Shiny Sebastian
Solved:
Last query:
Last reply:
Revision history for this message
Vish Ishaya (vishvananda) said :
#1

The network_size is to support multiple networks from the same range. This is important in vlan mode where every project gets a fixed chunk from the overall range. It is obviously redundant if you only have one network which the "standard" way of doing flat networks.

Your error is because 121 isn't a valid beginning of a /30. If you want to use those four addresses, you are probably going to have to hack the db manually. You could try
"65.123.202.120/29" with a size of 8 and then mark the first ip and the last 4 reserved in the db.

num_networks is the number of networks to allow, and for flat networking you should probably just set it to 1.

cidr is the range of the network and if you just have one network it will be the same as the fixed_range.

Vish

On Dec 13, 2010, at 9:07 AM, Shiny Sebastian wrote:

> New question #137674 on OpenStack Compute (nova):
> https://answers.launchpad.net/nova/+question/137674
>
> Hi,
>
> I am trying to install nova on multiple nodes following your documentation at http://wiki.openstack.org/NovaInstall/MultipleServer.
> In /etc/nova/nova.conf there are two parameters to be configured fixed_range and network_size. For instance I have configured them as :
> --fixed_range=65.123.202.121/30
> --network_size=4
> (i.e Only 121-124 IPs are available for VMs)
> Since network_size could be derived from fixed_range aren't these redundant?
>
> Also, as I run "$nova-manage network create", it goes into an infinite loop. I assumed it to pick values from nova.conf.
> Later I tried providing options in the command prompt. It throws error as below.
>
> {{{
> ## nova-manage network create 65.123.202.121/30 4 124
> Traceback (most recent call last):
> File "/usr/bin/nova-manage", line 513, in <module>
> main()
> File "/usr/bin/nova-manage", line 505, in main
> fn(*argv)
> File "/usr/bin/nova-manage", line 430, in create
> int(vpn_start))
> File "/usr/lib/pymodules/python2.6/nova/network/manager.py", line 471, in create_networks
> fixed_net = IPy.IP(cidr)
> File "/usr/lib/pymodules/python2.6/IPy.py", line 203, in __init__
> raise ValueError, "%s has invalid prefix length (%s)" % (repr(self), self._prefixlen)
> ValueError: IP('65.123.202.121/30') has invalid prefix length (30)
> }}}
>
> Could you please tell me if num_networks is the same as network_size in nova.conf and what does total_ips mean. Also isnt cidr same as fixed_range of nova.conf?
>
> Thanks
> Shiny
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Revision history for this message
Shiny Sebastian (shinys) said :
#2

Thanks for answering the question.

I set it as "nova-manage network create 65.123.202.120/30 1 4 "

and it worked for flat network configuration.

Regards,
Shiny

Revision history for this message
Lucky T (tejeshmk) said :
#3

Hi Shiny,

         Can you share your flat network configuration /etc/nova/nova.conf & /etc/network/interface (compute). Also, can you tel me what are all the packages we should install in vm instance? also can you share /etc/network/interface (vm instance)?

I'm not able to setup flat network.. plz help me to solve this issue...

Thanks in advance.

Lucky