StratusLab / client

Command Line Interface (CLI) for StratusLab cloud services
Apache License 2.0
2 stars 1 forks source link

starting VM with non-existent appliance doesn't fail #105

Closed loomis closed 5 years ago

loomis commented 10 years ago

Trying to start a VM by naming an appliance that doesn't exist, starts a VM. This should fail with an error indicating that the appliance doesn't exist.

For example, the command

stratus-run-instance --type=m1.large --volatile-disk 50 coucou

This attaches a disk to the disk.0 for the machine which appears to be randomly selected. The call to tm_clone_cache.py has arguments like the following:

CLONE onehost-4.lal.in2p3.fr:coucou onehost-14.lal.in2p3.fr:/var/lib/one//1547/images/disk.0

For this particular instance it started an ubuntu image.

JulienNauroy commented 10 years ago

The could de solved in Runner.py in one of these two distinct places:

  1. _isAliasURL returns True without checking anything, which makes "coucou" a valid Alias URL
  2. _resolveUrl simply returns the input string without checks in case it doesn't start with "http"

However, the current release of Stratuslab seems to fail now, instead of running any image as on the LAL's instance :

Tue Apr 22 21:56:24 2014 [TM][I]: Command execution fail: /usr/lib/one/tm_commands/stratuslab/tm_clone_cache.py tipi50.lri.fr:coucou tipi49.lri.fr:/var/lib/one/61/images/disk.0 Tue Apr 22 21:56:24 2014 [TM][I]: [ERROR] Failed to get manifest for resource uri: https://marketplace.stratuslab.eu/metadata/coucou. InputException: Failed to download: https://marketplace.stratuslab.eu/metadata/coucou, with detail: HTTP Error 404: Not Found