Repository navigation
fix(amfd,udmd,nefd): an expired subscription is not revived, the UDM refresh keeps reportingOptions, the AF is told on removal (#2133) - #2152
Merged
Conversation
…refresh keeps reportingOptions, the AF is told on removal (#2133) R42's pre-existing gaps from the #2128 review: - amfd: a modify of a Namf_EventExposure subscription whose expiry has passed answers 404 SUBSCRIPTION_NOT_FOUND and sweeps it. It used to answer 200, and a refreshed expiry revived it. It no longer exists (TS 29.518 §5.3.2.2.3). - nefd: the UDM refresh is `add /reportingOptions/expiry`. RFC 6902 `add` on `/reportingOptions` replaces the whole object and drops the UDM's other members. A leg made before #2102, which has no reportingOptions, still gets the object. - udmd: an EE subscription PatchItem may address a member at any depth (RFC 6901), so that refresh applies. A patch is applied to a copy and committed only if every op applies. - nefd: when the NEF removes an AF's subscription on its own initiative (404 on refresh, expired before a refresh, deferred past its deadline), the AF gets a MonitoringNotification with `cancelInd: true` (TS 29.122). Spec: specs/nef-amf-udm-subscription-lifecycle-2133.md
Spec: specs/nef-amf-udm-subscription-lifecycle-2133.md
Spec: specs/nef-amf-udm-subscription-lifecycle-2133.md
Contributor
Author
R42 review: #2152 (head b4607e9, Closes #2133)Tested on b4607e9 merged with origin/main. Merge order: #2144 is merged (63b8f21), and this branch already contains it. #2144's modify 404 filter and expiry re-grant are intact, and re-grant still runs after Verified. Each revert below was a behavioural edit run on its own; I restored each and the tree is clean.
minor
VERDICT: APPROVE |
parlakisik
added a commit
that referenced
this pull request
Nov 20, 2026
#2089 landed squashed (6e702d7), so its files met this branch's as add/add: ausfd app.rs and sbi tests/owner_binding_callers.rs take this branch's side, which is #2089's content plus #2132's change (main has no other change to them since 2f10266). nefd main.rs auto-merged with #2152. Spec: specs/nefd-ausfd-verified-identity-2132.md
parlakisik
added a commit
that referenced
this pull request
Nov 20, 2026
…tions, an old udmd is refreshed, no leading-zero index (#2154) (#2158) R42 on #2152: - nefd records the northbound API each subscription was made on. A Nnef_EventExposure subscriber is now notified with a TS 29.591 NefEventExposureNotif (notifId; eventNotifs[{event, timeStamp}]) instead of a T8 MonitoringNotification. TS 29.591 defines no cancellation indication, so none is sent to it when the NEF removes its subscription. Both ceilings are documented in nef.md. - Upgrade order: udmd before nefd (CHANGELOG, nef.md). As a fallback, a 400 to the `add /reportingOptions/expiry` refresh (a udmd from before #2133) is retried once with the whole object. - udmd refuses a JSON Pointer array index with a leading zero or a sign (RFC 6901 §4). Spec: specs/nefd-udmd-2152-followups-2154.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2133.
These are R42's three pre-existing gaps from the #2128 review, in one PR. The branch has main merged in, including #2144 (udmd EE expiry), and its udmd and nefd suites were rerun after that merge.
Verified against main (#2128 merged)
event_subscription_finddoes not filter on expiry, so areplace /options/expiryanswered 200 and the subscription came back to lifeadd /reportingOptionsreplaces the objectaddon an existing member replaces it, so every otherreportingOptionsmember the UDM held was droppedapply_ee_patchrefused any path deeper than the top level, so nefd could not target/reportingOptions/expiryeven at our own UDMTS 29.122
MonitoringNotification(which TS 29.522's MonitoringEvent API reuses) definescancelInd: "Indicates whether to request to cancel the corresponding monitoring subscription".subscriptionis its only required member. The spec does define a termination indication, so it is sent rather than documented as a ceiling.Changes
SUBSCRIPTION_NOT_FOUNDand sweeps it: the subscription is removed and its periodic timer cancelled. A DELETE of an expired one is unchanged (204).add /reportingOptions/expiryfor any leg that recorded an expiry, which means it was made withreportingOptions(nefd: subscriptions created after a create timeout are unrecorded; bound them with expiry and refresh #2102). A leg made before nefd: subscriptions created after a create timeout are unrecorded; bound them with expiry and refresh #2102 has none and still gets the whole object, so nothing is lost there.udmd: an EE PatchItem may address a member at any depth (RFC 6901: objects and arrays,
-,~0/~1). The parent must exist. The patch is applied to a copy and committed only if every op applies. fix(udmd): an EE subscription lapses at its granted reportingOptions.expiry (#2125) #2144's expiry grant then applies to the result, as before.remove_and_tell_afat the three NEF-initiated sites. It POSTs{"subscription": <self link>, "cancelInd": true}to the AF on a detached task, best effort like every AF notification. An AF-requested DELETE is not notified, and neither is an abandoned create (Cancellation-unsafe side effects in nefd, udmd, pcfd and lmfd #1877), since that AF holds no link.Acceptance vs evidence (each revert done on its own, restored, and checked with
diff)a_modify_does_not_revive_an_expired_subscription_2133: 404 with that cause, the subscription is gone, and the live subscription's identical PATCH is 200ee_patch_sets_a_nested_member_and_keeps_its_siblings_2133:maxNumOfReportssurvives, the object form replaces, array and escaped ops work, and four bad patches change nothingexpect("nested add")the_udm_refresh_adds_the_expiry_member_not_the_object_2133; #2102's refresh test now expects the member patha_subscription_the_nef_removes_is_cancelled_at_the_af_2133: a real AF stub gets exactly 3 cancellations, one per sitesubscription_remove: that site's "the AF is told" assertion fails (lines 4136, 4143 and 4159)Gates (local)
cargo fmt --all --check.--all-targets -D warningsfor amfd, udmd and nefd, plus nefd--features demo-d445a-fl-t8.