Skip to content

supervisord-event-handler.py is signaling that virtiofsd is stopping when it is actually still starting up #382

@Ramblurr

Description

@Ramblurr

There are two minor bugs in supervisord-event-handler.py

  1. it is signaling that virtiofsd is stopping when it is actually still starting up:
  2. its expected_count is off by one.

https://github.com/astro/microvm.nix/blob/f30ae9b9e740116d044935c9c0c68bd1c2ce8432/nixos-modules/microvm/virtiofsd/supervisord-event-handler.py#L39-L42

I added some extra debug to the python script, so you can see it:

Parsed event: PROCESS_STATE_STARTING
count=0/5 STOPPING
Parsed event: PROCESS_STATE_STARTING
count=0/5 STOPPING
Parsed event: PROCESS_STATE_STARTING
count=0/5 STOPPING
Parsed event: PROCESS_STATE_STARTING
count=0/5 STOPPING
Parsed event: PROCESS_STATE_STARTING
count=0/5 STOPPING
Parsed event: PROCESS_STATE_RUNNING
count=1/5 Process state running...
Parsed event: PROCESS_STATE_RUNNING
count=2/5 Process state running...
Parsed event: PROCESS_STATE_RUNNING
count=3/5 Process state running...
Parsed event: PROCESS_STATE_RUNNING
count=4/5 Process state running...
Parsed event: PROCESS_STATE_RUNNING
count=5/5 Process state running...
count=5/5 READY
Parsed event: PROCESS_STATE_RUNNING
count=6/5 Process state running...
count=6/5 READY

The off-by-one is because the handler's process itself is not taken into account, it is a simple fix, just add one to the expected count.

As for the stopping bug, I think the call to for stopping could be removed entirely. This python script isn't in a position to know if the service is stopping or not, all it can report on is whether the expected virtiofsd procs are ready.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions