Uploaded image for project: 'Mender'
  1. Mender
  2. MEN-1750

Move DeviceAuth device deletion logic to decommissioning workflow.

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Rejected
    • Priority: Medium
    • Resolution: Won't Do
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:

      Description

      Device is decommissioned by calling API

       
      DELETE /deviceauth/devices/:id
      

      This operation follows steps:

      • mark device as being under decomissioing (auto-block API access for device)
      • schedule asyc-decomissioing job to delete device from other services
      • Purge tokens
      • Purge AuthSets
      • Delete device from authentication

      Depending on the load and circumstances asyc-job can take up to few minutes to delete the device. Therefore after successful delete request, device disappears from authentication however is available in different services (still displayed in UI). After few minutes it disappears.

      This process is also fragile to errors on the way, as if workflow supports auto-retry while subsequent cleanups do not and fail on spot.

      Transition entire cleanup logic into workflow itself. This way all cleanup steps are managed under single process and follow workflow retry policies.

      Acceptance:

      • DELETE API marks device for decommissioning and schedules workflow (only logic).
      • Deleting tokens, authsets and device from deviceauth is handled by decommissioning workflow similarly as other services are (internal delete api most likely)
      • List devices API includes new status: "under decommissioning" that can be used by UI. Supported in status filter.
      • Update docs to make clear that delete API is triggering asyc action.

      Notes:

      • Remember to bump workflow version when making changes, it will not overwrite it with modified version if version is the same during update.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                a10020 Maciej Mrowiec
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel