Skip to content

[Bug?]: FSM fails when apps are already in the target state #742

@wanyunSu

Description

@wanyunSu

Description

For example, when an app (ru-01) goes to 'configured' state whereas others in initial:

drunc-unified-shell > conf --target root-controller/ru-controller/ru-01
[2025/12/11 13:48:09 UTC] INFO       shell_utils.py:483                       drunc.controller.shell_utils                       Running
transition 'conf' on controller 'root-controller', targeting: 'root-controller/ru-controller/ru-01'
                                            claudia-test status                                            
┏━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Name                   ┃ Info ┃ State      ┃ Substate ┃ In error ┃ Included ┃ Endpoint                  ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ root-controller        │      │ initial    │ initial  │ No       │ Yes      │ grpc://10.73.136.38:30447 │
│   df-controller        │      │ initial    │ initial  │ No       │ Yes      │ grpc://10.73.136.38:42019 │
│     df-01              │      │ initial    │ idle     │ No       │ Yes      │ rest://10.73.136.38:53489 │
│     dfo-01             │      │ initial    │ idle     │ No       │ Yes      │ rest://10.73.136.38:33185 │
│     tp-stream-writer   │      │ initial    │ idle     │ No       │ Yes      │ rest://10.73.136.38:44789 │
│   hsi-fake-controller  │      │ initial    │ initial  │ No       │ Yes      │ grpc://10.73.136.38:39167 │
│     hsi-fake-01        │      │ initial    │ idle     │ No       │ Yes      │ rest://10.73.136.38:54811 │
│     hsi-fake-to-tc-app │      │ initial    │ idle     │ No       │ Yes      │ rest://10.73.136.38:41413 │
│   ru-controller        │      │ initial    │ initial  │ No       │ Yes      │ grpc://10.73.136.38:35881 │
│     ru-01              │      │ configured │ idle     │ No       │ Yes      │ rest://10.73.136.38:38371 │
│   trg-controller       │      │ initial    │ initial  │ No       │ Yes      │ grpc://10.73.136.38:44181 │
│     mlt                │      │ initial    │ idle     │ No       │ Yes      │ rest://10.73.136.38:41233 │
│     tc-maker-1         │      │ initial    │ idle     │ No       │ Yes      │ rest://10.73.136.38:53237 │
└────────────────────────┴──────┴────────────┴──────────┴──────────┴──────────┴───────────────────────────┘

running the conf command would give the error:

drunc-unified-shell > conf
[2025/12/11 13:48:14 UTC] INFO       shell_utils.py:483                       drunc.controller.shell_utils                       Running
transition 'conf' on controller 'root-controller', targeting: 'root-controller'
                                              claudia-test status                                               
┏━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Name                   ┃ Info ┃ State      ┃ Substate      ┃ In error ┃ Included ┃ Endpoint                  ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ root-controller        │      │ configured │ configured    │ Yes      │ Yes      │ grpc://10.73.136.38:30447 │
│   df-controller        │      │ configured │ configured    │ No       │ Yes      │ grpc://10.73.136.38:42019 │
│     df-01              │      │ configured │ idle          │ No       │ Yes      │ rest://10.73.136.38:53489 │
│     dfo-01             │      │ configured │ idle          │ No       │ Yes      │ rest://10.73.136.38:33185 │
│     tp-stream-writer   │      │ configured │ idle          │ No       │ Yes      │ rest://10.73.136.38:44789 │
│   hsi-fake-controller  │      │ configured │ configured    │ No       │ Yes      │ grpc://10.73.136.38:39167 │
│     hsi-fake-01        │      │ configured │ idle          │ No       │ Yes      │ rest://10.73.136.38:54811 │
│     hsi-fake-to-tc-app │      │ configured │ idle          │ No       │ Yes      │ rest://10.73.136.38:41413 │
│   ru-controller        │      │ configured │ configured    │ Yes      │ Yes      │ grpc://10.73.136.38:35881 │
│     ru-01              │      │ configured │ executing_cmd │ Yes      │ Yes      │ rest://10.73.136.38:38371 │
│   trg-controller       │      │ configured │ configured    │ No       │ Yes      │ grpc://10.73.136.38:44181 │
│     mlt                │      │ configured │ idle          │ No       │ Yes      │ rest://10.73.136.38:41233 │
│     tc-maker-1         │      │ configured │ idle          │ No       │ Yes      │ rest://10.73.136.38:53237 │
└────────────────────────┴──────┴────────────┴───────────────┴──────────┴──────────┴───────────────────────────┘
Waiting for conf to complete... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0% -:--:--
                               conf execution report                               
┏━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Name                   ┃ Command execution          ┃ FSM transition            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ root-controller        │ Executed Successfully      │ Fsm Failed                │
│   ru-controller        │ Executed Successfully      │ Fsm Failed                │
│     ru-01              │ Unhandled Exception Thrown │ NA                        │
│   hsi-fake-controller  │ Executed Successfully      │ Fsm Executed Successfully │
│     hsi-fake-01        │ Executed Successfully      │ Fsm Executed Successfully │
│     hsi-fake-to-tc-app │ Executed Successfully      │ Fsm Executed Successfully │
│   df-controller        │ Executed Successfully      │ Fsm Executed Successfully │
│     dfo-01             │ Executed Successfully      │ Fsm Executed Successfully │
│     tp-stream-writer   │ Executed Successfully      │ Fsm Executed Successfully │
│     df-01              │ Executed Successfully      │ Fsm Executed Successfully │
│   trg-controller       │ Executed Successfully      │ Fsm Executed Successfully │
│     tc-maker-1         │ Executed Successfully      │ Fsm Executed Successfully │
│     mlt                │ Executed Successfully      │ Fsm Executed Successfully │
└────────────────────────┴────────────────────────────┴───────────────────────────┘

Steps to reproduce

see above

Version and environment

latest

Impact

Medium

Anything else?

Link issue #616

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions