camaraproject / QualityOnDemand

Repository to describe, develop, document and test the QualityOnDemand API family
https://wiki.camaraproject.org/x/zwOeAQ
Apache License 2.0
41 stars 59 forks source link

Unclear Handling of QoS Session `NETWORK_TERMINATION` Timing #274

Closed maxl2287 closed 6 months ago

maxl2287 commented 6 months ago

Describe the bug

NOTE: in case of a QOS_STATUS_CHANGED event with qosStatus as UNAVAILABLE and statusInfo as NETWORK_TERMINATED the resources of the QoS session are not directly released, but will get deleted automatically at earliest 360 seconds after the event. This behavior allows clients which are not receiving notification events but are polling to get the session information with the qosStatus UNAVAILABLE and statusInfo NETWORK_TERMINATED. Before a client can attempt to create a new QoD session for the same device and flow period they must release the session resources with an explicit delete operation if not yet automatically deleted.

When I create a session with a duration of, for example, 40, and after 20 seconds the network terminates the session, then (as described in the specification), the session will be deleted at the earliest after 360 seconds. This creates confusion regarding whether the session will be extended to last for additional 6 minutes in this case, but it should expire in the next seconds.

Expected behavior IF Network terminates the session AND the remaining duration is smaller than 360s, THEN let it expire and send a CloudEvent with qosStatus: UNAVAILABLE and statusInfo: NETWORK_TERMINATED ELSE let the session expire in 360s and send a CloudEvent with qosStatus: UNAVAILABLE and statusInfo: NETWORK_TERMINATED

maxl2287 commented 6 months ago

After a short review I will close this issue. This functionality to delete the session-resourcem at least in 360s after the network terminated the session, was planned for Clients without the possibility of receiving CloudEvents.

For this special use-case where the duration of the session is lower than 360s and will be terminated by the network, the session-resource will be "extended" at least for 360s so that Clients are able to poll for the session to see a possible status-change of the session.

jlurien commented 6 months ago

My understanding is that the intention of that phrase is to remark that the session object is not deleted inmediately, that is 404 is not to be returned. But that does not affect the session duration or qosStatus. It may happen that the returned session is already expired in that extra 360-seconds or more