threefoldtecharchive / 0-templates

0-robot templates
Apache License 2.0
1 stars 1 forks source link

s3.state returns empty dict however the installation has been failed #240

Closed 0xIslamTaha closed 5 years ago

0xIslamTaha commented 5 years ago

Description s3.state returns empty dict, however, the installation has been failed image

zrobot logs

Traceback (most recent call last):
  File "src/gevent/greenlet.py", line 716, in gevent._greenlet.Greenlet.run
  File "/opt/code/github/threefoldtech/0-templates/templates/s3/s3.py", line 255, in deploy_tlog_namespace
    namespace = self._deploy_minio_tlog_namespace()
  File "/opt/code/github/threefoldtech/0-templates/templates/s3/s3.py", line 520, in _deploy_minio_tlog_namespace
    raise RuntimeError("could not deploy tlog namespace for minio")
RuntimeError: could not deploy tlog namespace for minio
2018-11-26T13:05:36Z <Greenlet "Greenlet-5" at 0x7f90d8536548: deploy_tlog_namespace> failed with RuntimeError

Traceback (most recent call last):
  File "src/gevent/greenlet.py", line 716, in gevent._greenlet.Greenlet.run
  File "/opt/code/github/threefoldtech/0-templates/templates/s3/s3.py", line 260, in deploy_vm
    self._deploy_minio_vm()
  File "/opt/code/github/threefoldtech/0-templates/templates/s3/s3.py", line 572, in _deploy_minio_vm
    raise RuntimeError("could not deploy vm for minio")
RuntimeError: could not deploy vm for minio
2018-11-26T13:05:36Z <Greenlet "Greenlet-6" at 0x7f90d8536648: deploy_vm> failed with RuntimeError

[Mon26 13:05] - s3.py             :593 :s3_demo_4-12c45b12-2bf8-4421-8c09-3f1e45155f01 (s3) - INFO     - number of possible nodes to use for namespace deployments 0
Traceback (most recent call last):
  File "src/gevent/greenlet.py", line 716, in gevent._greenlet.Greenlet.run
  File "/opt/code/github/threefoldtech/0-templates/templates/s3/s3.py", line 249, in deploy_data_namespaces
    namespaces = self._deploy_minio_backend_namespaces()
  File "/opt/code/github/threefoldtech/0-templates/templates/s3/s3.py", line 470, in _deploy_minio_backend_namespaces
    raise RuntimeError("could not deploy enough namespaces for minio data backend")
RuntimeError: could not deploy enough namespaces for minio data backend
2018-11-26T13:05:36Z <Greenlet "Greenlet-7" at 0x7f90d8536448: deploy_data_namespaces> failed with RuntimeError

[Mon26 13:05] - base.py           :214 :s3_demo_4-12c45b12-2bf8-4421-8c09-3f1e45155f01 (s3) - ERROR    - error executing action install:
Traceback (most recent call last):
  File "/opt/code/github/threefoldtech/0-robot/zerorobot/task/task.py", line 78, in execute
    self._result = self._func()
  File "/opt/code/github/threefoldtech/0-templates/templates/s3/s3.py", line 278, in install
    raise ns_data_gl.exception
  File "src/gevent/greenlet.py", line 716, in gevent._greenlet.Greenlet.run
  File "/opt/code/github/threefoldtech/0-templates/templates/s3/s3.py", line 249, in deploy_data_namespaces
    namespaces = self._deploy_minio_backend_namespaces()
  File "/opt/code/github/threefoldtech/0-templates/templates/s3/s3.py", line 470, in _deploy_minio_backend_namespaces
    raise RuntimeError("could not deploy enough namespaces for minio data backend")
RuntimeError: could not deploy enough namespaces for minio data backend
zaibon commented 5 years ago

what behavior do you expect. An empty state is correct here.

0xIslamTaha commented 5 years ago

@zaibon I expected {'install: {'status' : 'error'}}

serboctor commented 5 years ago

We dont set a status for the error. If the install action state is not set, then that means the service isn't installed. This will be the state {'actions: {'install' : 'ok'}} if it was installed successfully. And you can just check if this state exists to know whether the service got installed or not.

zaibon commented 5 years ago

@0xIslamTaha but I think you make a point, we could probably improve this behavior and automatically set this kind of state when actions fails. But this will be for future version of 0-robot