Sahara can't create protected cluster

Bug #1510929 reported by Vitalii Gridnev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sahara
Fix Released
High
Andrey Pavlov
Liberty
Fix Released
High
Andrey Pavlov
Mitaka
Fix Released
High
Andrey Pavlov

Bug Description

We have an option to create cluster with is_protected=True field. BTW, cluster definetly can't be created with such field because it's required for Sahara to update cluster during creation (in such case cluster will hangs in undefined state) We should be able to create cluster with is_protected=True or we shouldn't allow users to create cluster with is_protected option selected.

Some logs from Sahara:

 Original exception being dropped: ['Traceback (most recent call last):\n', ' File "/Users/vgridnev/openstack/sahara/sahara/service/api.py", line 136, in _cluster_create\n cluster, c_u.CLUSTER_STATUS_VALIDATING)\n', ' File "/Users/vgridnev/openstack/sahara/sahara/utils/cluster.py", line 93, in change_cluster_status\n cluster = conductor.cluster_update(ctx, cluster, update_dict)\n', ' File "/Users/vgridnev/openstack/sahara/sahara/conductor/resource.py", line 42, in handle\n ret = func(*args, **kwargs)\n', ' File "/Users/vgridnev/openstack/sahara/sahara/conductor/api.py", line 93, in cluster_update\n values)\n', ' File "/Users/vgridnev/openstack/sahara/sahara/conductor/manager.py", line 206, in cluster_update\n return self.db.cluster_update(context, cluster, values)\n', ' File "/Users/vgridnev/openstack/sahara/sahara/db/api.py", line 95, in decorator\n res = func(*args, **kwargs)\n', ' File "/Users/vgridnev/openstack/sahara/sahara/db/api.py", line 140, in cluster_update\n return IMPL.cluster_update(context, cluster, values)\n', ' File "/Users/vgridnev/openstack/sahara/sahara/db/sqlalchemy/api.py", line 249, in cluster_update\n validate.check_protected_from_update(cluster, values)\n', ' File "/Users/vgridnev/openstack/sahara/sahara/service/validations/acl.py", line 52, in check_protected_from_update\n object=type(object).__name__))\n', "UpdateFailedException: Cluster with id '425c2c19-b971-4bd1-891e-a30d3ccb746d' could not be updated because it's marked as protected\nError ID: ed39b80a-2df3-448d-aae2-20745504a338\n"]

description: updated
Changed in sahara:
importance: Undecided → High
milestone: none → mitaka-1
status: New → Triaged
description: updated
Changed in sahara:
assignee: nobody → Andrey Pavlov (apavlov-n)
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/239968

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

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

commit cdcf8c93fabed360bf7db07940b2c03a8b557191
Author: Andrey Pavlov <email address hidden>
Date: Wed Oct 28 18:12:00 2015 +0300

    Fixing cluster creation with is_protected field

    Now cluster can be created with is_protected
    parameter set to True

    Change-Id: I6c8e10dfc7e3922a1a81e57ff6e762d7a93c389f
    Closes-bug: #1510929

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

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/240521

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

Reviewed: https://review.openstack.org/240521
Committed: https://git.openstack.org/cgit/openstack/sahara/commit/?id=0777402131e3e8d14d30d248f96a7b65f6126240
Submitter: Jenkins
Branch: stable/liberty

commit 0777402131e3e8d14d30d248f96a7b65f6126240
Author: Andrey Pavlov <email address hidden>
Date: Wed Oct 28 18:12:00 2015 +0300

    Fixing cluster creation with is_protected field

    Now cluster can be created with is_protected
    parameter set to True

    Change-Id: I6c8e10dfc7e3922a1a81e57ff6e762d7a93c389f
    Closes-bug: #1510929
    (cherry picked from commit cdcf8c93fabed360bf7db07940b2c03a8b557191)

Changed in sahara:
status: Fix Committed → Fix Released
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.