Subscriptions are not renewed on TTL UPDATE

Bug #1552866 reported by Eva Balycheva
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zaqar
Fix Released
Critical
Eva Balycheva

Bug Description

We recently fixed subscriptions and now they are expirable as they should be.
Now we need to make an easy way for the user to extend subscription's life. To make it possible, we can use the same approach as in claims. See https://wiki.openstack.org/wiki/Zaqar/specs/api/v1.1#Renew_Claim.

For now when we update subscription in MongoDB driver and specify TTL, subscription is not renewed. It's expiration date is still old, though ttl field is updated.

Same problem exists for Redis driver

Eva Balycheva (ubershy)
Changed in zaqar:
assignee: nobody → Eva Balycheva (ubershy)
Eva Balycheva (ubershy)
summary: - Subscriptions are not renewed on TTL UPDATE
+ Subscriptions in mongodb are not renewed on TTL UPDATE
Eva Balycheva (ubershy)
description: updated
description: updated
Feilong Wang (flwang)
tags: added: release-critical
Changed in zaqar:
milestone: none → mitaka-rc1
status: New → Confirmed
importance: Undecided → Critical
Eva Balycheva (ubershy)
summary: - Subscriptions in mongodb are not renewed on TTL UPDATE
+ Subscriptions are not renewed on TTL UPDATE
description: updated
Changed in zaqar:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to zaqar (master)

Reviewed: https://review.openstack.org/289665
Committed: https://git.openstack.org/cgit/openstack/zaqar/commit/?id=3308af985be271245a2b739a1134bb1317e4c7c0
Submitter: Jenkins
Branch: master

commit 3308af985be271245a2b739a1134bb1317e4c7c0
Author: wangxiyuan <email address hidden>
Date: Tue Mar 8 10:29:43 2016 +0800

    Renew subscription on update with TTL

    Now when we update subscription and specify TTL, subscription is not
    renewed. It's life is not extended, and it's expiration date is still
    old.

    Because of that, it's impossible to extend life of subscription without
    recreating it. But during subscription recreation some messages may not
    be sent to subscriber, because there will be a moment when subscription
    does not exist, which is bad.

    This patch makes subscriptions renewable by PATCH method, when TTL is
    specified in the body. In such case PATCH method sets subscription TTL
    to a new value and sets expiration date to a recalculated value: current
    time + TTL.

    This patch also adds two functional tests for testing TTL-related things
    in subscriptions. This increases functional testing time by ~2-4
    minutes.

    APIimpact
    Closes-Bug: #1552866
    Co-Authored-By: wangxiyuan <email address hidden>
    Co-Authored-By: Eva Balycheva <email address hidden>
    Change-Id: I048c37d6485ff27cf18ed27988874e470301fb57

Changed in zaqar:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/zaqar 2.0.0.0rc1

This issue was fixed in the openstack/zaqar 2.0.0.0rc1 release candidate.

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.