diff --git a/docs/features/lifecycle/glossary.rst b/docs/features/lifecycle/glossary.rst index f0075d78b..68f3d2871 100644 --- a/docs/features/lifecycle/glossary.rst +++ b/docs/features/lifecycle/glossary.rst @@ -60,6 +60,19 @@ Glossary Component A configurable unit in the Launch Manager that describes an executable and its runtime environment (sandbox). Components can be grouped together in Run Targets to define system operational states. + Ready State + A state when the component is ready to provide services to other components. + + Dependency (between components) + A configuration parameter indicating that **Component A** can only start + after **Component B** has reached its :term:`Ready State`. In this case, + **Component A** depends on **Component B**. + + Dependency (between run targets) + A configuration parameter indicating that **Run Target A** includes all + components from **Run Target B**. In this case, **Run Target A** depends + on **Run Target B**. + Lifecycle Component Node of the dependency tree. diff --git a/score/launch_manager/docs/requirements/requirements.rst b/score/launch_manager/docs/requirements/requirements.rst index 690a5247d..cdf53abfc 100644 --- a/score/launch_manager/docs/requirements/requirements.rst +++ b/score/launch_manager/docs/requirements/requirements.rst @@ -295,8 +295,8 @@ Launching Processes Conditional Launching ===================== -.. comp_req:: Conditionally launch of processes - :id: comp_req__launch_man__cond_process_start +.. comp_req:: Configuration of component readiness conditions + :id: comp_req__launch_man__conf_of_comp_ready_cond :reqtype: Functional :security: NO :safety: ASIL_B @@ -305,12 +305,12 @@ Conditional Launching :version: 1 :satisfied_by: comp__lifecycle_launch_manager - The :term:`Launch Manager` shall provide support to conditionally start a process - or process group based on the return value of a single or multiple :term:`Processes ` - executed before. + The :term:`Launch Manager` shall support configuration of conditions that + shall be met before the component is considered to have reached its + :term:`Ready State`. -.. comp_req:: Condition timeout - :id: comp_req__launch_man__total_wait_time_support +.. comp_req:: Dependency based startup order + :id: comp_req__launch_man__dep_based_startup_order :reqtype: Functional :security: NO :safety: ASIL_B @@ -319,11 +319,11 @@ Conditional Launching :version: 1 :satisfied_by: comp__lifecycle_launch_manager - The :term:`Launch Manager` shall provide support for per condition configurable - total wait time for launch conditions to be satisfied. + The :term:`Launch Manager` shall start a component only after all its + :term:`dependencies ` have successfully reached their :term:`Ready State`. -.. comp_req:: Conditional launch polling interval - :id: comp_req__launch_man__polling_interval +.. comp_req:: Configuration of run target activation timeout + :id: comp_req__launch_man__conf_rt_active_timeout :reqtype: Functional :security: NO :safety: ASIL_B @@ -332,11 +332,11 @@ Conditional Launching :version: 1 :satisfied_by: comp__lifecycle_launch_manager - The :term:`Launch Manager` shall provide support for per condition configurable - :term:`Polling Interval` for launch conditions to be checked. + The :term:`Launch Manager` shall support configuration of the maximum time + an activation of a run target can take. -.. comp_req:: Pre-start validation - :id: comp_req__launch_man__validate_conditions +.. comp_req:: Run target activation timeout + :id: comp_req__launch_man__rt_activate_timeout :reqtype: Functional :security: NO :safety: ASIL_B @@ -345,19 +345,8 @@ Conditional Launching :version: 1 :satisfied_by: comp__lifecycle_launch_manager - The :term:`Launch Manager` shall be able to validate the pre-start conditions of the executable using the conditions. - -.. comp_req:: post-start validation - :id: comp_req__launch_man__validation_conditions - :reqtype: Functional - :security: NO - :safety: ASIL_B - :derived_from: feat_req__lifecycle__conditional_startup[version==1] - :status: valid - :version: 1 - :satisfied_by: comp__lifecycle_launch_manager - - The :term:`Launch Manager` shall be able to validate the start of the executable using the conditions. + If the activation of a run target exceeds the maximum configured time, then + the :term:`Launch Manager` shall consider this activation as failed. .. comp_req:: Launched Process status :id: comp_req__launch_man__launcher_status_storage @@ -407,18 +396,6 @@ Conditional Launching The :term:`Launch Manager` shall provide a method for condition check for a path. -.. comp_req:: Condition check based on ENV - :id: comp_req__launch_man__env_variable_cond_check - :reqtype: Functional - :security: NO - :safety: ASIL_B - :derived_from: feat_req__lifecycle__conditional_startup[version==1] - :status: valid - :version: 1 - :satisfied_by: comp__lifecycle_launch_manager - - The :term:`Launch Manager` shall provide a method for condition check for environment variable. - .. comp_req:: Condition check based on all dependency :id: comp_req__launch_man__dependency_check :reqtype: Functional diff --git a/score/launch_manager/src/daemon/src/configuration/component_config.hpp b/score/launch_manager/src/daemon/src/configuration/component_config.hpp index ab17ef872..1600b3ee0 100644 --- a/score/launch_manager/src/daemon/src/configuration/component_config.hpp +++ b/score/launch_manager/src/daemon/src/configuration/component_config.hpp @@ -77,6 +77,8 @@ struct ComponentProperties ApplicationProfile application_profile; std::vector depends_on; std::vector process_arguments; + + // req-Id: comp_req__launch_man__conf_of_comp_ready_cond ReadyCondition ready_condition; }; struct Sandbox diff --git a/score/launch_manager/src/daemon/src/configuration/config.hpp b/score/launch_manager/src/daemon/src/configuration/config.hpp index 3444b9b78..bd7790630 100644 --- a/score/launch_manager/src/daemon/src/configuration/config.hpp +++ b/score/launch_manager/src/daemon/src/configuration/config.hpp @@ -33,6 +33,8 @@ struct RunTargetConfig std::string name; std::string description; std::vector depends_on; + + // req-Id: comp_req__launch_man__conf_rt_active_timeout std::uint32_t transition_timeout_ms{}; SwitchRunTargetAction recovery_action; }; diff --git a/score/launch_manager/src/daemon/src/process_group_manager/details/transition.hpp b/score/launch_manager/src/daemon/src/process_group_manager/details/transition.hpp index ba0b960d1..69038dafe 100644 --- a/score/launch_manager/src/daemon/src/process_group_manager/details/transition.hpp +++ b/score/launch_manager/src/daemon/src/process_group_manager/details/transition.hpp @@ -244,6 +244,7 @@ class Transition /// aborted transition are captured too). Then moves to the Starting Phase to bring up @p target. void setupTransition(GraphIndex target) { + // req-Id: comp_req__launch_man__dep_based_startup_order std::fill(state_.in_target_subgraph.begin(), state_.in_target_subgraph.end(), false); state_.target_root = target;