Not able to delete the template & experiment

Bug #1673036 reported by Digambar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Meteos
New
Undecided
bharaththiruveedula

Bug Description

digambar@ubuntu:~$ meteos template-delete 9bd8d980-8a1c-4978-b79f-6d0c6bc50ff1
ERROR: Invalid Status: Template status must be ('available', 'error', 'inactive').
digambar@ubuntu:~$ #meteos experiment-create --json /opt/stack/python-meteosclient/sample/json/experiment.json
digambar@ubuntu:~$ meteos experiment-list
+--------------------------------------+--------------------+--------+----------------------------+
| id | name | status | created_at |
+--------------------------------------+--------------------+--------+----------------------------+
| 67bab584-0585-4c9c-b1d0-16710d1aec8a | example-experiment | error | 2017-03-15T10:14:31.000000 |
+--------------------------------------+--------------------+--------+----------------------------+
digambar@ubuntu:~$ meteos experiment-delete 67bab584-0585-4c9c-b1d0-16710d1aec8a
digambar@ubuntu:~$ meteos template-delete 9bd8d980-8a1c-4978-b79f-6d0c6bc50ff1 ERROR: Invalid Status: Template status must be ('available', 'error', 'inactive').
digambar@ubuntu:~$
digambar@ubuntu:~$ meteos template-list
+--------------------------------------+------------------+----------------+--------------+--------------+---------------+
| id | name | status | master_nodes | worker_nodes | spark_version |
+--------------------------------------+------------------+----------------+--------------+--------------+---------------+
| 9bd8d980-8a1c-4978-b79f-6d0c6bc50ff1 | example-template | error_deleting | 1 | 2 | 1.6.0 |
+--------------------------------------+------------------+----------------+--------------+--------------+---------------+
digambar@ubuntu:~$ meteos experiment-list
+--------------------------------------+--------------------+----------------+----------------------------+
| id | name | status | created_at |
+--------------------------------------+--------------------+----------------+----------------------------+
| 67bab584-0585-4c9c-b1d0-16710d1aec8a | example-experiment | error_deleting | 2017-03-15T10:14:31.000000 |
+--------------------------------------+--------------------+----------------+----------------------------+
digambar@ubuntu:~$
digambar@ubuntu:~$ meteos experiment-list

Engine log -

2017-03-15 06:31:49.818 TRACE oslo_messaging.rpc.server self.driver.delete_experiment(context, experiment['cluster_id'])
2017-03-15 06:31:49.818 TRACE oslo_messaging.rpc.server File "/opt/stack/meteos/meteos/engine/drivers/generic.py", line 313, in delete_experiment
2017-03-15 06:31:49.818 TRACE oslo_messaging.rpc.server self.cluster_api.delete_cluster(context, id)
2017-03-15 06:31:49.818 TRACE oslo_messaging.rpc.server File "/opt/stack/meteos/meteos/cluster/sahara.py", line 155, in delete_cluster
2017-03-15 06:31:49.818 TRACE oslo_messaging.rpc.server saharaclient(context).clusters.delete(id)
2017-03-15 06:31:49.818 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/saharaclient/api/clusters.py", line 121, in delete
2017-03-15 06:31:49.818 TRACE oslo_messaging.rpc.server self._delete('/clusters/%s' % cluster_id)
2017-03-15 06:31:49.818 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/saharaclient/api/base.py", line 214, in _delete
2017-03-15 06:31:49.818 TRACE oslo_messaging.rpc.server self._raise_api_exception(resp)
2017-03-15 06:31:49.818 TRACE oslo_messaging.rpc.server File "/usr/local/lib/python2.7/dist-packages/saharaclient/api/base.py", line 230, in _raise_api_exception
2017-03-15 06:31:49.818 TRACE oslo_messaging.rpc.server error_message=error_data.get("error_message"))
2017-03-15 06:31:49.818 TRACE oslo_messaging.rpc.server APIException: Object with {'id': u'None'} not found
2017-03-15 06:31:49.818 TRACE oslo_messaging.rpc.server Error ID: b16edb94-9eb5-4f93-a6a1-d9c59eeab88b

Revision history for this message
Hiroyuki Eguchi (h-eguchi) wrote :

A root cause of this issue is that meteos tries to delete a template before deletion of experiment does not complete.

I will fix this issue as follows:
- does not allow user to delete a template while there are any experments created by that template.
- set status of experiment to "deleting" while deleting

Changed in meteos:
assignee: nobody → Hiroyuki Eguchi (h-eguchi)
Changed in meteos:
assignee: Hiroyuki Eguchi (h-eguchi) → bharaththiruveedula (bharath-ves)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.