fledge-iot / fledge-service-dispatcher

Dispatcher service is responsible for dispatching control messages between Fledge services.
0 stars 0 forks source link

FOGL-8380 Fix shutdown issue in dryrun mode #58

Closed MarkRiddoch closed 7 months ago

ashish-jabble commented 7 months ago

Now with the latest commit, When we add dispatcher in disabled mode.

Syslogs

Fledge[16906] INFO: service_registry: fledge.services.core.service_registry.service_registry: Registered service instance id=89971fd8-8660-446e-8126-d963874c1df3: <DIS, type=Dispatcher, protocol=http, address=localhost, service port=41519, management port=34175, status=1>

In service registry its status is unrepsonsive

{
      "name": "DIS",
      "type": "Dispatcher",
      "address": "localhost",
      "management_port": 34175,
      "service_port": 41519,
      "protocol": "http",
      "status": "unresponsive"
    }

It should NOT be the case in disable state. Either shutdown status OR better there should NOT be a service registry for the case as like others.

And after sometime, errors log are coming

 Fledge[16906] INFO: service_registry: fledge.services.core.service_registry.service_registry: Mark as failed service instance id=89971fd8-8660-446e-8126-d963874c1df3: <DIS, type=Dispatcher, protocol=http, address=localhost, service port=41519, management port=34175, status=3>
 Fledge[16906] ERROR: logger: fledge.services.core.scheduler.scheduler: Service DIS records could not be removed with task id None type None

And it's service registry with Failed state

{
      "name": "DIS",
      "type": "Dispatcher",
      "address": "localhost",
      "management_port": 34175,
      "service_port": 41519,
      "protocol": "http",
      "status": "failed"
    }

If we fix the service registry problem then there will be no noise futher I believe.