fastec2
fastec2 copied to clipboard
fe2 terminate doesn't work
fe2 terminate inst1 returns error:
Traceback (most recent call last):
File "/Users/zubo/anaconda/envs/fastai/bin/fe2", line 10, in <module>
sys.exit(main())
File "/Users/zubo/anaconda/envs/fastai/lib/python3.7/site-packages/fastec2/__init__.py", line 9, in main
else: fire.Fire(EC2)
File "/Users/zubo/anaconda/envs/fastai/lib/python3.7/site-packages/fire/core.py", line 127, in Fire
component_trace = _Fire(component, args, context, name)
File "/Users/zubo/anaconda/envs/fastai/lib/python3.7/site-packages/fire/core.py", line 366, in _Fire
component, remaining_args)
File "/Users/zubo/anaconda/envs/fastai/lib/python3.7/site-packages/fire/core.py", line 542, in _CallCallable
result = fn(*varargs, **kwargs)
File "/Users/zubo/anaconda/envs/fastai/lib/python3.7/site-packages/fastec2/ec2.py", line 364, in terminate
sr = SpotRequest.from_instance(self, inst)
File "/Users/zubo/anaconda/envs/fastai/lib/python3.7/site-packages/fastec2/spot.py", line 20, in from_instance
return cls(e, d[0])
IndexError: list index out of range
Steps to reproduce:
- Create a
baseami, as described here: https://www.fast.ai/2019/02/15/fastec2/ -
fe2 launch inst1 base 80 m5.large - Wait for the instance to launch.
-
fe2 terminate inst1
Also, it works fine for the spot instances,
fe2 terminate spot1.
Perhaps try this form
fe2 get_instance inst1 terminate