Split diskimage-builder built images out
This is the second part of splitting out log files for image builds; putting diskimage-builder logs into separate files. They are added with a special "dib" provider to keep them grouped. Change-Id: I6406f63df2f625beee57d7ff9707bd3b4f3fc060
This commit is contained in:
parent
db06bd5189
commit
11b08498da
@ -6,10 +6,10 @@
|
||||
#
|
||||
|
||||
[loggers]
|
||||
keys=root,nodepool,requests,image,rax-dfw_devstack-precise,rax-dfw_bare-precise,rax-dfw_devstack-trusty,rax-dfw_bare-trusty,rax-dfw_bare-centos6,rax-dfw_centos-6,rax-dfw_devstack-f21,rax-dfw_devstack-centos7,rax-ord_devstack-precise,rax-ord_bare-precise,rax-ord_devstack-trusty,rax-ord_bare-trusty,rax-ord_bare-centos6,rax-ord_centos-6,rax-ord_devstack-f21,rax-ord_devstack-centos7,rax-iad_devstack-precise,rax-iad_bare-precise,rax-iad_devstack-trusty,rax-iad_bare-trusty,rax-iad_bare-centos6,rax-iad_centos-6,rax-iad_devstack-precise-check,rax-iad_devstack-f21,rax-iad_devstack-centos7,hpcloud-region-a_devstack-precise-check,hpcloud-b1_devstack-precise-check,hpcloud-b1_devstack-precise,hpcloud-b1_bare-precise,hpcloud-b1_devstack-trusty,hpcloud-b1_bare-trusty,hpcloud-b1_bare-centos6,hpcloud-b1_centos-6,hpcloud-b1_devstack-f21,hpcloud-b1_devstack-centos7,hpcloud-b1_devstack-centos7-dib,hpcloud-b1_devstack-fedora21-dib,hpcloud-b2_devstack-precise-check,hpcloud-b2_devstack-precise,hpcloud-b2_bare-precise,hpcloud-b2_devstack-trusty,hpcloud-b2_bare-trusty,hpcloud-b2_bare-centos6,hpcloud-b2_centos-6,hpcloud-b2_devstack-f21,hpcloud-b2_devstack-centos7,hpcloud-b2_devstack-centos7-dib,hpcloud-b2_devstack-fedora21-dib,hpcloud-b3_devstack-precise-check,hpcloud-b3_devstack-precise,hpcloud-b3_bare-precise,hpcloud-b3_devstack-trusty,hpcloud-b3_bare-trusty,hpcloud-b3_bare-centos6,hpcloud-b3_centos-6,hpcloud-b3_devstack-f21,hpcloud-b3_devstack-centos7,hpcloud-b3_devstack-centos7-dib,hpcloud-b3_devstack-fedora21-dib,hpcloud-b4_devstack-precise-check,hpcloud-b4_devstack-precise,hpcloud-b4_bare-precise,hpcloud-b4_devstack-trusty,hpcloud-b4_bare-trusty,hpcloud-b4_bare-centos6,hpcloud-b4_centos-6,hpcloud-b4_devstack-f21,hpcloud-b4_devstack-centos7,hpcloud-b4_devstack-centos7-dib,hpcloud-b4_devstack-fedora21-dib,hpcloud-b5_devstack-precise-check,hpcloud-b5_devstack-precise,hpcloud-b5_bare-precise,hpcloud-b5_devstack-trusty,hpcloud-b5_bare-trusty,hpcloud-b5_bare-centos6,hpcloud-b5_centos-6,hpcloud-b5_devstack-f21,hpcloud-b5_devstack-centos7,hpcloud-b5_devstack-centos7-dib,hpcloud-b5_devstack-fedora21-dib,tripleo-test-cloud-rh1_tripleo-precise,tripleo-test-cloud-rh1_tripleo-f20
|
||||
keys=root,nodepool,requests,image,rax-dfw_devstack-precise,rax-dfw_bare-precise,rax-dfw_devstack-trusty,rax-dfw_bare-trusty,rax-dfw_bare-centos6,rax-dfw_centos-6,rax-dfw_devstack-f21,rax-dfw_devstack-centos7,rax-ord_devstack-precise,rax-ord_bare-precise,rax-ord_devstack-trusty,rax-ord_bare-trusty,rax-ord_bare-centos6,rax-ord_centos-6,rax-ord_devstack-f21,rax-ord_devstack-centos7,rax-iad_devstack-precise,rax-iad_bare-precise,rax-iad_devstack-trusty,rax-iad_bare-trusty,rax-iad_bare-centos6,rax-iad_centos-6,rax-iad_devstack-precise-check,rax-iad_devstack-f21,rax-iad_devstack-centos7,hpcloud-region-a_devstack-precise-check,hpcloud-b1_devstack-precise-check,hpcloud-b1_devstack-precise,hpcloud-b1_bare-precise,hpcloud-b1_devstack-trusty,hpcloud-b1_bare-trusty,hpcloud-b1_bare-centos6,hpcloud-b1_centos-6,hpcloud-b1_devstack-f21,hpcloud-b1_devstack-centos7,hpcloud-b1_devstack-centos7-dib,hpcloud-b1_devstack-fedora21-dib,hpcloud-b2_devstack-precise-check,hpcloud-b2_devstack-precise,hpcloud-b2_bare-precise,hpcloud-b2_devstack-trusty,hpcloud-b2_bare-trusty,hpcloud-b2_bare-centos6,hpcloud-b2_centos-6,hpcloud-b2_devstack-f21,hpcloud-b2_devstack-centos7,hpcloud-b2_devstack-centos7-dib,hpcloud-b2_devstack-fedora21-dib,hpcloud-b3_devstack-precise-check,hpcloud-b3_devstack-precise,hpcloud-b3_bare-precise,hpcloud-b3_devstack-trusty,hpcloud-b3_bare-trusty,hpcloud-b3_bare-centos6,hpcloud-b3_centos-6,hpcloud-b3_devstack-f21,hpcloud-b3_devstack-centos7,hpcloud-b3_devstack-centos7-dib,hpcloud-b3_devstack-fedora21-dib,hpcloud-b4_devstack-precise-check,hpcloud-b4_devstack-precise,hpcloud-b4_bare-precise,hpcloud-b4_devstack-trusty,hpcloud-b4_bare-trusty,hpcloud-b4_bare-centos6,hpcloud-b4_centos-6,hpcloud-b4_devstack-f21,hpcloud-b4_devstack-centos7,hpcloud-b4_devstack-centos7-dib,hpcloud-b4_devstack-fedora21-dib,hpcloud-b5_devstack-precise-check,hpcloud-b5_devstack-precise,hpcloud-b5_bare-precise,hpcloud-b5_devstack-trusty,hpcloud-b5_bare-trusty,hpcloud-b5_bare-centos6,hpcloud-b5_centos-6,hpcloud-b5_devstack-f21,hpcloud-b5_devstack-centos7,hpcloud-b5_devstack-centos7-dib,hpcloud-b5_devstack-fedora21-dib,tripleo-test-cloud-rh1_tripleo-precise,tripleo-test-cloud-rh1_tripleo-f20,dib_centos-6,dib_devstack-trusty,dib_devstack-precise,dib_devstack-centos7-dib,dib_devstack-fedora21-dib
|
||||
|
||||
[handlers]
|
||||
keys=console,debug,normal,image,rax-dfw_devstack-precise,rax-dfw_bare-precise,rax-dfw_devstack-trusty,rax-dfw_bare-trusty,rax-dfw_bare-centos6,rax-dfw_centos-6,rax-dfw_devstack-f21,rax-dfw_devstack-centos7,rax-ord_devstack-precise,rax-ord_bare-precise,rax-ord_devstack-trusty,rax-ord_bare-trusty,rax-ord_bare-centos6,rax-ord_centos-6,rax-ord_devstack-f21,rax-ord_devstack-centos7,rax-iad_devstack-precise,rax-iad_bare-precise,rax-iad_devstack-trusty,rax-iad_bare-trusty,rax-iad_bare-centos6,rax-iad_centos-6,rax-iad_devstack-precise-check,rax-iad_devstack-f21,rax-iad_devstack-centos7,hpcloud-region-a_devstack-precise-check,hpcloud-b1_devstack-precise-check,hpcloud-b1_devstack-precise,hpcloud-b1_bare-precise,hpcloud-b1_devstack-trusty,hpcloud-b1_bare-trusty,hpcloud-b1_bare-centos6,hpcloud-b1_centos-6,hpcloud-b1_devstack-f21,hpcloud-b1_devstack-centos7,hpcloud-b1_devstack-centos7-dib,hpcloud-b1_devstack-fedora21-dib,hpcloud-b2_devstack-precise-check,hpcloud-b2_devstack-precise,hpcloud-b2_bare-precise,hpcloud-b2_devstack-trusty,hpcloud-b2_bare-trusty,hpcloud-b2_bare-centos6,hpcloud-b2_centos-6,hpcloud-b2_devstack-f21,hpcloud-b2_devstack-centos7,hpcloud-b2_devstack-centos7-dib,hpcloud-b2_devstack-fedora21-dib,hpcloud-b3_devstack-precise-check,hpcloud-b3_devstack-precise,hpcloud-b3_bare-precise,hpcloud-b3_devstack-trusty,hpcloud-b3_bare-trusty,hpcloud-b3_bare-centos6,hpcloud-b3_centos-6,hpcloud-b3_devstack-f21,hpcloud-b3_devstack-centos7,hpcloud-b3_devstack-centos7-dib,hpcloud-b3_devstack-fedora21-dib,hpcloud-b4_devstack-precise-check,hpcloud-b4_devstack-precise,hpcloud-b4_bare-precise,hpcloud-b4_devstack-trusty,hpcloud-b4_bare-trusty,hpcloud-b4_bare-centos6,hpcloud-b4_centos-6,hpcloud-b4_devstack-f21,hpcloud-b4_devstack-centos7,hpcloud-b4_devstack-centos7-dib,hpcloud-b4_devstack-fedora21-dib,hpcloud-b5_devstack-precise-check,hpcloud-b5_devstack-precise,hpcloud-b5_bare-precise,hpcloud-b5_devstack-trusty,hpcloud-b5_bare-trusty,hpcloud-b5_bare-centos6,hpcloud-b5_centos-6,hpcloud-b5_devstack-f21,hpcloud-b5_devstack-centos7,hpcloud-b5_devstack-centos7-dib,hpcloud-b5_devstack-fedora21-dib,tripleo-test-cloud-rh1_tripleo-precise,tripleo-test-cloud-rh1_tripleo-f20
|
||||
keys=console,debug,normal,image,rax-dfw_devstack-precise,rax-dfw_bare-precise,rax-dfw_devstack-trusty,rax-dfw_bare-trusty,rax-dfw_bare-centos6,rax-dfw_centos-6,rax-dfw_devstack-f21,rax-dfw_devstack-centos7,rax-ord_devstack-precise,rax-ord_bare-precise,rax-ord_devstack-trusty,rax-ord_bare-trusty,rax-ord_bare-centos6,rax-ord_centos-6,rax-ord_devstack-f21,rax-ord_devstack-centos7,rax-iad_devstack-precise,rax-iad_bare-precise,rax-iad_devstack-trusty,rax-iad_bare-trusty,rax-iad_bare-centos6,rax-iad_centos-6,rax-iad_devstack-precise-check,rax-iad_devstack-f21,rax-iad_devstack-centos7,hpcloud-region-a_devstack-precise-check,hpcloud-b1_devstack-precise-check,hpcloud-b1_devstack-precise,hpcloud-b1_bare-precise,hpcloud-b1_devstack-trusty,hpcloud-b1_bare-trusty,hpcloud-b1_bare-centos6,hpcloud-b1_centos-6,hpcloud-b1_devstack-f21,hpcloud-b1_devstack-centos7,hpcloud-b1_devstack-centos7-dib,hpcloud-b1_devstack-fedora21-dib,hpcloud-b2_devstack-precise-check,hpcloud-b2_devstack-precise,hpcloud-b2_bare-precise,hpcloud-b2_devstack-trusty,hpcloud-b2_bare-trusty,hpcloud-b2_bare-centos6,hpcloud-b2_centos-6,hpcloud-b2_devstack-f21,hpcloud-b2_devstack-centos7,hpcloud-b2_devstack-centos7-dib,hpcloud-b2_devstack-fedora21-dib,hpcloud-b3_devstack-precise-check,hpcloud-b3_devstack-precise,hpcloud-b3_bare-precise,hpcloud-b3_devstack-trusty,hpcloud-b3_bare-trusty,hpcloud-b3_bare-centos6,hpcloud-b3_centos-6,hpcloud-b3_devstack-f21,hpcloud-b3_devstack-centos7,hpcloud-b3_devstack-centos7-dib,hpcloud-b3_devstack-fedora21-dib,hpcloud-b4_devstack-precise-check,hpcloud-b4_devstack-precise,hpcloud-b4_bare-precise,hpcloud-b4_devstack-trusty,hpcloud-b4_bare-trusty,hpcloud-b4_bare-centos6,hpcloud-b4_centos-6,hpcloud-b4_devstack-f21,hpcloud-b4_devstack-centos7,hpcloud-b4_devstack-centos7-dib,hpcloud-b4_devstack-fedora21-dib,hpcloud-b5_devstack-precise-check,hpcloud-b5_devstack-precise,hpcloud-b5_bare-precise,hpcloud-b5_devstack-trusty,hpcloud-b5_bare-trusty,hpcloud-b5_bare-centos6,hpcloud-b5_centos-6,hpcloud-b5_devstack-f21,hpcloud-b5_devstack-centos7,hpcloud-b5_devstack-centos7-dib,hpcloud-b5_devstack-fedora21-dib,tripleo-test-cloud-rh1_tripleo-precise,tripleo-test-cloud-rh1_tripleo-f20,dib_centos-6,dib_devstack-trusty,dib_devstack-precise,dib_devstack-centos7-dib,dib_devstack-fedora21-dib
|
||||
|
||||
[formatters]
|
||||
keys=simple
|
||||
@ -1060,3 +1060,63 @@ level=INFO
|
||||
class=logging.handlers.TimedRotatingFileHandler
|
||||
formatter=simple
|
||||
args=('<%= @image_log_document_root %>/tripleo-test-cloud-rh1.tripleo-f20.log', 'H', 8, 30,)
|
||||
|
||||
[logger_dib_centos-6]
|
||||
level=INFO
|
||||
handlers=dib_centos-6
|
||||
qualname=nodepool.image.build.centos-6
|
||||
propagate=0
|
||||
|
||||
[handler_dib_centos-6]
|
||||
level=INFO
|
||||
class=logging.handlers.TimedRotatingFileHandler
|
||||
formatter=simple
|
||||
args=('<%= @image_log_document_root %>/dib.centos-6.log', 'H', 8, 30,)
|
||||
|
||||
[logger_dib_devstack-trusty]
|
||||
level=INFO
|
||||
handlers=dib_devstack-trusty
|
||||
qualname=nodepool.image.build.devstack-trusty
|
||||
propagate=0
|
||||
|
||||
[handler_dib_devstack-trusty]
|
||||
level=INFO
|
||||
class=logging.handlers.TimedRotatingFileHandler
|
||||
formatter=simple
|
||||
args=('<%= @image_log_document_root %>/dib.devstack-trusty.log', 'H', 8, 30,)
|
||||
|
||||
[logger_dib_devstack-precise]
|
||||
level=INFO
|
||||
handlers=dib_devstack-precise
|
||||
qualname=nodepool.image.build.devstack-precise
|
||||
propagate=0
|
||||
|
||||
[handler_dib_devstack-precise]
|
||||
level=INFO
|
||||
class=logging.handlers.TimedRotatingFileHandler
|
||||
formatter=simple
|
||||
args=('<%= @image_log_document_root %>/dib.devstack-precise.log', 'H', 8, 30,)
|
||||
|
||||
[logger_dib_devstack-centos7-dib]
|
||||
level=INFO
|
||||
handlers=dib_devstack-centos7-dib
|
||||
qualname=nodepool.image.build.devstack-centos7-dib
|
||||
propagate=0
|
||||
|
||||
[handler_dib_devstack-centos7-dib]
|
||||
level=INFO
|
||||
class=logging.handlers.TimedRotatingFileHandler
|
||||
formatter=simple
|
||||
args=('<%= @image_log_document_root %>/dib.devstack-centos7-dib.log', 'H', 8, 30,)
|
||||
|
||||
[logger_dib_devstack-fedora21-dib]
|
||||
level=INFO
|
||||
handlers=dib_devstack-fedora21-dib
|
||||
qualname=nodepool.image.build.devstack-fedora21-dib
|
||||
propagate=0
|
||||
|
||||
[handler_dib_devstack-fedora21-dib]
|
||||
level=INFO
|
||||
class=logging.handlers.TimedRotatingFileHandler
|
||||
formatter=simple
|
||||
args=('<%= @image_log_document_root %>/dib.devstack-fedora21-dib.log', 'H', 8, 30,)
|
||||
|
@ -126,6 +126,11 @@ def _get_providers_and_images(config_file):
|
||||
for image in provider['images']:
|
||||
ret.append((provider['name'], image['name']))
|
||||
logging.debug("Added %d providers & images" % len(ret))
|
||||
|
||||
# diskimages have a special provider
|
||||
for diskimage in config['diskimages']:
|
||||
ret.append(('dib', diskimage['name']))
|
||||
|
||||
return ret
|
||||
|
||||
|
||||
@ -135,10 +140,12 @@ def _generate_logger_and_handler(image_log_dir, provider, image):
|
||||
'title': '%s_%s' % (provider, image),
|
||||
'filename': '%s.%s.log' % (provider, image),
|
||||
}
|
||||
|
||||
logger = _IMAGE_LOGGER % {
|
||||
'title': '%s_%s' % (provider, image),
|
||||
'handler': '%s_%s' % (provider, image),
|
||||
'qualname': '%s.%s' % (provider, image),
|
||||
'qualname': '%s%s' % (provider + "." if provider != 'dib' else '',
|
||||
image),
|
||||
}
|
||||
|
||||
return {
|
||||
@ -176,6 +183,8 @@ def generate_log_config(config, log_dir, image_log_dir, output):
|
||||
Will result in log files (in `image_log_dir`) of foo.image1.log,
|
||||
foo.image2.log, moo.image1.log, moo.image2.log
|
||||
|
||||
diskimage-builder built images will have special provider "dib"
|
||||
|
||||
:param config: input config file
|
||||
:param log_dir: directory for main log file
|
||||
:param image_log_dir: directory for image build logs
|
||||
|
Loading…
Reference in New Issue
Block a user