never add/remove tenant access for nova flavor resource

Bug #1719805 reported by huangtianhua
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
huangtianhua

Bug Description

For nova flavor resource, if the property 'is_public' set to false, we are going to add tenant access, but the code is incorrect, we don't check the value of property 'is_public', instead we check the property name:
        if not self.IS_PUBLIC:
            if not tenants:
                LOG.info('Tenant property is recommended if IS_PUBLIC '
                         'is false.')
                tenant = self.stack.context.tenant_id
                self.client().flavor_access.add_tenant_access(flavor, tenant)
            else:
                for tenant in tenants:
                    # grant access only to the active project(private flavor)
                    self.client().flavor_access.add_tenant_access(flavor,
                                                                  tenant)

We have the same problem when update the flavor.

Changed in heat:
assignee: nobody → huangtianhua (huangtianhua)
importance: Undecided → High
milestone: none → queens-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

Changed in heat:
status: New → In Progress
tags: added: pike-backport
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/507792
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=13cd27a955a28720422141355ec5b255721dd301
Submitter: Jenkins
Branch: master

commit 13cd27a955a28720422141355ec5b255721dd301
Author: huangtianhua <email address hidden>
Date: Wed Sep 27 16:47:26 2017 +0800

    Make private flavor tenant access works

    Make private flavor tenant access works.

    Change-Id: Ibcb82d3518320534e9e0397e9d0651c3b602d439
    Closes-Bug: #1719805

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

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/510388

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

Reviewed: https://review.openstack.org/510388
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=17eb45b4218d29f93b0060ce895d80e47d3ca8bf
Submitter: Jenkins
Branch: stable/pike

commit 17eb45b4218d29f93b0060ce895d80e47d3ca8bf
Author: huangtianhua <email address hidden>
Date: Wed Sep 27 16:47:26 2017 +0800

    Make private flavor tenant access works

    Make private flavor tenant access works.

    Change-Id: Ibcb82d3518320534e9e0397e9d0651c3b602d439
    Closes-Bug: #1719805
    (cherry picked from commit 13cd27a955a28720422141355ec5b255721dd301)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat 10.0.0.0b1

This issue was fixed in the openstack/heat 10.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat 9.0.1

This issue was fixed in the openstack/heat 9.0.1 release.

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.