)]}'
{"cinder/templates/bin/_cinder-readiness.sh.tpl":[{"author":{"_account_id":24816,"name":"Anthony Bellino","email":"ab2434@att.com","username":"anthony.bellino"},"change_message_id":"3efef2d66ea9038da22aa53e07f22c29587b5d1b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{{/*"},{"line_number":2,"context_line":"Copyright 2018 OpenStack Tripleo-Common authors."},{"line_number":3,"context_line":"Copyright 2018 OpenStack-Helm authors."},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":6,"context_line":"you may not use this file except in compliance with the License."},{"line_number":7,"context_line":"You may obtain a copy of the License at"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"   http://www.apache.org/licenses/LICENSE-2.0"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Unless required by applicable law or agreed to in writing, software"},{"line_number":12,"context_line":"distributed under the License is distributed on an \"AS IS\" BASIS,"},{"line_number":13,"context_line":"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied."},{"line_number":14,"context_line":"See the License for the specific language governing permissions and"},{"line_number":15,"context_line":"limitations under the License."},{"line_number":16,"context_line":"*/}}"},{"line_number":17,"context_line":"{{/* TODO(lamt): This code leverages worked done by the TripleO team [0]"},{"line_number":18,"context_line":"to provide a base readinessProbe test for some of the services. This can"},{"line_number":19,"context_line":"be expanded later to include additional readinessProbe criteria."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"[0] https://github.com/openstack/tripleo-common/tree/master/healthcheck"},{"line_number":22,"context_line":"*/}}"},{"line_number":23,"context_line":"#!/bin/bash"},{"line_number":24,"context_line":"set -ex"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"process\u003d\"${1:-process}\""},{"line_number":27,"context_line":"ports\u003d\"${RABBITMQ_PORTS}\""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"healthcheck () {"},{"line_number":30,"context_line":"  process\u003d$1"},{"line_number":31,"context_line":"  ports\u003d$2"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"  # ss truncate command name to 15 characters and this behaviour cannot"},{"line_number":34,"context_line":"  # be disabled"},{"line_number":35,"context_line":"  if [ ${#process} -gt 15 ] ; then"},{"line_number":36,"context_line":"    process\u003d${process:0:15}"},{"line_number":37,"context_line":"  fi"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"  ss -n -p -A tcp \"( dst :${ports} )\" | grep \"$process\""},{"line_number":40,"context_line":"}"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"if healthcheck $process $ports ; then"},{"line_number":43,"context_line":"  exit 0"},{"line_number":44,"context_line":"else"},{"line_number":45,"context_line":"  # NOTE(lamt): There is no process with opened RabbitMQ ports running in this"},{"line_number":46,"context_line":"  # container\u0027s network and pid namespace, the readinessProbe should fail."},{"line_number":47,"context_line":"  exit 1"},{"line_number":48,"context_line":"fi"}],"source_content_type":"text/x-smarty","patch_set":13,"id":"5f7c97a3_895560fb","line":48,"range":{"start_line":1,"start_character":0,"end_line":48,"end_character":2},"updated":"2018-06-26 21:01:53.000000000","message":"could we maintain this file in a common healthcheck templates dir for example? Content wise it\u0027s the same as in PS [0].\n\n[0] https://review.openstack.org/#/c/577298/","commit_id":"2fc938dc54220f1a06c4922dd4c1f1b0affe8902"}]}
