Browse Source

Make clustercheck service accessible over socat

Allow clustercheck to be started on-demand by socat in addition
to xinetd. Make socat the new default as xinetd will get deprecated
eventually.

Depends-On: Ie7ede82a755e729d66e077f97e87b3d6c816ed3c
Change-Id: I7d87b5861a576cf4849a25cd1d3f5e77568de1e4
Closes-Bug: #1928693
changes/67/792667/2
Damien Ciabrini 4 weeks ago
parent
commit
d6c2740a8f
1 changed files with 17 additions and 2 deletions
  1. +17
    -2
      deployment/pacemaker/clustercheck-container-puppet.yaml

+ 17
- 2
deployment/pacemaker/clustercheck-container-puppet.yaml View File

@ -35,6 +35,12 @@ parameters:
default: {}
description: Parameters specific to the role
type: json
ClustercheckListener:
default: 'socat'
description: How to expose the clustercheck service over TCP
type: string
constraints:
- allowed_values: ['socat', 'xinetd']
resources:
@ -50,6 +56,9 @@ resources:
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
conditions:
socat_listener: {equals: [{get_param: ClustercheckListener}, 'socat']}
outputs:
role_data:
description: Containerized service clustercheck using composable services.
@ -61,8 +70,9 @@ outputs:
- tripleo::profile::pacemaker::clustercheck::bind_address:
str_replace:
template:
"%{hiera('fqdn_$NETWORK')}"
"%{hiera('$FQDN$NETWORK')}"
params:
$FQDN: {if: ["socat_listener", "", "fqdn_"]}
$NETWORK: {get_param: [ServiceNetMap, MysqlNetwork]}
# BEGIN DOCKER SETTINGS #
puppet_config:
@ -72,7 +82,12 @@ outputs:
config_image: {get_param: ContainerClustercheckConfigImage}
kolla_config:
/var/lib/kolla/config_files/clustercheck.json:
command: /usr/sbin/xinetd -dontfork
command:
if:
- socat_listener
# Note: we can't quotes multiple parameters in kolla command, hence the workaround
- bash -c $* -- eval source /etc/sysconfig/clustercheck; exec socat "$TRIPLEO_SOCAT_BIND" exec:/usr/bin/clustercheck,nofork
- /usr/sbin/xinetd -dontfork
config_files:
- source: "/var/lib/kolla/config_files/src/*"
dest: "/"


Loading…
Cancel
Save