)]}'
{
  "commit": "e2183ed666d202cb5c83b3a640160bea52ab18fa",
  "tree": "1dd814c016f65ac814c1a8c191e28a89b9576dc3",
  "parents": [
    "6b1c94ea3e4cd19aeca88908e919b229b3f917d6"
  ],
  "author": {
    "name": "Wei Zhou",
    "email": "w.zhou@global.leaseweb.com",
    "time": "Fri May 14 19:44:39 2021 +0200"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri May 14 23:14:39 2021 +0530"
  },
  "message": "forceha: fix two issues when (1)stop vm from inside (2) force remove host (#4647)\n\n* forceha: fix vm is not started if it is poweroff from inside\r\n\r\nsteps to reproduce the issue\r\n(1) make sure force.ha is true in global setting. if not, change it to true, and restart mgt server\r\n(2) create a service offering , ha is not enabled\r\n(3) create a vm\r\n(4) log into the vm, and power off via cli.\r\n\r\nexpected result: vm is started again by cloudstack\r\nactual result: vm is not started.\r\n\r\n* forceha: fix vms are still running if host is force-removed\r\n\r\nwhen host can be force removed, however vms are stopped in cloudstack, but not stopped on host\r\n```\r\n(localcloud) 🐱 \u003e delete host id\u003d\"a5625393-444d-4d0a-b31d-62baf88a8be1\" forced\u003dtrue\r\n{\r\n  \"success\": true\r\n}```\r\n\r\nafter some minutes, vms are still runnning on host\r\n```\r\nroot@mgt01:~# ssh node63 virsh list\r\n Id   Name        State\r\n---------------------------\r\n 1    i-2-19-VM   running\r\n 2    i-2-11-VM   running\r\n```\r\n\r\nerror message are\r\n```\r\nCannot transmit host 2 to Enabled state\r\ncom.cloud.utils.fsm.NoTransitionException: No next resource state found for current state \u003d Enabled event \u003d DeleteHost\r\n        at com.cloud.resource.ResourceManagerImpl.resourceStateTransitTo(ResourceManagerImpl.java:1216)\r\n        at com.cloud.resource.ResourceManagerImpl$1.doInTransactionWithoutResult(ResourceManagerImpl.java:907)\r\n```\r\n\r\n* forceha: Make ForceHA dynamic",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9b3bafe28dbe336af55280da2ef3f2e40a21708a",
      "old_mode": 33188,
      "old_path": "api/src/main/java/com/cloud/resource/ResourceState.java",
      "new_id": "6e0fa9092307d17adab1dac1b136e8602f982d0c",
      "new_mode": 33188,
      "new_path": "api/src/main/java/com/cloud/resource/ResourceState.java"
    },
    {
      "type": "modify",
      "old_id": "18ceddbf68d31d5227cc7b7f4c24adf7038078bc",
      "old_mode": 33188,
      "old_path": "engine/components-api/src/main/java/com/cloud/ha/HighAvailabilityManager.java",
      "new_id": "1dd999dad9708d05bd1043fe4f14dc9e0eb2a900",
      "new_mode": 33188,
      "new_path": "engine/components-api/src/main/java/com/cloud/ha/HighAvailabilityManager.java"
    },
    {
      "type": "modify",
      "old_id": "2fb0a6226538c6a669e536047d73d329450a6c2e",
      "old_mode": 33261,
      "old_path": "engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java",
      "new_id": "830e8a1e7929a69a928c72bd644ab8a98004768f",
      "new_mode": 33261,
      "new_path": "engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java"
    },
    {
      "type": "modify",
      "old_id": "b05e008546beef06d69ebd5a5308539304a92ec0",
      "old_mode": 33188,
      "old_path": "server/src/main/java/com/cloud/ha/HighAvailabilityManagerImpl.java",
      "new_id": "cde5594215ea83d260ad4d2c769424c1cf4b5af6",
      "new_mode": 33188,
      "new_path": "server/src/main/java/com/cloud/ha/HighAvailabilityManagerImpl.java"
    },
    {
      "type": "modify",
      "old_id": "6945d6f43685bdca2273ca3cbfc8146700f504e2",
      "old_mode": 33261,
      "old_path": "server/src/main/java/com/cloud/resource/ResourceManagerImpl.java",
      "new_id": "c8fe5780cf55506698d641106bd05516f60bd726",
      "new_mode": 33261,
      "new_path": "server/src/main/java/com/cloud/resource/ResourceManagerImpl.java"
    }
  ]
}
