From b61f71a74a3953b25bc9849a8e7b82bd803dc03e Mon Sep 17 00:00:00 2001 From: Damien Ciabrini Date: Tue, 7 Jan 2020 16:22:49 +0100 Subject: [PATCH] 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/: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 --- deployment/cinder/cinder-backup-pacemaker-puppet.yaml | 4 ++-- deployment/cinder/cinder-volume-pacemaker-puppet.yaml | 4 ++-- deployment/database/mysql-pacemaker-puppet.yaml | 4 ++-- deployment/database/redis-pacemaker-puppet.yaml | 4 ++-- deployment/haproxy/haproxy-pacemaker-puppet.yaml | 4 ++-- deployment/manila/manila-share-pacemaker-puppet.yaml | 4 ++-- deployment/ovn/ovn-dbs-pacemaker-puppet.yaml | 4 ++-- .../rabbitmq-messaging-notify-pacemaker-puppet.yaml | 4 ++-- .../rabbitmq/rabbitmq-messaging-pacemaker-puppet.yaml | 4 ++-- .../rabbitmq/rabbitmq-messaging-rpc-pacemaker-puppet.yaml | 4 ++-- ...cemaker-cluster-common-tag-podman-f9a71344af5c73d6.yaml | 7 +++++++ 11 files changed, 27 insertions(+), 20 deletions(-) create mode 100644 releasenotes/notes/pacemaker-cluster-common-tag-podman-f9a71344af5c73d6.yaml diff --git a/deployment/cinder/cinder-backup-pacemaker-puppet.yaml b/deployment/cinder/cinder-backup-pacemaker-puppet.yaml index cc1a88c5ff..4e88f91864 100644 --- a/deployment/cinder/cinder-backup-pacemaker-puppet.yaml +++ b/deployment/cinder/cinder-backup-pacemaker-puppet.yaml @@ -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]} diff --git a/deployment/cinder/cinder-volume-pacemaker-puppet.yaml b/deployment/cinder/cinder-volume-pacemaker-puppet.yaml index e07c409878..dbaecd0597 100644 --- a/deployment/cinder/cinder-volume-pacemaker-puppet.yaml +++ b/deployment/cinder/cinder-volume-pacemaker-puppet.yaml @@ -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]} diff --git a/deployment/database/mysql-pacemaker-puppet.yaml b/deployment/database/mysql-pacemaker-puppet.yaml index f4b81f2491..f0c3a7b9a9 100644 --- a/deployment/database/mysql-pacemaker-puppet.yaml +++ b/deployment/database/mysql-pacemaker-puppet.yaml @@ -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: {} @@ -148,7 +148,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 diff --git a/deployment/database/redis-pacemaker-puppet.yaml b/deployment/database/redis-pacemaker-puppet.yaml index 3fc68705cb..177c5574dd 100644 --- a/deployment/database/redis-pacemaker-puppet.yaml +++ b/deployment/database/redis-pacemaker-puppet.yaml @@ -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: {} @@ -114,7 +114,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 diff --git a/deployment/haproxy/haproxy-pacemaker-puppet.yaml b/deployment/haproxy/haproxy-pacemaker-puppet.yaml index fc07ff4f43..eb8d1b59c2 100644 --- a/deployment/haproxy/haproxy-pacemaker-puppet.yaml +++ b/deployment/haproxy/haproxy-pacemaker-puppet.yaml @@ -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 diff --git a/deployment/manila/manila-share-pacemaker-puppet.yaml b/deployment/manila/manila-share-pacemaker-puppet.yaml index a29a1c3b32..aa545d9027 100644 --- a/deployment/manila/manila-share-pacemaker-puppet.yaml +++ b/deployment/manila/manila-share-pacemaker-puppet.yaml @@ -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]} diff --git a/deployment/ovn/ovn-dbs-pacemaker-puppet.yaml b/deployment/ovn/ovn-dbs-pacemaker-puppet.yaml index a1d4352e7f..63b950e8b0 100644 --- a/deployment/ovn/ovn-dbs-pacemaker-puppet.yaml +++ b/deployment/ovn/ovn-dbs-pacemaker-puppet.yaml @@ -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: {} @@ -128,7 +128,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} diff --git a/deployment/rabbitmq/rabbitmq-messaging-notify-pacemaker-puppet.yaml b/deployment/rabbitmq/rabbitmq-messaging-notify-pacemaker-puppet.yaml index 1401a9cbc6..32bc2d8994 100644 --- a/deployment/rabbitmq/rabbitmq-messaging-notify-pacemaker-puppet.yaml +++ b/deployment/rabbitmq/rabbitmq-messaging-notify-pacemaker-puppet.yaml @@ -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: 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 diff --git a/deployment/rabbitmq/rabbitmq-messaging-pacemaker-puppet.yaml b/deployment/rabbitmq/rabbitmq-messaging-pacemaker-puppet.yaml index 01451c6a73..822c0eefda 100644 --- a/deployment/rabbitmq/rabbitmq-messaging-pacemaker-puppet.yaml +++ b/deployment/rabbitmq/rabbitmq-messaging-pacemaker-puppet.yaml @@ -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: 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 diff --git a/deployment/rabbitmq/rabbitmq-messaging-rpc-pacemaker-puppet.yaml b/deployment/rabbitmq/rabbitmq-messaging-rpc-pacemaker-puppet.yaml index abd408edfe..083b8e0974 100644 --- a/deployment/rabbitmq/rabbitmq-messaging-rpc-pacemaker-puppet.yaml +++ b/deployment/rabbitmq/rabbitmq-messaging-rpc-pacemaker-puppet.yaml @@ -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: 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 diff --git a/releasenotes/notes/pacemaker-cluster-common-tag-podman-f9a71344af5c73d6.yaml b/releasenotes/notes/pacemaker-cluster-common-tag-podman-f9a71344af5c73d6.yaml new file mode 100644 index 0000000000..e7d4b08711 --- /dev/null +++ b/releasenotes/notes/pacemaker-cluster-common-tag-podman-f9a71344af5c73d6.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + HA container naming scheme has been updated to look like + 'container.common.tag/: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.