Commit 8734b138 authored by Valentin Reis's avatar Valentin Reis

[fix] Cmd now passes an absolute manifest path in its run message to upstream.

This is not as good as passing part of the manifest options forward,
but it still fixes some of the practical problems when using the
components together. The code makes sure that the manifests exists,
though.
parent 3dd86585
Pipeline #4658 passed with stages
in 2 minutes and 32 seconds
......@@ -77,9 +77,18 @@ class CommandLineInterface(object):
# the command idempotent.
environ = os.environ
container_uuid = argv.ucontainername or str(uuid.uuid4())
# simple check + error msg + non-zero return code
def sanitize_manifest(path):
if os.path.isfile(path):
return(os.path.abspath(path))
else:
logger.error("Manifest file not found: %s", path)
sys.exit(1)
command = {'api': 'up_rpc_req',
'type': 'run',
'manifest': argv.manifest,
'manifest': sanitize_manifest(argv.manifest),
'path': argv.command,
'args': argv.args,
'environ': dict(environ),
......
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