Re: [openstack-dev] [nova][neutron] boot server with more than one subnet selection question

2018-11-13 Thread Sean Mooney
On Tue, 2018-11-13 at 12:27 +0100, Matt Riedemann wrote:
> On 11/13/2018 4:45 AM, Chen CH Ji wrote:
> > Got it, this is what I am looking for .. thank you
> 
> Regarding that you can do with server create, I believe it's:
> 
> 1. don't specify anything for networking, you get a port on the network 
> available to you; if there are multiple networks, it's a failure and the 
> user has to specify one.
> 
> 2. specify a network, nova creates a port on that network
in this case i belive neutron alocate an 1 ipv4 adress and 1 ipv6 addres 
assumeing the network has
a subnet for each type.
> 
> 3. specify a port, nova uses that port and doesn't create anything in 
> neutron
in this case nova just reads the ips the neutron has already allocated to the 
port and list those for  the instace
> 
> 4. specify a network and fixed IP, nova creates a port on that network 
> using that fixed IP.
and in this case  nova will create the port in neutron using the fixed ip you 
supplied which will cause neutron to
attach the prot to the correct subnet
> 
> It sounds like you want #3 or #4.
> 

i think what is actully wanted is "openstack server create --nic net-id=,v4-fixed-ip="

we do not have a subnet-id option for --nic so if you want to select the subnet 
as part of the boot you have to supply
the ip. similary if you want neutron to select the ip you have to precreate teh 
port and use the --port option when
creating the vm. so as matt saidn #3 or #4 are the best solutions for your 
request.



__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova][neutron] boot server with more than one subnet selection question

2018-11-13 Thread Matt Riedemann

On 11/13/2018 4:45 AM, Chen CH Ji wrote:

Got it, this is what I am looking for .. thank you


Regarding that you can do with server create, I believe it's:

1. don't specify anything for networking, you get a port on the network 
available to you; if there are multiple networks, it's a failure and the 
user has to specify one.


2. specify a network, nova creates a port on that network

3. specify a port, nova uses that port and doesn't create anything in 
neutron


4. specify a network and fixed IP, nova creates a port on that network 
using that fixed IP.


It sounds like you want #3 or #4.

--

Thanks,

Matt

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova][neutron] boot server with more than one subnet selection question

2018-11-12 Thread Chen CH Ji
Got it, this is what I am looking for .. thank you
 
- Original message -From: Slawomir Kaplonski To: "OpenStack Development Mailing List (not for usage questions)" Cc:Subject: Re: [openstack-dev] [nova][neutron] boot server with more than one subnet selection questionDate: Tue, Nov 13, 2018 1:06 AM 
Hi,You can choose which subnet (and even IP address) should be used, see „fixed_ips” field in [1].If You will not provide anything Neutron will choose for You one IPv4 address and one IPv6 address and in both cases it will be chosen randomly from available IPs from all subnets.[1] https://developer.openstack.org/api-ref/network/v2/?expanded=create-port-detail#create-port> Wiadomość napisana przez Chen CH Ji  w dniu 12.11.2018, o godz. 13:44:>> I have a network created like below:>  > 1 network with 3 subnets (1 ipv6 and 2 ipv4) ,when boot, whether I can select subnet to boot from or the subnet will be force selected by the order the subnet created? Any document or code can be  referred? Thanks>  > | fd0e2078-044d-4c5c-b114-3858631e6328 | private   | a8184e4f-5165-4ea8-8ed8-b776d619af6e fd9b:c245:1aaa::/64 |> |                                      |           | b3ee7cad-c672-4172-a183-8e9f069bea31 10.0.0.0/26         |> |                                      |           | 9439abfd-afa2-4264-8422-977d725a7166 10.0.2.0/24         |>  >> __> OpenStack Development Mailing List (not for usage questions)> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev—Slawek KaplonskiSenior software engineerRed Hat__OpenStack Development Mailing List (not for usage questions)Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribehttp://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev 
 


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [nova][neutron] boot server with more than one subnet selection question

2018-11-12 Thread Slawomir Kaplonski
Hi,

You can choose which subnet (and even IP address) should be used, see 
„fixed_ips” field in [1].
If You will not provide anything Neutron will choose for You one IPv4 address 
and one IPv6 address and in both cases it will be chosen randomly from 
available IPs from all subnets.

[1] 
https://developer.openstack.org/api-ref/network/v2/?expanded=create-port-detail#create-port

> Wiadomość napisana przez Chen CH Ji  w dniu 12.11.2018, 
> o godz. 13:44:
> 
> I have a network created like below:
>  
> 1 network with 3 subnets (1 ipv6 and 2 ipv4) ,when boot, whether I can select 
> subnet to boot from or the subnet will be force selected by the order the 
> subnet created? Any document or code can be  referred? Thanks
>  
> | fd0e2078-044d-4c5c-b114-3858631e6328 | private   | 
> a8184e4f-5165-4ea8-8ed8-b776d619af6e fd9b:c245:1aaa::/64 |
> |  |   | 
> b3ee7cad-c672-4172-a183-8e9f069bea31 10.0.0.0/26 |
> |  |   | 
> 9439abfd-afa2-4264-8422-977d725a7166 10.0.2.0/24 |
>  
> 
> __
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

— 
Slawek Kaplonski
Senior software engineer
Red Hat


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [nova][neutron] boot server with more than one subnet selection question

2018-11-12 Thread Chen CH Ji
I have a network created like below:
 
1 network with 3 subnets (1 ipv6 and 2 ipv4) ,when boot, whether I can select subnet to boot from or the subnet will be force selected by the order the subnet created? Any document or code can be  referred? Thanks
 
| fd0e2078-044d-4c5c-b114-3858631e6328 | private   | a8184e4f-5165-4ea8-8ed8-b776d619af6e fd9b:c245:1aaa::/64 ||  |   | b3ee7cad-c672-4172-a183-8e9f069bea31 10.0.0.0/26 ||  |   | 9439abfd-afa2-4264-8422-977d725a7166 10.0.2.0/24 |
 


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev