Cannot delete cluster without a supported driver

Bug #1646215 reported by Christopher Hultin
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Magnum
In Progress
Undecided
Jason Dunsmore

Bug Description

When you attempt to create a Cluster without a valid driver, the Cluster will immediately go into a 'CREATE_FAILED' state. Attempting to delete the Cluster do not cause the the Cluster to enter any form of DELETE state, and the 'magnum-conductor' logs display the following error:

2016-11-30 19:23:16.331 1422 ERROR oslo_messaging.rpc.server [req-264d6ccf-1895-4743-8c02-bb935876bc48 admin admin - - -] Exception during message handling
2016-11-30 19:23:16.331 1422 ERROR oslo_messaging.rpc.server Traceback (most recent call last):
2016-11-30 19:23:16.331 1422 ERROR oslo_messaging.rpc.server File "/openstack/venvs/magnum-13.3.5/local/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 155, in _process_incoming
2016-11-30 19:23:16.331 1422 ERROR oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
2016-11-30 19:23:16.331 1422 ERROR oslo_messaging.rpc.server File "/openstack/venvs/magnum-13.3.5/local/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 225, in dispatch
2016-11-30 19:23:16.331 1422 ERROR oslo_messaging.rpc.server return self._do_dispatch(endpoint, method, ctxt, args)
2016-11-30 19:23:16.331 1422 ERROR oslo_messaging.rpc.server File "/openstack/venvs/magnum-13.3.5/local/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 195, in _do_dispatch
2016-11-30 19:23:16.331 1422 ERROR oslo_messaging.rpc.server result = func(ctxt, **new_args)
2016-11-30 19:23:16.331 1422 ERROR oslo_messaging.rpc.server File "/openstack/venvs/magnum-13.3.5/local/lib/python2.7/site-packages/magnum/conductor/handlers/cluster_conductor.py", line 139, in cluster_delete
2016-11-30 19:23:16.331 1422 ERROR oslo_messaging.rpc.server ct.coe)
2016-11-30 19:23:16.331 1422 ERROR oslo_messaging.rpc.server File "/openstack/venvs/magnum-13.3.5/local/lib/python2.7/site-packages/magnum/drivers/common/driver.py", line 152, in get_driver
2016-11-30 19:23:16.331 1422 ERROR oslo_messaging.rpc.server coe=coe)
2016-11-30 19:23:16.331 1422 ERROR oslo_messaging.rpc.server ClusterTypeNotSupported: Cluster type (vm, fedora.magnum, kubernetes) not supported.
2016-11-30 19:23:16.331 1422 ERROR oslo_messaging.rpc.server

Steps to reproduce:
Create a cluster template without a matching driver installed
Create a cluster based on the new template
Attempt to delete the new cluster

Revision history for this message
yatin (yatinkarel) wrote :

Faced similar error few days ago:
] ^[[01;35m^[[01;31mException during message handling^[[00m
^[[01;31m2016-11-29 08:44:25.542 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00mTraceback (most recent call last):
^[[01;31m2016-11-29 08:44:25.542 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 155, in _process_incoming
^[[01;31m2016-11-29 08:44:25.542 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00m res = self.dispatcher.dispatch(message)
^[[01;31m2016-11-29 08:44:25.542 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 225, in dispatch
^[[01;31m2016-11-29 08:44:25.542 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00m return self._do_dispatch(endpoint, method, ctxt, args)
^[[01;31m2016-11-29 08:44:25.542 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 195, in _do_dispatch
^[[01;31m2016-11-29 08:44:25.542 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00m result = func(ctxt, **new_args)
^[[01;31m2016-11-29 08:44:25.542 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00m File "/opt/stack/magnum/magnum/conductor/handlers/cluster_conductor.py", line 65, in cluster_create
^[[01;31m2016-11-29 08:44:25.542 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00m ct.coe)
^[[01;31m2016-11-29 08:44:25.542 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00m File "/opt/stack/magnum/magnum/drivers/common/driver.py", line 152, in get_driver
^[[01;31m2016-11-29 08:44:25.542 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00m coe=coe)
^[[01;31m2016-11-29 08:44:25.542 TRACE oslo_messaging.rpc.server ^[[01;35m^[[00mClusterTypeNotSupported: Cluster type (vm, coreos, swarm) not supported.

At the time of creating image: os_distro was set to "coreos", then created template using this image. After that cluster-creation fails and deletion returns above traceback.

Changed in magnum:
status: New → Confirmed
Revision history for this message
Christopher Hultin (chris-hultin) wrote :

Additionally: I just tested this issue in an environment based on stable/newton, and did not experience this issue. It appears to have been introduced after stable/newton.

Revision history for this message
yatin (yatinkarel) wrote :

Hmm looks like after patch:https://review.openstack.org/#/c/387748/ this bug is introduced.

Changed in magnum:
assignee: nobody → Jason Dunsmore (jasondunsmore)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (master)

Fix proposed to branch: master
Review: https://review.openstack.org/427370

Changed in magnum:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/428437

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum (master)

Reviewed: https://review.openstack.org/427370
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=54d38f40bb4b1da705bf6744c57eeadb5d52712b
Submitter: Jenkins
Branch: master

commit 54d38f40bb4b1da705bf6744c57eeadb5d52712b
Author: Jason Dunsmore <email address hidden>
Date: Wed Jan 25 11:36:22 2017 -0600

    Don't create clusters of an unsupported type

    Return a 400 error if the cluster type is unsupported (ie. no drivers
    are installed that will create a cluster of that particular server
    type, cluster distro, and COE combination).

    Partial-Bug: #1646215
    Change-Id: I26d9881cfc530132e1aa88d01194c6496bc527f4

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on magnum (master)

Change abandoned by Feilong Wang (<email address hidden>) on branch: master
Review: https://review.opendev.org/428437
Reason: Hi, I'm going to abandon this by doing an overall project cleanup. Please feel free to reopen this. Thanks.

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.