fledge-iot / fledge

An open source platform for the Industrial Internet of Things, it acts as an edge gateway between sensor devices and cloud storage systems.
https://www.lfedge.org/projects/fledge/
Apache License 2.0
124 stars 46 forks source link

FOGL-8961 Fix issue with shutdown when in prefetch loop of north service #1441

Closed MarkRiddoch closed 3 months ago

MarkRiddoch commented 3 months ago

Error on restart of fledge is still there

  1. Added OMF plugin with default configuration in enabled mode
  2. disabled north service
  3. enabled north service
  4. restart fledge

Syslogs

Aug 14 11:28:20 nandan-ThinkPad-E450 Fledge[19097] ERROR: logger: fledge.services.core.api.north: Failed to get the north schedules.
Aug 14 11:28:20 nandan-ThinkPad-E450 Fledge[19097] ERROR: logger: fledge.services.core.api.north: Traceback (most recent call last):
Aug 14 11:28:20 nandan-ThinkPad-E450 Fledge[19097] ERROR: logger: fledge.services.core.api.north:   File "/usr/local/fledge/python/fledge/services/core/api/north.py", line 164, in get_north_schedules#012    north_schedules = await _get_north_schedules(cf_mgr)
Aug 14 11:28:20 nandan-ThinkPad-E450 Fledge[19097] ERROR: logger: fledge.services.core.api.north:   File "/usr/local/fledge/python/fledge/services/core/api/north.py", line 81, in _get_north_schedules#012    schedule_list = await server.Server.scheduler.get_schedules()
Aug 14 11:28:20 nandan-ThinkPad-E450 Fledge[19097] ERROR: logger: fledge.services.core.api.north:   File "/usr/local/fledge/python/fledge/services/core/scheduler/scheduler.py", line 1012, in get_schedules#012    raise NotReadyError()
Aug 14 11:28:20 nandan-ThinkPad-E450 Fledge[19097] ERROR: logger: fledge.services.core.api.north: fledge.services.core.scheduler.exceptions.NotReadyError

This is a different issue and should be raised as a problem against the scheduler. FOGL-9024 raised to address the exception in the scheduler

ashish-jabble commented 3 months ago

This is a different issue and should be raised as a problem against the scheduler. FOGL-9024 raised to address the exception in the scheduler

Incomplete steps - If we do restart from GUI client North tab then it happens otherwise No issue. As GUI client is sending north API request as auto interval refresh calls during restart and errors appears on that particular time when scheduler is NOT ready as Fledge restart is not fully completed