Ticket #93 (closed task: fixed)

Opened 9 years ago

Last modified 7 years ago

Implement lease cancellation (implement #1 and #2).

Reported by: ibaldin Owned by: aydan
Priority: major Milestone: Camano 3.1
Component: ORCA: Shirako Core Version: Bella 2.0
Keywords: Cc: chase

Description

From Jeff:
Here are some notes on lease cancel/vacate derived from the cluster-D
discussion at GEC last month. Mea culpa for not posting it on the
wiki. Comments welcome.

What we need is implement ticket vacate/cancel in all its forms. I have
referred to cancellation by the issuer as "cancel" and ticket
cancellation initiated by the holder as "vacate": I am not dogmatic
about this, but I think the distinction and terms will be useful in the
code.

Anyway, the vacate/cancel functions IMHO should be viewed in five
steps. Steps 1 and 2 are "medium high" priority, and steps 3 and 4 are
"medium low" priority.

0. SM-initiated lease vacate and authority-initiated lease cancel are
already implemented in the "close" functionality.

1. "Unconfirmed ticket vacate" to broker. Initiated by ticket holder
(e.g., SM/SC). This "unconfirmed" vacate has no involvement from the
authority. We can use it as a base primitive. Simple, clean, and meets
all perceived SM needs. Of course, it may be unsafe if the SM is faulty
(see #3 and #4 below).
+ The SM-side "close" state machine is minimally affected: the lease
object is marked "closed" in the usual fashion, but now has a new
substate pending action called "vacating". Of course this needs to be
restarted on recovery in the usual way.
+ Broker adds unused portion of ticket back to inventory if it accepts
the vacate request. Requires a commit.

2. Withdraw of a delegation. This is a ticket cancel initiated by
Authority, or more generally, a ticket update that may reduce the units
or term of a previous advertisement to the broker.
- Broker receives ticket update.
- Broker updates inventory, which affects future allocations. Requires
a commit.
- Broker takes no action with respect to tickets it has already issued.
- Authority is, as always, free to cancel or reject redeems of tickets
to complete its nefarious act by betraying the ticket holders directly.
- Note: broker could generate a ticket update for future tickets it has
issued, if they are no longer feasible. But we can kick that down the road.

3. Confirmed vacate to broker. This is a variant of #1 that includes a
"ticket invalidation" receipt signed by the authority to certify that
the ticket/lease has been closed, cancelled, or vacated.
- SM requests the receipt (note that some scenarios don't require
this). This could be a special case of redeem, with a property saying
"cancel/vacate/reject me".
- Authority issues the receipt on early lease close, or redeem reject.
- Authority remembers that the ticket is invalid, at least until its
start time.
- SM state machine mods to wait for the receipt before vacating the
ticket to broker, and send the receipt to broker in a vacate request
after receiving the receipt, under any circumstances in which it
receives a receipt.
- Broker validates the receipt before accepting the vacate.
- Vacate executes on broker as in #1.

4. Safety checks for unconfirmed vacates. Uncomfirmed vacate is safe
for tickets that could not possibly have been redeemed yet. To enforce
this case, we add some checks:
+ Authority advertises a "redeem advance time" in its delegation to the
broker.
+ Authority accepts redeems only of "current" tickets (within the redeem
advance time).
+ Authority rejects redeems of "future" tickets, i.e., start time >
current time + redeem advance time.
+ Broker accepts unconfirmed vacates (#1) only for "future" tickets.
+ Broker requires confirmation (#3) from authority for vacates of
"current" tickets.

Change History

Changed 9 years ago by ibaldin

  • version set to Bella 2.1
  • milestone changed from GEC7 to S2.a Rel Bella 2.1 ORCA code to projects

Changed 8 years ago by aydan

The option listed as #1 has been implemented.
Option #2 is not.

Changed 8 years ago by ibaldin

  • milestone changed from S2.a Rel Bella 2.0 ORCA code to projects to Camano 3.1

Changed 7 years ago by ibaldin

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.