Browse Source

Add timestamps to nova/placement wait for scripts

Related-bug: #1951577

Change-Id: I5ca99f53540d27b3e7824d22910ddc69cae3c9d0
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
changes/26/818726/1
Bogdan Dobrelya 9 months ago
parent
commit
dbf5d36fdf
  1. 12
      container_config_scripts/nova_wait_for_api_service.py
  2. 12
      container_config_scripts/nova_wait_for_compute_service.py
  3. 12
      container_config_scripts/placement_wait_for_service.py

12
container_config_scripts/nova_wait_for_api_service.py

@ -16,6 +16,7 @@
import argparse
from configparser import ConfigParser
import logging
import logging.handlers
import os
import sys
import time
@ -37,8 +38,17 @@ if debug.lower() == 'true':
else:
loglevel = logging.INFO
logging.basicConfig(stream=sys.stdout, level=loglevel)
LOG = logging.getLogger('nova_wait_for_api_service')
LOG_FORMAT = ('%(asctime)s.%(msecs)03d %(levelname)s '
'%(name)s %(message)s')
DATE_FORMAT = '%Y-%m-%d %H:%M:%S'
LOG.handlers.clear()
LOG.setLevel(loglevel)
LOG.propagate = True
formatter = logging.Formatter(fmt=LOG_FORMAT, datefmt=DATE_FORMAT)
stream_handler = logging.StreamHandler(sys.stdout)
stream_handler.setFormatter(formatter)
LOG.addHandler(stream_handler)
iterations = 60
timeout = 10

12
container_config_scripts/nova_wait_for_compute_service.py

@ -16,6 +16,7 @@
import argparse
from configparser import ConfigParser
import logging
import logging.handlers
import os
import socket
import sys
@ -37,8 +38,17 @@ if debug.lower() == 'true':
else:
loglevel = logging.INFO
logging.basicConfig(stream=sys.stdout, level=loglevel)
LOG = logging.getLogger('nova_wait_for_compute_service')
LOG_FORMAT = ('%(asctime)s.%(msecs)03d %(levelname)s '
'%(name)s %(message)s')
DATE_FORMAT = '%Y-%m-%d %H:%M:%S'
LOG.handlers.clear()
LOG.setLevel(loglevel)
LOG.propagate = True
formatter = logging.Formatter(fmt=LOG_FORMAT, datefmt=DATE_FORMAT)
stream_handler = logging.StreamHandler(sys.stdout)
stream_handler.setFormatter(formatter)
LOG.addHandler(stream_handler)
iterations = 60
timeout = 10

12
container_config_scripts/placement_wait_for_service.py

@ -19,6 +19,7 @@
from configparser import ConfigParser
import logging
import logging.handlers
import os
import re
import sys
@ -39,8 +40,17 @@ if debug.lower() == 'true':
else:
loglevel = logging.INFO
logging.basicConfig(stream=sys.stdout, level=loglevel)
LOG = logging.getLogger('placement_wait_for_service')
LOG_FORMAT = ('%(asctime)s.%(msecs)03d %(levelname)s '
'%(name)s %(message)s')
DATE_FORMAT = '%Y-%m-%d %H:%M:%S'
LOG.handlers.clear()
LOG.setLevel(loglevel)
LOG.propagate = True
formatter = logging.Formatter(fmt=LOG_FORMAT, datefmt=DATE_FORMAT)
stream_handler = logging.StreamHandler(sys.stdout)
stream_handler.setFormatter(formatter)
LOG.addHandler(stream_handler)
iterations = 60
timeout = 10

Loading…
Cancel
Save