HA: Fix the cluster common tag behaviour with podman

Since [1,2], HA container image name used in pacemaker are
look like container-common-tag/<servicename>:pcmklatest.

Unlike docker, podman prepends a host information in
front of this tag, which confuses the podman resource
agent in pacemaker.

Make the first part of the tag look like a fqdn so that
podman doesn't change it.

Closes-Bug: #1858648

[1] Id369154d147cd5cf0a6f997bf806084fc7580e01
[2] I7a63e8e2d9457c5025f3d70aeed6922e24958049

Change-Id: I07d72b87225dbadbc4df46564452ccb232593219
(cherry picked from commit b61f71a74a)
This commit is contained in:
Damien Ciabrini 2020-01-07 16:22:49 +01:00 committed by yatin
parent 9a9d0edf81
commit 8f93d271a0
11 changed files with 27 additions and 20 deletions

View File

@ -16,7 +16,7 @@ parameters:
to use a floating tag for its container image name,
e.g. 'REGISTRY/NAMESPACE/IMAGENAME:pcmklatest'. When
set to true, the service uses a floating prefix as
well, e.g. 'cluster-common-tag/IMAGENAME:pcmklatest'.
well, e.g. 'cluster.common.tag/IMAGENAME:pcmklatest'.
type: boolean
CinderBackupBackend:
default: swift
@ -123,7 +123,7 @@ outputs:
- common_tag_enabled
- yaql:
data: {get_param: ContainerCinderBackupImage}
expression: concat("cluster-common-tag/", $.data.rightSplit(separator => "/", maxSplits => 1)[1])
expression: concat("cluster.common.tag/", $.data.rightSplit(separator => "/", maxSplits => 1)[1])
- {get_param: ContainerCinderBackupImage}
expression: concat($.data.rightSplit(separator => ":", maxSplits => 1)[0], ":pcmklatest")
tripleo::profile::pacemaker::cinder::backup_bundle::docker_volumes: {get_attr: [CinderCommon, cinder_backup_volumes]}

View File

@ -16,7 +16,7 @@ parameters:
to use a floating tag for its container image name,
e.g. 'REGISTRY/NAMESPACE/IMAGENAME:pcmklatest'. When
set to true, the service uses a floating prefix as
well, e.g. 'cluster-common-tag/IMAGENAME:pcmklatest'.
well, e.g. 'cluster.common.tag/IMAGENAME:pcmklatest'.
type: boolean
EndpointMap:
default: {}
@ -109,7 +109,7 @@ outputs:
- common_tag_enabled
- yaql:
data: {get_param: ContainerCinderVolumeImage}
expression: concat("cluster-common-tag/", $.data.rightSplit(separator => "/", maxSplits => 1)[1])
expression: concat("cluster.common.tag/", $.data.rightSplit(separator => "/", maxSplits => 1)[1])
- {get_param: ContainerCinderVolumeImage}
expression: concat($.data.rightSplit(separator => ":", maxSplits => 1)[0], ":pcmklatest")
tripleo::profile::pacemaker::cinder::volume_bundle::docker_volumes: {get_attr: [CinderCommon, cinder_volume_volumes]}

View File

@ -16,7 +16,7 @@ parameters:
to use a floating tag for its container image name,
e.g. 'REGISTRY/NAMESPACE/IMAGENAME:pcmklatest'. When
set to true, the service uses a floating prefix as
well, e.g. 'cluster-common-tag/IMAGENAME:pcmklatest'.
well, e.g. 'cluster.common.tag/IMAGENAME:pcmklatest'.
type: boolean
EndpointMap:
default: {}
@ -138,7 +138,7 @@ outputs:
- common_tag_enabled
- yaql:
data: {get_param: ContainerMysqlImage}
expression: concat("cluster-common-tag/", $.data.rightSplit(separator => "/", maxSplits => 1)[1])
expression: concat("cluster.common.tag/", $.data.rightSplit(separator => "/", maxSplits => 1)[1])
- {get_param: ContainerMysqlImage}
expression: concat($.data.rightSplit(separator => ":", maxSplits => 1)[0], ":pcmklatest")
tripleo::profile::pacemaker::database::mysql_bundle::control_port: 3123

View File

@ -16,7 +16,7 @@ parameters:
to use a floating tag for its container image name,
e.g. 'REGISTRY/NAMESPACE/IMAGENAME:pcmklatest'. When
set to true, the service uses a floating prefix as
well, e.g. 'cluster-common-tag/IMAGENAME:pcmklatest'.
well, e.g. 'cluster.common.tag/IMAGENAME:pcmklatest'.
type: boolean
EndpointMap:
default: {}
@ -108,7 +108,7 @@ outputs:
- common_tag_enabled
- yaql:
data: {get_param: ContainerRedisImage}
expression: concat("cluster-common-tag/", $.data.rightSplit(separator => "/", maxSplits => 1)[1])
expression: concat("cluster.common.tag/", $.data.rightSplit(separator => "/", maxSplits => 1)[1])
- {get_param: ContainerRedisImage}
expression: concat($.data.rightSplit(separator => ":", maxSplits => 1)[0], ":pcmklatest")
tripleo::profile::pacemaker::database::redis_bundle::control_port: 3124

View File

@ -16,7 +16,7 @@ parameters:
to use a floating tag for its container image name,
e.g. 'REGISTRY/NAMESPACE/IMAGENAME:pcmklatest'. When
set to true, the service uses a floating prefix as
well, e.g. 'cluster-common-tag/IMAGENAME:pcmklatest'.
well, e.g. 'cluster.common.tag/IMAGENAME:pcmklatest'.
type: boolean
ServiceData:
default: {}
@ -191,7 +191,7 @@ outputs:
- common_tag_enabled
- yaql:
data: {get_param: ContainerHAProxyImage}
expression: concat("cluster-common-tag/", $.data.rightSplit(separator => "/", maxSplits => 1)[1])
expression: concat("cluster.common.tag/", $.data.rightSplit(separator => "/", maxSplits => 1)[1])
- {get_param: ContainerHAProxyImage}
expression: concat($.data.rightSplit(separator => ":", maxSplits => 1)[0], ":pcmklatest")
# BEGIN DOCKER SETTINGS

View File

@ -16,7 +16,7 @@ parameters:
to use a floating tag for its container image name,
e.g. 'REGISTRY/NAMESPACE/IMAGENAME:pcmklatest'. When
set to true, the service uses a floating prefix as
well, e.g. 'cluster-common-tag/IMAGENAME:pcmklatest'.
well, e.g. 'cluster.common.tag/IMAGENAME:pcmklatest'.
type: boolean
EndpointMap:
default: {}
@ -102,7 +102,7 @@ outputs:
- common_tag_enabled
- yaql:
data: {get_param: ContainerManilaShareImage}
expression: concat("cluster-common-tag/", $.data.rightSplit(separator => "/", maxSplits => 1)[1])
expression: concat("cluster.common.tag/", $.data.rightSplit(separator => "/", maxSplits => 1)[1])
- {get_param: ContainerManilaShareImage}
expression: concat($.data.rightSplit(separator => ":", maxSplits => 1)[0], ":pcmklatest")
tripleo::profile::pacemaker::manila::share_bundle::docker_volumes: {get_attr: [ManilaCommon, manila_share_volumes]}

View File

@ -16,7 +16,7 @@ parameters:
to use a floating tag for its container image name,
e.g. 'REGISTRY/NAMESPACE/IMAGENAME:pcmklatest'. When
set to true, the service uses a floating prefix as
well, e.g. 'cluster-common-tag/IMAGENAME:pcmklatest'.
well, e.g. 'cluster.common.tag/IMAGENAME:pcmklatest'.
type: boolean
EndpointMap:
default: {}
@ -120,7 +120,7 @@ outputs:
- common_tag_enabled
- yaql:
data: {get_param: ContainerOvnDbsImage}
expression: concat("cluster-common-tag/", $.data.rightSplit(separator => "/", maxSplits => 1)[1])
expression: concat("cluster.common.tag/", $.data.rightSplit(separator => "/", maxSplits => 1)[1])
- {get_param: ContainerOvnDbsImage}
expression: concat($.data.rightSplit(separator => ":", maxSplits => 1)[0], ":pcmklatest")
- tripleo::profile::pacemaker::ovn_dbs_bundle::nb_db_port: {get_param: OVNNorthboundServerPort}

View File

@ -16,7 +16,7 @@ parameters:
to use a floating tag for its container image name,
e.g. 'REGISTRY/NAMESPACE/IMAGENAME:pcmklatest'. When
set to true, the service uses a floating prefix as
well, e.g. 'cluster-common-tag/IMAGENAME:pcmklatest'.
well, e.g. 'cluster.common.tag/IMAGENAME:pcmklatest'.
type: boolean
EndpointMap:
default: {}
@ -102,7 +102,7 @@ outputs:
- common_tag_enabled
- yaql:
data: {get_param: ContainerRabbitmqImage}
expression: concat("cluster-common-tag/", $.data.rightSplit(separator => "/", maxSplits => 1)[1])
expression: concat("cluster.common.tag/", $.data.rightSplit(separator => "/", maxSplits => 1)[1])
- {get_param: ContainerRabbitmqImage}
expression: concat($.data.rightSplit(separator => ":", maxSplits => 1)[0], ":pcmklatest")
tripleo::profile::pacemaker::rabbitmq_bundle::control_port: 3122

View File

@ -16,7 +16,7 @@ parameters:
to use a floating tag for its container image name,
e.g. 'REGISTRY/NAMESPACE/IMAGENAME:pcmklatest'. When
set to true, the service uses a floating prefix as
well, e.g. 'cluster-common-tag/IMAGENAME:pcmklatest'.
well, e.g. 'cluster.common.tag/IMAGENAME:pcmklatest'.
type: boolean
EndpointMap:
default: {}
@ -102,7 +102,7 @@ outputs:
- common_tag_enabled
- yaql:
data: {get_param: ContainerRabbitmqImage}
expression: concat("cluster-common-tag/", $.data.rightSplit(separator => "/", maxSplits => 1)[1])
expression: concat("cluster.common.tag/", $.data.rightSplit(separator => "/", maxSplits => 1)[1])
- {get_param: ContainerRabbitmqImage}
expression: concat($.data.rightSplit(separator => ":", maxSplits => 1)[0], ":pcmklatest")
tripleo::profile::pacemaker::rabbitmq_bundle::control_port: 3122

View File

@ -16,7 +16,7 @@ parameters:
to use a floating tag for its container image name,
e.g. 'REGISTRY/NAMESPACE/IMAGENAME:pcmklatest'. When
set to true, the service uses a floating prefix as
well, e.g. 'cluster-common-tag/IMAGENAME:pcmklatest'.
well, e.g. 'cluster.common.tag/IMAGENAME:pcmklatest'.
type: boolean
EndpointMap:
default: {}
@ -102,7 +102,7 @@ outputs:
- common_tag_enabled
- yaql:
data: {get_param: ContainerRabbitmqImage}
expression: concat("cluster-common-tag/", $.data.rightSplit(separator => "/", maxSplits => 1)[1])
expression: concat("cluster.common.tag/", $.data.rightSplit(separator => "/", maxSplits => 1)[1])
- {get_param: ContainerRabbitmqImage}
expression: concat($.data.rightSplit(separator => ":", maxSplits => 1)[0], ":pcmklatest")
tripleo::profile::pacemaker::rabbitmq_bundle::control_port: 3122

View File

@ -0,0 +1,7 @@
---
fixes:
- |
HA container naming scheme has been updated to look like
'container.common.tag/<servicename>:pcmklatest', in order for
podman to not prepend any host suffix in front of this tag,
otherwise this confuses the podman resource agent in pacemaker.