diff --git a/doc/source/tools/shaker-all-in-one.txt b/doc/source/tools/shaker-all-in-one.txt index 6316c22..155c63e 100644 --- a/doc/source/tools/shaker-all-in-one.txt +++ b/doc/source/tools/shaker-all-in-one.txt @@ -1,7 +1,7 @@ usage: shaker-all-in-one [-h] [--agent-join-timeout AGENT_JOIN_TIMEOUT] [--agent-loss-timeout AGENT_LOSS_TIMEOUT] [--artifacts-dir ARTIFACTS_DIR] [--book BOOK] - [--cleanup] [--cleanup-on-error] [--config-dir DIR] + [--cleanup] [--cleanup-on-exit] [--config-dir DIR] [--config-file PATH] [--custom-user-opts CUSTOM_USER_OPTS] [--debug] [--dns-nameservers DNS_NAMESERVERS] @@ -16,7 +16,7 @@ usage: shaker-all-in-one [-h] [--agent-join-timeout AGENT_JOIN_TIMEOUT] [--log-date-format DATE_FORMAT] [--log-dir LOG_DIR] [--log-file PATH] [--matrix MATRIX] [--no-report-on-error] [--nocleanup] - [--nocleanup-on-error] [--nodebug] + [--nocleanup-on-exit] [--nodebug] [--nono-report-on-error] [--noos-insecure] [--nouse-journal] [--nouse-json] [--nouse-syslog] [--nowatch-log-file] [--os-auth-url ] @@ -60,8 +60,7 @@ optional arguments: --book BOOK Generate report in ReST format and store it into the specified folder, defaults to env[SHAKER_BOOK]. --cleanup Cleanup the image and the flavor. - --cleanup-on-error Clean up the heat-stack upon any error occurred during - scenario execution. + --cleanup-on-exit Clean up the heat-stack when exiting execution. --config-dir DIR Path to a config directory to pull `*.conf` files from. This file set is sorted, so as to provide a predictable parse order if individual options are @@ -152,7 +151,7 @@ optional arguments: overridden all combinations are tested --no-report-on-error Do not generate report for failed scenarios --nocleanup The inverse of --cleanup - --nocleanup-on-error The inverse of --cleanup-on-error + --nocleanup-on-exit The inverse of --cleanup-on-exit --nodebug The inverse of --debug --nono-report-on-error The inverse of --no-report-on-error diff --git a/doc/source/tools/shaker-cleanup.txt b/doc/source/tools/shaker-cleanup.txt index 5cb1d92..bea8ab8 100644 --- a/doc/source/tools/shaker-cleanup.txt +++ b/doc/source/tools/shaker-cleanup.txt @@ -1,11 +1,11 @@ -usage: shaker-cleanup [-h] [--cleanup] [--cleanup-on-error] [--config-dir DIR] +usage: shaker-cleanup [-h] [--cleanup] [--cleanup-on-exit] [--config-dir DIR] [--config-file PATH] [--debug] [--dns-nameservers DNS_NAMESERVERS] [--external-net EXTERNAL_NET] [--flavor-name FLAVOR_NAME] [--image-name IMAGE_NAME] [--log-config-append PATH] [--log-date-format DATE_FORMAT] [--log-dir LOG_DIR] - [--log-file PATH] [--nocleanup] [--nocleanup-on-error] + [--log-file PATH] [--nocleanup] [--nocleanup-on-exit] [--nodebug] [--noos-insecure] [--nouse-journal] [--nouse-json] [--nouse-syslog] [--nowatch-log-file] [--os-auth-url ] [--os-cacert ] @@ -28,8 +28,7 @@ usage: shaker-cleanup [-h] [--cleanup] [--cleanup-on-error] [--config-dir DIR] optional arguments: -h, --help show this help message and exit --cleanup Cleanup the image and the flavor. - --cleanup-on-error Clean up the heat-stack upon any error occurred during - scenario execution. + --cleanup-on-exit Clean up the heat-stack when exiting execution. --config-dir DIR Path to a config directory to pull `*.conf` files from. This file set is sorted, so as to provide a predictable parse order if individual options are @@ -80,7 +79,7 @@ optional arguments: defined by use_stderr. This option is ignored if log_config_append is set. --nocleanup The inverse of --cleanup - --nocleanup-on-error The inverse of --cleanup-on-error + --nocleanup-on-exit The inverse of --cleanup-on-exit --nodebug The inverse of --debug --noos-insecure The inverse of --os-insecure --nouse-journal The inverse of --use-journal diff --git a/doc/source/tools/shaker-image-builder.txt b/doc/source/tools/shaker-image-builder.txt index 6fb4369..a5a756b 100644 --- a/doc/source/tools/shaker-image-builder.txt +++ b/doc/source/tools/shaker-image-builder.txt @@ -1,4 +1,4 @@ -usage: shaker-image-builder [-h] [--cleanup-on-error] [--config-dir DIR] +usage: shaker-image-builder [-h] [--cleanup-on-exit] [--config-dir DIR] [--config-file PATH] [--debug] [--dns-nameservers DNS_NAMESERVERS] [--external-net EXTERNAL_NET] @@ -13,7 +13,7 @@ usage: shaker-image-builder [-h] [--cleanup-on-error] [--config-dir DIR] [--log-config-append PATH] [--log-date-format DATE_FORMAT] [--log-dir LOG_DIR] [--log-file PATH] - [--nocleanup-on-error] [--nodebug] + [--nocleanup-on-exit] [--nodebug] [--noos-insecure] [--nouse-journal] [--nouse-json] [--nouse-syslog] [--nowatch-log-file] [--os-auth-url ] @@ -36,8 +36,7 @@ usage: shaker-image-builder [-h] [--cleanup-on-error] [--config-dir DIR] optional arguments: -h, --help show this help message and exit - --cleanup-on-error Clean up the heat-stack upon any error occurred during - scenario execution. + --cleanup-on-exit Clean up the heat-stack when exiting execution. --config-dir DIR Path to a config directory to pull `*.conf` files from. This file set is sorted, so as to provide a predictable parse order if individual options are @@ -112,7 +111,7 @@ optional arguments: If no default is set, logging will go to stderr as defined by use_stderr. This option is ignored if log_config_append is set. - --nocleanup-on-error The inverse of --cleanup-on-error + --nocleanup-on-exit The inverse of --cleanup-on-exit --nodebug The inverse of --debug --noos-insecure The inverse of --os-insecure --nouse-journal The inverse of --use-journal diff --git a/doc/source/tools/shaker.txt b/doc/source/tools/shaker.txt index cb4405c..9600221 100644 --- a/doc/source/tools/shaker.txt +++ b/doc/source/tools/shaker.txt @@ -1,14 +1,14 @@ usage: shaker [-h] [--agent-join-timeout AGENT_JOIN_TIMEOUT] [--agent-loss-timeout AGENT_LOSS_TIMEOUT] [--artifacts-dir ARTIFACTS_DIR] [--book BOOK] - [--cleanup-on-error] [--config-dir DIR] [--config-file PATH] + [--cleanup-on-exit] [--config-dir DIR] [--config-file PATH] [--custom-user-opts CUSTOM_USER_OPTS] [--debug] [--dns-nameservers DNS_NAMESERVERS] [--external-net EXTERNAL_NET] [--flavor-name FLAVOR_NAME] [--image-name IMAGE_NAME] [--log-config-append PATH] [--log-date-format DATE_FORMAT] [--log-dir LOG_DIR] [--log-file PATH] [--matrix MATRIX] [--no-report-on-error] - [--nocleanup-on-error] [--nodebug] [--nono-report-on-error] + [--nocleanup-on-exit] [--nodebug] [--nono-report-on-error] [--noos-insecure] [--nouse-journal] [--nouse-json] [--nouse-syslog] [--nowatch-log-file] [--os-auth-url ] [--os-cacert ] @@ -46,8 +46,7 @@ optional arguments: to env[SHAKER_ARTIFACTS_DIR]. --book BOOK Generate report in ReST format and store it into the specified folder, defaults to env[SHAKER_BOOK]. - --cleanup-on-error Clean up the heat-stack upon any error occurred during - scenario execution. + --cleanup-on-exit Clean up the heat-stack when exiting execution. --config-dir DIR Path to a config directory to pull `*.conf` files from. This file set is sorted, so as to provide a predictable parse order if individual options are @@ -112,7 +111,7 @@ optional arguments: iperf.eenet.ee]}". When several parameters are overridden all combinations are tested --no-report-on-error Do not generate report for failed scenarios - --nocleanup-on-error The inverse of --cleanup-on-error + --nocleanup-on-exit The inverse of --cleanup-on-exit --nodebug The inverse of --debug --nono-report-on-error The inverse of --no-report-on-error diff --git a/etc/shaker.conf b/etc/shaker.conf index 701dc25..c7c1198 100644 --- a/etc/shaker.conf +++ b/etc/shaker.conf @@ -241,9 +241,8 @@ # name, etc will be ignored when reusing an existing stack. (string value) #reuse_stack_name = -# Clean up the heat-stack upon any error occurred during scenario execution. -# (boolean value) -#cleanup_on_error = true +# Clean up the heat-stack when exiting execution. (boolean value) +#cleanup_on_exit = true # Comma-separated list of scenarios to play. Each entity can be a file name or # one of aliases: "misc/instance_metadata", "openstack/cross_az/full_l2", diff --git a/shaker/engine/config.py b/shaker/engine/config.py index 75b23ff..afedec0 100644 --- a/shaker/engine/config.py +++ b/shaker/engine/config.py @@ -174,10 +174,9 @@ OPENSTACK_OPTS = [ 'specific scenario. Also certain configs e.g. ' 'image-name, flavor-name, stack-name, etc will be ' 'ignored when reusing an existing stack.'), - cfg.BoolOpt('cleanup-on-error', - default=(utils.env('SHAKER_CLEANUP_ON_ERROR') or True), - help='Clean up the heat-stack upon any error occurred during ' - 'scenario execution.'), + cfg.BoolOpt('cleanup-on-exit', + default=(utils.env('SHAKER_CLEANUP_ON_EXIT') or True), + help='Clean up the heat-stack when exiting execution.'), ] SERVER_AGENT_OPTS = [ diff --git a/shaker/engine/deploy.py b/shaker/engine/deploy.py index 8d30111..c28b60e 100644 --- a/shaker/engine/deploy.py +++ b/shaker/engine/deploy.py @@ -454,7 +454,7 @@ class Deployment(object): def cleanup(self): # cleanup the test stack first since it could be referencing resources # in a support stack, and it was the last stack created. - if self.stack_id is not None and cfg.CONF.cleanup_on_error: + if self.stack_id is not None and cfg.CONF.cleanup_on_exit: LOG.debug('Cleaning up the test stack: %s with id: %s', self.stack_name, self.stack_id) heat.wait_stack_deletion(self.openstack_client.heat, self.stack_id) @@ -464,7 +464,7 @@ class Deployment(object): # Only stacks tracked during the run are deleted. e.g. if a support # stack already existed, the current run doesn't "own" it so it # won't be cleaned up. - if len(self.support_stacks) > 0 and cfg.CONF.cleanup_on_error: + if len(self.support_stacks) > 0 and cfg.CONF.cleanup_on_exit: for stack in reversed(self.support_stacks): LOG.debug('Cleaning up the support stack: %s with id: %s', stack.name, stack.id) diff --git a/shaker/engine/image_builder.py b/shaker/engine/image_builder.py index 4e00c31..f75208b 100644 --- a/shaker/engine/image_builder.py +++ b/shaker/engine/image_builder.py @@ -108,7 +108,7 @@ def build_image_with_heat(openstack_client, image_name, flavor_name, LOG.error(error_msg) LOG.exception(e) finally: - if stack_id and cfg.CONF.cleanup_on_error: + if stack_id and cfg.CONF.cleanup_on_exit: LOG.debug('Cleaning up the stack: %s', stack_id) openstack_client.heat.stacks.delete(stack_id)