[k8s] Fix volumes availability zone issue

For a multi AZ env, if Nova doesn't support cross AZ volume mount,
then the cluster creation may fail because of block device mapping
error. The patch fixes this issue by passing in the AZ information
when creating volumes for etcd, docker and the node root disk.

Task: 38131
Story: 2007097

Change-Id: I39c99259abc84cbbee50ac1a827e9349ede6593c
This commit is contained in:
Feilong Wang 2020-01-16 12:34:25 +13:00
parent 410b7fd105
commit a0e62df093
5 changed files with 19 additions and 0 deletions

View File

@ -780,6 +780,7 @@ resources:
image: {get_param: server_image}
size: {get_param: boot_volume_size}
volume_type: {get_param: boot_volume_type}
availability_zone: {get_param: availability_zone}
# do NOT use "_" (underscore) in the Nova server name
# it creates a mismatch between the generated Nova name and its hostname
@ -865,6 +866,7 @@ resources:
properties:
size: {get_param: etcd_volume_size}
volume_type: {get_param: etcd_volume_type}
availability_zone: {get_param: availability_zone}
etcd_volume_attach:
type: Magnum::Optional::Etcd::VolumeAttachment
@ -884,6 +886,7 @@ resources:
properties:
size: {get_param: docker_volume_size}
volume_type: {get_param: docker_volume_type}
availability_zone: {get_param: availability_zone}
docker_volume_attach:
type: Magnum::Optional::Cinder::VolumeAttachment

View File

@ -464,6 +464,7 @@ resources:
image: {get_param: server_image}
size: {get_param: boot_volume_size}
volume_type: {get_param: boot_volume_type}
availability_zone: {get_param: availability_zone}
# do NOT use "_" (underscore) in the Nova server name
# it creates a mismatch between the generated Nova name and its hostname
@ -533,6 +534,7 @@ resources:
properties:
size: {get_param: docker_volume_size}
volume_type: {get_param: docker_volume_type}
availability_zone: {get_param: availability_zone}
docker_volume_attach:
type: Magnum::Optional::Cinder::VolumeAttachment

View File

@ -783,6 +783,7 @@ resources:
image: {get_param: server_image}
size: {get_param: boot_volume_size}
volume_type: {get_param: boot_volume_type}
availability_zone: {get_param: availability_zone}
# do NOT use "_" (underscore) in the Nova server name
# it creates a mismatch between the generated Nova name and its hostname
@ -866,6 +867,7 @@ resources:
properties:
size: {get_param: etcd_volume_size}
volume_type: {get_param: etcd_volume_type}
availability_zone: {get_param: availability_zone}
etcd_volume_attach:
type: Magnum::Optional::Etcd::VolumeAttachment
@ -885,6 +887,7 @@ resources:
properties:
size: {get_param: docker_volume_size}
volume_type: {get_param: docker_volume_type}
availability_zone: {get_param: availability_zone}
docker_volume_attach:
type: Magnum::Optional::Cinder::VolumeAttachment

View File

@ -465,6 +465,7 @@ resources:
image: {get_param: server_image}
size: {get_param: boot_volume_size}
volume_type: {get_param: boot_volume_type}
availability_zone: {get_param: availability_zone}
# do NOT use "_" (underscore) in the Nova server name
# it creates a mismatch between the generated Nova name and its hostname
@ -532,6 +533,7 @@ resources:
properties:
size: {get_param: docker_volume_size}
volume_type: {get_param: docker_volume_type}
availability_zone: {get_param: availability_zone}
docker_volume_attach:
type: Magnum::Optional::Cinder::VolumeAttachment

View File

@ -0,0 +1,9 @@
---
fixes:
- |
In a multi availability zone (AZ) environment, if Nova doesn't support
cross AZ volume mount, then the cluster creation may fail because Nova can
not mount volume in different AZ. This issue only impact Fedora Atomic and
Fedora CoreOS drivers. Now this issue is fixed by passing in the AZ info
when creating volumes.