Delete cluster without security groups failed

Bug #1391536 reported by Sergey Reshetnyak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sahara
Fix Released
High
Andrew Lazarev
Juno
Fix Released
High
Nikita Konovalov

Bug Description

1. Create cluster with auto security groups. Creating cluster failed and security groups not created.
2. Try delete cluster.
3. Get an error:

2014-11-11 17:40:37.585 2628 INFO sahara.utils.general [-] Cluster status has been changed: id=1221cb5e-23b1-46d0-9018-b291bceef60e, New status=Deleting
2014-11-11 17:40:37.586 2628 INFO sahara.cli.sahara_all [-] 127.0.0.1 - - [11/Nov/2014 17:40:37] "DELETE /v1.1/8e44eb2ce32b4c72b82070abbcd61ba8/clusters/1221cb5e-23b1-46d0-9018-b291bceef60e HTTP/1.1" 204 139 0.077875
2014-11-11 17:40:37.656 2628 ERROR sahara.service.ops [-] Error during operating cluster 'sr-template-test' (reason: 'NoneType' object has no attribute '__getitem__')
2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops Traceback (most recent call last):
2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops File "/home/serg/projects/sahara/sahara/service/ops.py", line 141, in wrapper
2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops f(cluster_id, *args, **kwds)
2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops File "/home/serg/projects/sahara/sahara/service/ops.py", line 284, in terminate_cluster
2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops INFRA.shutdown_cluster(cluster)
2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops File "/home/serg/projects/sahara/sahara/service/direct_engine.py", line 488, in shutdown_cluster
2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops self._shutdown_instances(cluster)
2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops File "/home/serg/projects/sahara/sahara/service/direct_engine.py", line 447, in _shutdown_instances
2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops self._delete_auto_security_group(node_group)
2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops File "/home/serg/projects/sahara/sahara/service/direct_engine.py", line 453, in _delete_auto_security_group
2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops name = node_group.security_groups[-1]
2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops TypeError: 'NoneType' object has no attribute '__getitem__'
2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops

Revision history for this message
Sergey Lukjanov (slukjanov) wrote : Re: [Bug 1391536] [NEW] Delete cluster without security groups failed
Download full text (5.2 KiB)

Probably we'll need to backport it to Juno, isn't it?

On Tuesday, November 11, 2014, Sergey Reshetnyak <email address hidden>
wrote:

> Public bug reported:
>
> 1. Create cluster with auto security groups. Creating cluster failed and
> security groups not created.
> 2. Try delete cluster.
> 3. Get an error:
>
> 2014-11-11 17:40:37.585 2628 INFO sahara.utils.general [-] Cluster status
> has been changed: id=1221cb5e-23b1-46d0-9018-b291bceef60e, New
> status=Deleting
> 2014-11-11 17:40:37.586 2628 INFO sahara.cli.sahara_all [-] 127.0.0.1 - -
> [11/Nov/2014 17:40:37] "DELETE
> /v1.1/8e44eb2ce32b4c72b82070abbcd61ba8/clusters/1221cb5e-23b1-46d0-9018-b291bceef60e
> HTTP/1.1" 204 139 0.077875
> 2014-11-11 17:40:37.656 2628 ERROR sahara.service.ops [-] Error during
> operating cluster 'sr-template-test' (reason: 'NoneType' object has no
> attribute '__getitem__')
> 2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops Traceback (most
> recent call last):
> 2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops File
> "/home/serg/projects/sahara/sahara/service/ops.py", line 141, in wrapper
> 2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops f(cluster_id,
> *args, **kwds)
> 2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops File
> "/home/serg/projects/sahara/sahara/service/ops.py", line 284, in
> terminate_cluster
> 2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops
> INFRA.shutdown_cluster(cluster)
> 2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops File
> "/home/serg/projects/sahara/sahara/service/direct_engine.py", line 488, in
> shutdown_cluster
> 2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops
> self._shutdown_instances(cluster)
> 2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops File
> "/home/serg/projects/sahara/sahara/service/direct_engine.py", line 447, in
> _shutdown_instances
> 2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops
> self._delete_auto_security_group(node_group)
> 2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops File
> "/home/serg/projects/sahara/sahara/service/direct_engine.py", line 453, in
> _delete_auto_security_group
> 2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops name =
> node_group.security_groups[-1]
> 2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops TypeError:
> 'NoneType' object has no attribute '__getitem__'
> 2014-11-11 17:40:37.656 2628 TRACE sahara.service.ops
>
> ** Affects: sahara
> Importance: Medium
> Status: Confirmed
>
> --
> You received this bug notification because you are subscribed to Sahara.
> https://bugs.launchpad.net/bugs/1391536
>
> Title:
> Delete cluster without security groups failed
>
> Status in OpenStack Data Processing (Sahara, ex. Savanna):
> Confirmed
>
> Bug description:
> 1. Create cluster with auto security groups. Creating cluster failed and
> security groups not created.
> 2. Try delete cluster.
> 3. Get an error:
>
> 2014-11-11 17:40:37.585 2628 INFO sahara.utils.general [-] Cluster
> status has been changed: id=1221cb5e-23b1-46d0-9018-b291bceef60e, New
> status=Deleting
> 2014-11-11 17:40:37.586 2628 INFO sahara.cli.sahara_all [-] 127.0.0.1 -
> - [11/Nov/2014 17:40:37] "DELETE
> /v1.1/8e4...

Read more...

Revision history for this message
Andrew Lazarev (alazarev) wrote :

It is not too critical since deletion failure occurs only after creation failure. But, it would be good to backport to Juno.

Revision history for this message
Sergey Reshetnyak (sreshetniak) wrote :
Changed in sahara:
importance: Medium → High
Changed in sahara:
assignee: nobody → Andrew Lazarev (alazarev)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to sahara (master)

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

Changed in sahara:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to sahara (master)

Reviewed: https://review.openstack.org/134345
Committed: https://git.openstack.org/cgit/openstack/sahara/commit/?id=912cd351942eb442024e9b881e639b8f780f7138
Submitter: Jenkins
Branch: master

commit 912cd351942eb442024e9b881e639b8f780f7138
Author: Andrew Lazarev <email address hidden>
Date: Thu Nov 13 11:44:11 2014 -0800

    Fixed auto security group cleanup in case of creation error

    Change-Id: I4b025442ddc4d2433d4a537508d3b1d3b8e64592
    Closes-Bug: #1391536

Changed in sahara:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in sahara:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to sahara (stable/juno)

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/150820

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to sahara (stable/juno)

Reviewed: https://review.openstack.org/150820
Committed: https://git.openstack.org/cgit/openstack/sahara/commit/?id=b88a8c2e1f329976cb78f378403fdbc6561dc282
Submitter: Jenkins
Branch: stable/juno

commit b88a8c2e1f329976cb78f378403fdbc6561dc282
Author: Andrew Lazarev <email address hidden>
Date: Thu Nov 13 11:44:11 2014 -0800

    Fixed auto security group cleanup in case of creation error

    Change-Id: I4b025442ddc4d2433d4a537508d3b1d3b8e64592
    Closes-Bug: #1391536
    (cherry picked from commit 912cd351942eb442024e9b881e639b8f780f7138)

Thierry Carrez (ttx)
Changed in sahara:
milestone: kilo-1 → 2015.1.0
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.