Bug 390124

Summary: Job Schedule won't unpark mount a 2nd time
Product: [Applications] kstars Reporter: schwim <schwim>
Component: generalAssignee: Jasem Mutlaq <mutlaqja>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: git   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 2.9.3
Attachments: kstars log

Description schwim 2018-02-09 03:53:29 UTC
Created attachment 110474 [details]
kstars log

This can be reproduced. Running on Mint Xenial, built from git. 

If you schedule a job and ask it to unpark the mount and park the mount after the job completes and the job fails for some reason, the mount will correctly be parked. On restarting the job, the schedule will skip the unpark method and go directly to slewing. Meanwhile it appears that indi is still reporting the mount as parked. The job eventually times out if not cancelled.

Disconnecting and reconnecting to the indiserver is a workaround.

Logfile attached.
Comment 1 Jasem Mutlaq 2018-02-22 08:40:08 UTC
Git commit 65c7e5df8d8fd3af2af0016827f8aaefed17544b by Jasem Mutlaq.
Committed on 21/02/2018 at 16:32.
Pushed by mutlaqja into branch 'master'.

When stopping scheduler, reset startup state to UNPARKING phase in order to enable it when an aborted job is to be executed again.

Please test.

M  +5    -0    kstars/ekos/scheduler/scheduler.cpp

https://commits.kde.org/kstars/65c7e5df8d8fd3af2af0016827f8aaefed17544b
Comment 2 schwim 2018-02-26 03:06:09 UTC
OK, now I can restart a job that parked the mount and the mount will be unparked. However, about 50% of the time I get the following error in ekos and the job will not run:

2018-02-25T20:00:55 Dome unparking error.

I see no mention of this error in the logs. Restarting the job skips the error, the mount is unparked (if needed) and the job proceeds.

Not sure if this is related but seems it may be so re-opening for guidance.
Comment 3 Jasem Mutlaq 2018-02-26 11:02:28 UTC
Git commit c3dbe12c400169ff596cff5168594611e4e6464d by Jasem Mutlaq.
Committed on 26/02/2018 at 11:01.
Pushed by mutlaqja into branch 'master'.
FIXED-IN:2.9.3

Check which devices need to unpark first before setting the corresponding startup state.

M  +8    -1    kstars/ekos/scheduler/scheduler.cpp

https://commits.kde.org/kstars/c3dbe12c400169ff596cff5168594611e4e6464d