D15073: Fix parking engine, and make observatory startup job-centric

Eric Dejouhanet noreply at phabricator.kde.org
Sat Aug 25 10:42:41 BST 2018

TallFurryMan created this revision.
TallFurryMan added reviewers: mutlaqja, wreissenberger.
Herald added a project: KDE Edu.
Herald added a subscriber: kde-edu.
TallFurryMan requested review of this revision.

  - Consider a mount that cannot park is always unparked. This fixes the state of the mount as seen by the Scheduler when the mount cannot park.
  - Ensure getting parking state returns a valid state, even if last action was failed. This fixes an issue arising when parking operation is aborted, that caused the Mount interface to always return PARKING_ERROR.
  - Make the Scheduler use isMountParked when starting in case the state machine is not up-to-date. This fixes the issue where the Scheduler is started with a mount parking state that was manipulated from the INDI panel in-between.
  - Fix remaining issues in transitions of the parking engine states. This fixes incorrect transitions in the state machine, unrelated to the actual state they were attempted in.
  The next changes prepare the rework of the D-Bus connection of the Scheduler towards an event-driven implementation.
  These improve Scheduler robustness by managing device events that are not reflected in the state machine.
  They consolidate on the parking state changes, and are pushed now because they fix remaining issues with job startup.
  - Refactor INDI connection status test, to avoid depending on the machine state.
  - Move unpark check down to the slew procedure.
  - Refactor state checks into a call to checkStatus, managing most external events.
  - Move job startup from evaluateJobs to executeJob.

  As this differental relates to parking states, use a basic scheduler job with only tracking set.
  Uncheck "Stop Ekos After Shutdown" in the Ekos options to avoid losing driver states when the job finishes.
  - Start Scheduler, check job/Ekos/INDI are started, executed and terminated.
  - Test with "UnPark Mount" and "Park Mount" checked and unchecked.
  - Test with a Scheduler stop in the middle of slewing or capturing, and a restart.
  Observe that if "UnPark Mount" is unchecked, the mount is still unparked ; this is by design.
  Option "UnPark Mount" is here to make sure the order of unparking is honored.
  This will be replaced later by one single checkbox with that specific meaning.
  Observe that if "Park Mount" is unchecked, the mount is NOT unparked at the end of the procedure.
  This is by design, and is clearly not symmetric with the "UnPark Mount" option, thus needs to be reworked.
  - Remove the capture storage.
  - Start Scheduler, check job/Ekos/INDI are started, and kill/disconnect indiserver.
  - Check that Scheduler cancels the running action, and attempts to restore connection with devices.
  - If indiserver is still accessible, Scheduler will reconnect and restart the job.
  - If indiserver is not accessible anymore, Scheduler will attempt to reconnect multiple times then stop.
  - If indiserver is accessible but not responsive, Scheduler will attempt to reconnect devices, fail then stop.
  Note that using a local Simulator makes it difficult to test because the system is really quick to recover.
  During that test, a remote indiserver is easier to test with, and allows for various test cases with the network.
  Observe that Scheduler is unable to handle the case of a single device being disconnected. Later fix is required.
  - Remove the capture storage.
  - Start Scheduler, check job/Ekos/INDI are started, wait for mount slew to start.
  - Abort the slew while it is running.
  - Check that Scheduler does notice the problem and restarts the slew.
  - Park the mount while it is slewing.
  - Check that Scheduler does NOT notice the problem until the mount is parked, but then unparks and restarts the slew.
  - Park the mount then abort the park while it is running by unparking the mount, this causes IPS_ALERT on the parking property.
  - Check that Scheduler does notice the problem and restarts the slew.
  Originally a parking property in IPS_ALERT would cause the Mount interface to return PARKING_ERROR, causing confusion and hanging Scheduler.
  Next test requires two runs, one with guiding NOT set, the other with guiding set. This is obviously an edge case.
  - Remove the capture storage.
  - Start Scheduler, check jobs/Ekos/INDI are started, wait for the mount to capture.
  - Park the mount.
  - Check that Scheduler does NOT notice the problem if guiding is NOT set, and continues to capture until the end of the job.
  - Check that Guider notices the problem though, but nonetheless resumes guiding before the mount is fully parked.
  - Check that situation cannot be recovered.
  Observe that while Guider notices mount is parking, guiding is resumed by stubborn Scheduler, and successfully guides when close to the pole because of the lower slew speed.
  This is obviously an edge case, and probably cannot be considered a valid test case as a mount that is parking may not answer to guide commands. Simulator does.

  R321 KStars

  bugfix__make_parking_state_job_centric (branched from master)



To: TallFurryMan, mutlaqja, wreissenberger
Cc: kde-edu, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20180825/8949b996/attachment-0001.html>

More information about the kde-edu mailing list