Commit 64078dcb authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

helper: Exclude all tasks if no properties defined

If no image properties are defined, then do not run any configuration
task. Prior to this commit, the system would fail if no image
properties were present.
parent 39fe8e3e
......@@ -122,6 +122,11 @@ Mandatory properties (for diskdump only)
earlier, for now, only primary partitions are supported. This property is
trivial for *{ext,ntfs}dump* formats (they only host one partition).
.. note:: On a diskdump image if no image property is defined, the deployment
will not fail. This situation is treated as a special case. All
configuration tasks will be prevented from running and the helper VM will
report SUCCESS after creating a warning about this.
Optional properties
......@@ -98,6 +98,10 @@ if [ -z "$RUN_PARTS" ]; then
log_error "run-parts program is missing from the system"
if [ $(set | { grep ^SNF_IMAGE_PROPERTY_ || true; } | wc -l) -eq 0 ]; then
warn "No image properties are defined. VM configuration will not be performed."
......@@ -134,6 +138,8 @@ if [ -z "$SNF_IMAGE_PROPERTY_EXCLUDE_ALL_TASKS" ]; then
# Reset the handler to its original value
trap report_error ERR
warn "EXCLUDE_ALL_TASKS: All configuration tasks were prevented from running."
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment