Fix for the Dome interface
AbandonedPublic

Authored by TallFurryMan on Sep 29 2018, 4:23 PM.

Details

Summary

Added flag UniqueConnection to some D-Bus signal connections, and some logs.
Removed duplicated property 'logText' in mount interface.
Fixed syntax error in dome XML interface.

The introspection mechanism is using the source XML interface descriptions to generate a MOC object.
When there is a syntax error in a XML description, the build stops extracting entry points from the description and DOES NOT produce any error.
This leads to an incomplete D-Bus interface, with missing properties/calls/signals (the ones after the syntax error).
The problem is that no connect() call has its return code checked nowhere in the code, so probably an encapsulation of this call would be a good idea.
On the other hand, we could make the build fail in such situation, but I don't know how to manage this yet.

Test Plan

Load Scheduler test vector 'simple_test_no_twilight.esl', ensure a Dome is in the INDI profile.
Uncheck "Unpark dome", start the Scheduler. Observe as jobs start executing.
Before the end of the schedule, stop the Scheduler, check "Unpark dome", restart the Scheduler.
Without the change, Scheduler hangs for 30 seconds waiting for the dome, disconnects INDI/Ekos, restarts, etc, until failing and stopping.
With the change, Scheduler waits for the dome to unpark and continues the schedule.

Diff Detail

Repository
R321 KStars
Branch
bugfix__dome_interface_fix (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 3336
Build 3354: arc lint + arc unit
TallFurryMan created this revision.Sep 29 2018, 4:23 PM
Restricted Application added a project: KDE Edu. · View Herald TranscriptSep 29 2018, 4:23 PM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
TallFurryMan requested review of this revision.Sep 29 2018, 4:23 PM

I already pushed the fix for the dome.xml issue.

OK. Should I drop the rest of the differential?

No, just the </method> fix. Rest is OK.

Hm, my differential does not work properly. There are several things:

  1. Simply checking "unpack dome" after cancelling a scheduled job does not help. I need to double click on a job so that the change is recognized.
  2. If I do it like this, the dome simulator unparks the dome and opens the shutter, but the scheduler does not continue. It looks "Checking INDI State 4".
[2018-10-01T22:52:08.401 CEST INFO ][ org.kde.kstars.ekos.scheduler] - "Job 'Kocab' is selected for next obser
vation with priority #10 and score 35."
[2018-10-01T22:52:09.423 CEST DEBG ][ org.kde.kstars.ekos.scheduler] - Checking INDI State 0
[2018-10-01T22:52:09.423 CEST DEBG ][ org.kde.kstars.ekos.scheduler] - Checking INDI Properties...
[2018-10-01T22:52:10.529 CEST DEBG ][ org.kde.kstars.ekos.scheduler] - Checking INDI State 3
[2018-10-01T22:52:10.530 CEST DEBG ][ org.kde.kstars.ekos.scheduler] - Checking Park Wait State...
[2018-10-01T22:52:10.530 CEST DEBG ][ org.kde.kstars.ekos.scheduler] - "Checking Startup State (2)..."
[2018-10-01T22:52:10.531 CEST INFO ][ org.kde.kstars.ekos.scheduler] - "Unparking dome..."
[2018-10-01T22:52:10.576 CEST DEBG ][           org.kde.kstars.indi] - Dome Simulator : "Shutter is opening... "
[2018-10-01T22:52:11.523 CEST DEBG ][ org.kde.kstars.ekos.scheduler] - Checking INDI State 4
[2018-10-01T22:52:11.523 CEST DEBG ][ org.kde.kstars.ekos.scheduler] - Checking Park Wait State...
[2018-10-01T22:52:11.523 CEST DEBG ][ org.kde.kstars.ekos.scheduler] - "Checking Startup State (3)..."
[2018-10-01T22:52:12.527 CEST DEBG ][ org.kde.kstars.ekos.scheduler] - Checking INDI State 4
[2018-10-01T22:52:12.527 CEST DEBG ][ org.kde.kstars.ekos.scheduler] - Checking Park Wait State...
[2018-10-01T22:52:12.527 CEST DEBG ][ org.kde.kstars.ekos.scheduler] - "Checking Startup State (3)..."
[2018-10-01T22:52:13.527 CEST DEBG ][ org.kde.kstars.ekos.scheduler] - Checking INDI State 4

I assume you have a Dome in your profile. I also assume that you have the syntax error fix in your tree (it is in this differential, but Jasem did also merge the fix in parallel before the final version of this fix), so hopefully there is no further syntax error introduced? Indi state 4 is INDI_PROPERTY_CHECK, so your setup is hung waiting for one of these four things to come up: dome, mount, dustcap or capture interface. There are logs for each of these, added by this differential. Which ones do you see?

I use the DomeSimulator working on arcpatch-D15837.

OK, I could drill it down, the Scheduler hangs in checkStartupState() respectively in checkDomeParkingStatus(). When asking for the property parkStatus, it always gets the result 0although the INDI control panel shows the message "Dome is unparked" or "Dome is already unparked".

Maybe my INDI installation is outdated. I will check it and come back.

OK, re-checked with the latest INDI version. No change.

wreissenberger added a comment.EditedOct 3 2018, 8:22 AM

Same situation with the RollOff Simulator. The INDI Control panel shows:

2018-10-03T08:19:51: [INFO] Dome is unparked. 
2018-10-03T08:19:51: [INFO] Roof is open. 
2018-10-03T08:19:41: [INFO] Roll off is unparking... 
2018-10-03T08:19:18: [INFO] Dome is parked.

But the log in the scheduler shows as last entry

2018-10-03T10:19:41 Unparking dome...

OK it might be that the property parkStatus is not converted properly. It is working for the mount interface, so I think it should be easy to spot differences there.

Just an idea: is it possible, that the correct name is parkingStatus?

The property should match the content of the XMLs in the root folder. I can see there is a property named parkStatus and a signal named newParkStatus for those devices. I haven't yet returned to that diff, sorry.

I did a quick test, and it appears the dome simulator is already unparked when starting. I'll fix the park/unpark request in the same way as the mount. I'll also check the dustcap.

I'm confused, wasn't this already applied or no?

TallFurryMan planned changes to this revision.Nov 17 2018, 9:50 PM

This went out of my list, I'll check this. I think the main point - the dome - was merged.

is this applicable anymore in any sense? should be it dropped?

I think you fixed that long ago. I kept it to reinsert logs.

TallFurryMan abandoned this revision.Nov 29 2019, 5:52 PM