Update health probe script in nova
If we define ovsdb_connection in os_vif_ovs config group, health probe fails for nova-compute because of the wrong condition to detect db connection string from configuration file. This patch detects db connection string using string.startswith() in a more strict way. Change-Id: I12a3ea4061d5c13879b878b85eb206726b5db27c
This commit is contained in:
parent
7d39af25fd
commit
bd955f077f
@ -14,7 +14,7 @@ apiVersion: v1
|
||||
appVersion: v1.0.0
|
||||
description: OpenStack-Helm Nova
|
||||
name: nova
|
||||
version: 0.3.20
|
||||
version: 0.3.21
|
||||
home: https://docs.openstack.org/nova/latest/
|
||||
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Nova/OpenStack_Project_Nova_vertical.png
|
||||
sources:
|
||||
|
@ -34,6 +34,7 @@ Usage example for Nova Compute:
|
||||
import json
|
||||
import os
|
||||
import psutil
|
||||
import re
|
||||
import signal
|
||||
import socket
|
||||
import sys
|
||||
@ -142,7 +143,7 @@ def configured_port_in_conf():
|
||||
try:
|
||||
with open(sys.argv[2]) as conf_file:
|
||||
for line in conf_file:
|
||||
if "connection =" in line:
|
||||
if re.match(r'^\s*connection\s*=', line):
|
||||
service = line.split(':', 3)[3].split('/')[1].rstrip('\n')
|
||||
if service == "nova":
|
||||
database_ports.add(
|
||||
|
@ -89,4 +89,5 @@ nova:
|
||||
- 0.3.18 Fix nova ssh keys permission
|
||||
- 0.3.19 Add support for enabling vencrypt
|
||||
- 0.3.20 Add cinder auth config
|
||||
- 0.3.21 Update health probe script considering ovsdb_connection config
|
||||
...
|
||||
|
Loading…
Reference in New Issue
Block a user