The post-stop hook fails to be called when terminating a session via the gateway DELETE endpoint API

Bug #2060605 reported by Gary.Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Anbox Cloud
Fix Released
Medium
Gary.Wang

Bug Description

As reported in the following discourse post
https://discourse.ubuntu.com/t/post-stop-hook-doesnt-appear-to-be-called/43904

When ending the session by calling the DELETE session endpoint on the streaming gateway, the instance is stopped and removed. Therefore, I expected the post-stop hook to be called. However, it did not occur.

To reproduce:
1. Create an application that includes a simple post-stop hook
   ```
   #!/bin/bash -ex
   sleep 5 && echo "hello world"
   ```
2. Goto anbox cloud dashboard
3. Create a new session from the application just created
4. Running the following command on the ams node to dump the system logs
   $ amc logs -f <instance_id>
4. Delete the session from the dashboard once the stream get started

Expected results:
   The post-stop hook is called and "hello world" should be printed out from the system log

Actual results:
   The post-stop hook is not called and nothing printed out from the system log

NOTE: when deleting an instance via the following command
$ amc delete <instance_id>

The post-stop hook is called as expected

Gary.Wang (gary-wzl77)
Changed in anbox-cloud:
milestone: none → 1.22.2
status: New → Triaged
importance: Undecided → Medium
milestone: 1.22.2 → 1.22.0
assignee: nobody → Gary.Wang (gary-wzl77)
Gary.Wang (gary-wzl77)
summary: The post-stop hook fails to be called when terminating a session via the
- gateway DELETE endpoint API."
+ gateway DELETE endpoint API
Gary.Wang (gary-wzl77)
Changed in anbox-cloud:
status: Triaged → In Progress
Gary.Wang (gary-wzl77)
Changed in anbox-cloud:
status: In Progress → Fix Committed
Simon Fels (morphis)
Changed in anbox-cloud:
status: Fix Committed → Fix Released
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.