From 9756b08181ff2a088bdeba478f328ec42972f9bf Mon Sep 17 00:00:00 2001 From: James Slagle Date: Tue, 29 Nov 2016 15:11:09 -0500 Subject: [PATCH] Clean up image exceptions When tripleoclient queries for the deployment kernel and ramdisk in glance, it logs an exception to the console if they don't exist. These errors are actually redundant since an error is logged later. Also, it is needlessly verbose on the console, especially when using the deployed-server.yaml environment where these iamges do not actually have to exist. This patch changes the behavior to ignore the exception so that the traceback is not shown. Change-Id: I53805d2c805705c8f16e9a6f2ef5df3195f4f70e --- tripleoclient/v1/overcloud_deploy.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tripleoclient/v1/overcloud_deploy.py b/tripleoclient/v1/overcloud_deploy.py index bd6bd2dca..222864bd3 100644 --- a/tripleoclient/v1/overcloud_deploy.py +++ b/tripleoclient/v1/overcloud_deploy.py @@ -802,8 +802,9 @@ class DeployOvercloud(command.Command): self.log.exception("Please make sure there is only one image " "named 'bm-deploy-kernel' in glance.") except oscexc.CommandError: - self.log.exception("Error finding 'bm-deploy-kernel' in " - "glance.") + # kernel_id=None will be returned and an error will be logged from + # self._check_boot_images + pass try: ramdisk_id = osc_utils.find_resource( @@ -812,8 +813,9 @@ class DeployOvercloud(command.Command): self.log.exception("Please make sure there is only one image " "named 'bm-deploy-ramdisk' in glance.") except oscexc.CommandError: - self.log.exception("Error finding 'bm-deploy-ramdisk' in " - "glance.") + # ramdisk_id=None will be returned and an error will be logged from + # self._check_boot_images + pass self.log.debug("Using kernel ID: {0} and ramdisk ID: {1}".format( kernel_id, ramdisk_id))