[nova] I would like to add another option for cross_az_attach
Hello all, In nova with setting [cinder]/ cross_az_attach option to false, nova creates instance and volume in same AZ. but some of usecase (in my case), we need to attach new volume in different AZ to the instance. so I need two options. one is for nova block device mapping and attaching volume and another is for attaching volume in specified AZ. [cinder] cross_az_attach = False enable_az_attach_list = AZ1,AZ2 how do you all think of it? Best, Kiseok
Hi, Kim KS: "cross_az_attach"'s default value is True, that means a llow attach between instance and volume in different availability zones. If False, volumes attached to an instance must be in the same availability zone in Cinder as the instance availability zone in Nova. Another thing is, you should care booting an BFV instance from "image", and this should interact the " allow_availability_zone_fallback" in Cinder, if " allow_availability_zone_fallback=False" and *that* request AZ does not in Cinder, the request will be fail. About specify AZ to unshelve a shelved_offloaded server, about the cross_az_attach something you can know https://github.com/openstack/nova/blob/master/releasenotes/notes/bp-specifyi... Availability Zones docs, that contains some description with cinder.cross_az_attach https://docs.openstack.org/nova/latest/admin/availability-zones.html#implica... cross_az_attach configuration: https://docs.openstack.org/nova/train/configuration/config.html#cinder.cross... And cross_az_attach with the server is in https://github.com/openstack/nova/blob/master/nova/volume/cinder.py#L523-L54... I am not sure why you are need " enable_az_attach_list = AZ1,AZ2" configuration? brinzhang
cross_az_attach
Hello all,
In nova with setting [cinder]/ cross_az_attach option to false, nova creates instance and volume in same AZ.
but some of usecase (in my case), we need to attach new volume in different AZ to the instance.
so I need two options.
one is for nova block device mapping and attaching volume and another is for attaching volume in specified AZ.
[cinder] cross_az_attach = False enable_az_attach_list = AZ1,AZ2
how do you all think of it?
Best, Kiseok
Hello, Brin and Matt. and Thank you. I'll tell you more about my use case: * First, I create an instance(I'll call it NODE01) and a volume in same AZ. (so I use 'cross_az_attach = False' option) * and I create a cinder volume(I'll call it PV01) in different Volume Zone(I'll call it KubePVZone) * and then I would like to attach PV01 volume to NODE01 instance. KubePVZone is volume zone for kubernetes's persistent volume and NODE01 is a kubernetes' node. KubePVZone's volumes can be attached to the other kubernetes's nodes. So I would like to use options like: [cinder] cross_az_attach = False enable_az_attach_list = KubePVZone Let me know if there is a lack of explanation. I currently use the code by adding in to check_availability_zone method: https://github.com/openstack/nova/blob/058e77e26c1b52ab7d3a79a2b2991ca772318... + if volume['availability_zone'] in CONF.cinder.enable_az_attach_list: + LOG.info("allowed AZ for attaching in different availability zone: %s", + volume['availability_zone']) + return Best, Kiseok Kim
2020. 1. 21. 오전 11:35, Brin Zhang(张百林) <zhangbailin@inspur.com> 작성:
Hi, Kim KS: "cross_az_attach"'s default value is True, that means a llow attach between instance and volume in different availability zones. If False, volumes attached to an instance must be in the same availability zone in Cinder as the instance availability zone in Nova. Another thing is, you should care booting an BFV instance from "image", and this should interact the " allow_availability_zone_fallback" in Cinder, if " allow_availability_zone_fallback=False" and *that* request AZ does not in Cinder, the request will be fail.
About specify AZ to unshelve a shelved_offloaded server, about the cross_az_attach something you can know https://github.com/openstack/nova/blob/master/releasenotes/notes/bp-specifyi...
Availability Zones docs, that contains some description with cinder.cross_az_attach https://docs.openstack.org/nova/latest/admin/availability-zones.html#implica...
cross_az_attach configuration: https://docs.openstack.org/nova/train/configuration/config.html#cinder.cross...
And cross_az_attach with the server is in https://github.com/openstack/nova/blob/master/nova/volume/cinder.py#L523-L54...
I am not sure why you are need " enable_az_attach_list = AZ1,AZ2" configuration?
brinzhang
cross_az_attach
Hello all,
In nova with setting [cinder]/ cross_az_attach option to false, nova creates instance and volume in same AZ.
but some of usecase (in my case), we need to attach new volume in different AZ to the instance.
so I need two options.
one is for nova block device mapping and attaching volume and another is for attaching volume in specified AZ.
[cinder] cross_az_attach = False enable_az_attach_list = AZ1,AZ2
how do you all think of it?
Best, Kiseok
Hello all, Can I add the code I used above to the NOVA upstream code? Two changes: * add option "enable_az_attach_list" in nove/[cinder] * passing checking availability zone in check_availability_zone function if there is enable_az_attach_list Thanks, Kiseok Kim On Wed, Jan 22, 2020 at 3:09 PM Kim KS <kiseok7@gmail.com> wrote:
Hello, Brin and Matt. and Thank you.
I'll tell you more about my use case:
* First, I create an instance(I'll call it NODE01) and a volume in same AZ. (so I use 'cross_az_attach = False' option) * and I create a cinder volume(I'll call it PV01) in different Volume Zone(I'll call it KubePVZone) * and then I would like to attach PV01 volume to NODE01 instance.
KubePVZone is volume zone for kubernetes's persistent volume and NODE01 is a kubernetes' node. KubePVZone's volumes can be attached to the other kubernetes's nodes.
So I would like to use options like:
[cinder] cross_az_attach = False enable_az_attach_list = KubePVZone
Let me know if there is a lack of explanation.
I currently use the code by adding in to check_availability_zone method:
https://github.com/openstack/nova/blob/058e77e26c1b52ab7d3a79a2b2991ca772318...
+ if volume['availability_zone'] in CONF.cinder.enable_az_attach_list: + LOG.info("allowed AZ for attaching in different availability zone: %s", + volume['availability_zone']) + return
Best, Kiseok Kim
2020. 1. 21. 오전 11:35, Brin Zhang(张百林) <zhangbailin@inspur.com> 작성:
Hi, Kim KS: "cross_az_attach"'s default value is True, that means a llow attach between instance and volume in different availability zones. If False, volumes attached to an instance must be in the same availability zone in Cinder as the instance availability zone in Nova. Another thing is, you should care booting an BFV instance from "image", and this should interact the " allow_availability_zone_fallback" in Cinder, if " allow_availability_zone_fallback=False" and *that* request AZ does not in Cinder, the request will be fail.
About specify AZ to unshelve a shelved_offloaded server, about the cross_az_attach something you can know
https://github.com/openstack/nova/blob/master/releasenotes/notes/bp-specifyi...
Availability Zones docs, that contains some description with
cinder.cross_az_attach
https://docs.openstack.org/nova/latest/admin/availability-zones.html#implica...
cross_az_attach configuration:
https://docs.openstack.org/nova/train/configuration/config.html#cinder.cross...
And cross_az_attach with the server is in
https://github.com/openstack/nova/blob/master/nova/volume/cinder.py#L523-L54...
I am not sure why you are need " enable_az_attach_list = AZ1,AZ2"
configuration?
brinzhang
cross_az_attach
Hello all,
In nova with setting [cinder]/ cross_az_attach option to false, nova
creates
instance and volume in same AZ.
but some of usecase (in my case), we need to attach new volume in different AZ to the instance.
so I need two options.
one is for nova block device mapping and attaching volume and another is for attaching volume in specified AZ.
[cinder] cross_az_attach = False enable_az_attach_list = AZ1,AZ2
how do you all think of it?
Best, Kiseok
On 1/20/20 12:47 AM, Kim KS wrote:
In nova with setting [cinder]/ cross_az_attach option to false, nova creates instance and volume in same AZ.
but some of usecase (in my case), we need to attach new volume in different AZ to the instance.
so I need two options.
one is for nova block device mapping and attaching volume and another is for attaching volume in specified AZ.
[cinder] cross_az_attach = False enable_az_attach_list = AZ1,AZ2
how do you all think of it?
As Brin mentioned there are already config hacks in Cinder to workaround cross_az_attach issues between nova and cinder. cross_az_attach in nova is config-driven API behavior which is something to avoid if possible since it's not discoverable by the end user, so piling on more config complexity is something I'd try to avoid if possible. That option wasn't even very usable until recently [1]. Can you explain your use case a bit more? It sounds like you're trying to provide essentially default zones for nova/cinder if the server and volume are not created in a specific zone? Sort of similar to how the default_schedule_zone option in nova works if a server is created without a specific zone. [1] https://github.com/openstack/nova/commit/07a24dcef7ce6767b4b5bab0c8d3166cbe5... -- Thanks, Matt Riedemann
participants (4)
-
Brin Zhang(张百林)
-
Kim KS
-
Kim, Kiseok
-
Matt Riedemann