diff --git a/magnum/drivers/k8s_fedora_atomic_v1/templates/kubemaster.yaml b/magnum/drivers/k8s_fedora_atomic_v1/templates/kubemaster.yaml index 9eaf91e0cf..e8a4279876 100644 --- a/magnum/drivers/k8s_fedora_atomic_v1/templates/kubemaster.yaml +++ b/magnum/drivers/k8s_fedora_atomic_v1/templates/kubemaster.yaml @@ -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 diff --git a/magnum/drivers/k8s_fedora_atomic_v1/templates/kubeminion.yaml b/magnum/drivers/k8s_fedora_atomic_v1/templates/kubeminion.yaml index 085291292f..47343810eb 100644 --- a/magnum/drivers/k8s_fedora_atomic_v1/templates/kubeminion.yaml +++ b/magnum/drivers/k8s_fedora_atomic_v1/templates/kubeminion.yaml @@ -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 diff --git a/magnum/drivers/k8s_fedora_coreos_v1/templates/kubemaster.yaml b/magnum/drivers/k8s_fedora_coreos_v1/templates/kubemaster.yaml index 2c4007f457..f3b05308ef 100644 --- a/magnum/drivers/k8s_fedora_coreos_v1/templates/kubemaster.yaml +++ b/magnum/drivers/k8s_fedora_coreos_v1/templates/kubemaster.yaml @@ -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 diff --git a/magnum/drivers/k8s_fedora_coreos_v1/templates/kubeminion.yaml b/magnum/drivers/k8s_fedora_coreos_v1/templates/kubeminion.yaml index c14a2c6cb0..62f812c806 100644 --- a/magnum/drivers/k8s_fedora_coreos_v1/templates/kubeminion.yaml +++ b/magnum/drivers/k8s_fedora_coreos_v1/templates/kubeminion.yaml @@ -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 diff --git a/releasenotes/notes/k8s-volumes-az-fix-85ad48998d2c12aa.yaml b/releasenotes/notes/k8s-volumes-az-fix-85ad48998d2c12aa.yaml new file mode 100644 index 0000000000..35997554f4 --- /dev/null +++ b/releasenotes/notes/k8s-volumes-az-fix-85ad48998d2c12aa.yaml @@ -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. +