Skip to content

Conversation

@alfrunes
Copy link
Contributor

mender-connect has two levels of ping/pong, the standard websockets one and a custom shell protocol one. On the later, when the peer does not respond to the ping request the shell session, the session is marked as expired but there was no default mechanism to stop the shell and get ready for new shells.

The symptom of this bug is that after temporally lose of connectivity, mender-connect will still refuse to open new shells after the connectivity is restored.

It was possible to configure mender-connect to stop shells from expired sessions. See changelog entry below.

Ticket: MEN-6888
Changelog: Stop shell after the ping/pong health check fails, so that the mender-connect can recover after disruption of connectivity. For already released versions of mender-connect the workaround is to force the stop of shells for expired sessions adding to the configuration options the fields:

  "Sessions": {
    "StopExpired": true,
    "ExpireAfterIdle": 600
  }

Setting a limit for expiration high enough (10 minutes, above) so that it doesn't interfere with regular operations.
See https://docs.mender.io/add-ons/mender-connect#remote-terminal-configuration

(cherry picked from commit mendersoftware/mender-connect@e337160)

`mender-connect` has two levels of ping/pong, the standard websockets
one and a custom `shell` protocol one. On the later, when the peer does
not respond to the ping request the shell session, the session is marked
as expired but there was no default mechanism to stop the shell and get
ready for new shells.

The symptom of this bug is that after temporally lose of connectivity,
`mender-connect` will still refuse to open new shells after the
connectivity is restored.

It was possible to configure `mender-connect` to stop shells from expired
sessions. See changelog entry below.

Ticket: MEN-6888
Changelog: Stop shell after the ping/pong health check fails, so that
the `mender-connect` can recover after disruption of connectivity.
For already released versions of `mender-connect` the workaround is to
force the stop of shells for expired sessions adding to the
configuration options the fields:
```
  "Sessions": {
    "StopExpired": true,
    "ExpireAfterIdle": 600
  }
```
Setting a limit for expiration high enough (10 minutes, above) so that it
doesn't interfere with regular operations.
See https://docs.mender.io/add-ons/mender-connect#remote-terminal-configuration

Signed-off-by: Lluis Campos <lluis.campos@northern.tech>
(cherry picked from commit mendersoftware/mender-connect@e337160)
@alfrunes alfrunes requested a review from lluiscampos January 30, 2024 08:17
Copy link
Contributor

@lluiscampos lluiscampos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me (obliviously 😅 ) but I recommend to wait for merging until mendersoftware/mender-connect#130 is done in case there is feedback there that is applicable for nt-connect as well.

@alfrunes alfrunes merged commit cc03427 into NorthernTechHQ:main Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants