Skip to content

Extending feature architecture with Control API behavior and Recovery Actions - #800

Draft
NicolasFussberger wants to merge 9 commits into
eclipse-score:mainfrom
etas-contrib:control_seq_diagrams
Draft

NicolasFussberger wants to merge 9 commits into
eclipse-score:mainfrom
etas-contrib:control_seq_diagrams

Conversation

@NicolasFussberger

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Recovery and request-rejection paths remain incomplete, and the detailed shutdown diagram is no longer included in published documentation.

3 open findings
What changed in this PR

This documentation-only PR extends the Launch Manager architecture with Control API behavior and recovery scenarios.

Changes:

  • Documents queued and forced Run Target activation.
  • Expands recovery escalation and supervision-failure diagrams.
  • Updates lifecycle examples, shutdown sequences, and configuration fields.
File Description
docs/​features/​lifecycle/​architecture/​startup_shutdown.rst Updates activation references.
docs/​features/​lifecycle/​architecture/​run_target_activation.rst Documents Control API scenarios.
docs/​features/​lifecycle/​architecture/​recovery_actions.rst Expands recovery behavior.
docs/​features/​lifecycle/​architecture/​health_monitoring.rst Links supervision failure recovery.
docs/​features/​lifecycle/​architecture/​components_run_targets.rst Extends the example description.
docs/​features/​lifecycle/​architecture/​_assets/​launch_manager_supervision_failure.puml Adds supervision failure sequence.
docs/​features/​lifecycle/​architecture/​_assets/​launch_manager_startup.puml Clarifies configured startup target.
docs/​features/​lifecycle/​architecture/​_assets/​launch_manager_small_example_graph.puml Expands targets and dependencies.
docs/​features/​lifecycle/​architecture/​_assets/​launch_manager_shutdown.puml Includes StateManager shutdown.
docs/​features/​lifecycle/​architecture/​_assets/​launch_manager_run_target_off.puml Expands dependency-ordered termination.
docs/​features/​lifecycle/​architecture/​_assets/​launch_manager_run_target_minimal.puml Illustrates Minimal target startup.
docs/​features/​lifecycle/​architecture/​_assets/​launch_manager_run_target_failure.puml Adds transition failure recovery.
docs/​features/​lifecycle/​architecture/​_assets/​launch_manager_random_crash.puml Expands component recovery alternatives.
docs/​features/​lifecycle/​architecture/​_assets/​control_interface_startup.puml Shows registration, queries, and callbacks.
docs/​features/​lifecycle/​architecture/​_assets/​control_interface_queued_activation.puml Illustrates queued requests.
docs/​features/​lifecycle/​architecture/​_assets/​control_interface_forced_activation.puml Illustrates forced activation.
docs/​features/​lifecycle/​architecture/​_assets/​config_params_static.puml Adds activation retry count.
docs/​features/​lifecycle/​architecture/​_assets/​alive_monitoring_start.puml Shows supervision deactivation during shutdown.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/features/lifecycle/architecture/startup_shutdown.rst
@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-800: https://eclipse-score.github.io/lifecycle/pr-800/

Comment thread docs/features/lifecycle/architecture/run_target_activation.rst
Comment thread docs/features/lifecycle/architecture/run_target_activation.rst Outdated

note over sm,LM
Launch Manager activates its initial Run Target "Minimal", which requires StateManager.
StateManager depends on setup_filesystems.sh, so it is started first.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The sequence is correct - but I'm not sure if the setup_filesystems.sh component needs to be shown here. I would tend to only show the state manager

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was trying to have an example Run Target graph that shows different variants for the Ready Conditions.
The different diagrams show transitions to different targets.

This here is the only diagram that shows setup_filesytem.sh activation as an example of a self-terminating process with ReadyCondition:terminated, the other ones always start with SM being active.

Comment thread docs/features/lifecycle/architecture/recovery_actions.rst Outdated
Comment thread docs/features/lifecycle/architecture/recovery_actions.rst Outdated
Comment thread docs/features/lifecycle/architecture/recovery_actions.rst Outdated
If a Run Target transition fails, the Launch Manager executes the Run Target Recovery Action as configured for the affected Run Target.
The currently only supported Run Target Recovery Action is the activation of the `fallback Run Target`.

.. feat_arc_dyn:: Launch Manager - Run Target Transition Failure

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we could add one last diagram to also show the escalation to wachdog.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The watchdog escalation is a bit fuzzy, I assume this will change a lot.
I'll prepare a proposal for next weeks score meeting, I wonder if we shall update the watchdog stuff only afterwards.

:align: center

Note: If a Restart Recovery Action is configured then only the crashed component is restarted, not dependent components.
The diagram shows a component crash during an active Run Target (outside of a Run Target transition).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not sure we should detail the "implementation" of recovery actions here, so not show what happens if you have a restart RA configured as I don't think this is on the feature requirement level but component.

I think ideally this would be moved to component architecture level since then you could also link the comp_req I think.

I guess for now this is fine though since we don't have this level.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You are right. Now that the feature requirements are largely moved to component level there is much that is not specified on the feature level at all.
I would also say since we have no component level right now we keep this at feature level and move things down once we can

@@ -0,0 +1,123 @@
' *******************************************************************************

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this might be too complicated and too big.

I think it might be good to just have a simple showcase of
Minimal -> Startup (force = False)
Startup -> Off (force = True)

Also not sure if the last stop state manager and de active filesystem is needed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think it can be simplified like you mention.
The reason to add this "Full" Run Target was to show that there is a request in the queue that is then being removed when the force request comes in.

With the suggested simplification there would be no queued request to removed. Though only removed this probably does not make a huge simplification.

I left the transition to Off in there as this is the only place that shows the termination of setup_filesystems.sh
Readers might be wondering what has to be done to shutdown such a component, which is not depicted in any other diagram.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I added now subheadings to the diagram
grafik

1. **Queued Activation**

In this mode, requests to activate a Run Target are placed in a queue and processed sequentially by the Launch Manager.
A State Manager can issue multiple Run Target transition requests and they will be executed sequentially by the Launch Manager.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe add what happens if a queued switch fails?

should it be
Queue RT1
Queue RT2
RT1 fails
Switch to Fallback
RT2 switch removed from the Queue?

Might be good to even add this as a requirement.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added this to Timos PR https://github.com/eclipse-score/lifecycle/pull/808/changes#r4314522348

From the discussions in Score I think your assumption is correct. Queue is cleared after failure.
I'll update the description and note in the recovery action diagram that queue is cleared

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

2. **Forced Activation**

In this mode, requests to activate a Run Target are performed immediately by the Launch Manager, potentially interrupting any ongoing transitions.
A forced activation request bypasses the queue and is executed immediately and removes any queued requests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Description can be more clear, see header file

/// @PARAM[in] force If false (default), the request is queued behind any
/// in-progress activation and executed afterwards.
/// If true, any in-progress activation is cancelled, the
/// queue is cleared, and this activation starts immediately.
@SimonKozik

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reworded

Comment thread docs/features/lifecycle/architecture/run_target_activation.rst Outdated
Comment thread docs/features/lifecycle/architecture/_assets/control_interface_startup.puml Outdated
Comment thread docs/features/lifecycle/architecture/_assets/control_interface_startup.puml Outdated

This branch is waiting to be deployed

1 waiting deployment
workflow-approval — 659714af Waiting Oct 20, 2026 by NicolasFussberger via Build and test unit-tests-x86_64-qnx / approval #1596
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

4 participants