ShareSnapshotInstance model share_id property returns share instance id

Bug #1600784 reported by Tom Barron
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Invalid
Low
Tom Barron

Bug Description

class ShareSnapshotInstance(BASE, ManilaBase):
    """Represents a snapshot of a share."""
    __tablename__ = 'share_snapshot_instances'
    _extra_keys = ['name', 'share_id', 'share_name']

    @property
    def name(self):
        return CONF.share_snapshot_name_template % self.id

    @property
    def share_name(self):
        return CONF.share_name_template % self.share_instance_id

    @property
    def share_id(self):
        # NOTE(u_glide): This property required for compatibility
        # with share drivers
        return self.share_instance_id <<<<<<<<--------------------- returns share_instance_id

    id = Column(String(36), primary_key=True)
    deleted = Column(String(36), default='False')
    snapshot_id = Column(
        String(36), ForeignKey('share_snapshots.id'), nullable=False)
    share_instance_id = Column(
        String(36), ForeignKey('share_instances.id'), nullable=False)
    status = Column(String(255))
    progress = Column(String(255))
    provider_location = Column(String(255))
    share_instance = orm.relationship(
        ShareInstance, backref="snapshot_instances",
        lazy='immediate',
        primaryjoin=(
            'and_('
            'ShareSnapshotInstance.share_instance_id == ShareInstance.id,'
            'ShareSnapshotInstance.deleted == "False")')
    )

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

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

Changed in manila:
assignee: nobody → Tom Barron (tpb)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on manila (master)

Change abandoned by Tom Barron (<email address hidden>) on branch: master
Review: https://review.openstack.org/340315

Revision history for this message
Jason Grosso (jgrosso) wrote :

Hey Tom can you let me know if this is still occurring and needs some attention?

Jason Grosso (jgrosso)
Changed in manila:
importance: Undecided → Low
Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :

This is by design, see comments in the attempted fix: https://review.opendev.org/#/c/340315/

Changed in manila:
status: In Progress → Invalid
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.