Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device Agent should automatically re-establish Editor Tunnel after a restart #147

Open
knolleary opened this issue Jul 19, 2023 · 3 comments
Assignees
Labels
area:device Device specific work priority:high High Priority size:S - 2 Sizing estimation point
Milestone

Comments

@knolleary
Copy link
Member

Currently the device agent does not persist the fact the editor tunnel should be active. This means after a restart of the agent, the platform has to re-notify the agent to establish the tunnel.

As part of the work to improve the overall reliability of the tunnel (as far as end users are concerned), it would be sensible for the agent to recover the tunnel after a restart if needed.

The best way will be for the expected tunnel state to be included in the response of the checkin call. When the device does its initial checkin, it will find out the tunnel should be running and it can establish it.

The existing MQTT commands to enable/disable will still be used to trigger the tunnel without waiting for the device to call home.

@knolleary knolleary added size:S - 2 Sizing estimation point area:device Device specific work labels Jul 19, 2023
@knolleary
Copy link
Member Author

@MarianRaphael this item relates to overall reliability and resilience of the Device Editor. I'd like to get it scheduled soon.

@Steve-Mcl
Copy link
Contributor

Steve-Mcl commented Jan 5, 2024

PR #147 raised. Local testing is 100% successful even after extended (1h) wait between stop/start of device agent.

Potential Follow up task: Since the device essentially disconnects from the platform, browsing to the devices Developer Mode tab reveals a tunnel status of "not connected". However, this page is NOT polled so will NOT show "not connected" if the page is open when the device is shutdown. Similarly, if Developer Mode page is visited while the device is powered off, it will continue to show "not connected" even though it is. NOTE: This is nothing new, this would occur defore but somehow feels more important with this feature coming online?

Verification criteria

1st, connect a device and enable developer mode and verify editor access, then:

Round 1

  • kill device agent
  • refresh editor page & see the "device unavailable message"
  • visit/refresh Device's "Developer Mode page" on FF - should show "not connected"
  • start device agent
  • refresh editor page - should connect / display editor
  • visit/refresh Device's "Developer Mode page" on FF - should NOT show "not connected"

Round 2

  • kill device agent
  • refresh editor page & see the "device unavailable message"
  • visit/refresh Device's "Developer Mode page" on FF - should show "not connected"
  • Click "disable" button under Developer Mode Options > Editor Access
  • start device agent
  • refresh editor page - should NOT connect

@hardillb
Copy link
Contributor

Verified with local

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:device Device specific work priority:high High Priority size:S - 2 Sizing estimation point
Projects
Status: Next
Archived in project
4 participants