From 6fde657c0ed113a0f67f1ffec6ad01380d47a752 Mon Sep 17 00:00:00 2001 From: Sergiy Gladkyy Date: Thu, 28 Aug 2025 12:24:36 +0200 Subject: [PATCH 1/3] RDKEMW-3387: thunder-startup-services - fixed wpeframework-ocdm.service failed state Reason for change: - OCDM fails w/o DRM (fail fast policy) - wpeframework-ocdm.service starts w/o DRM because it is a systemd service which is not aware when device is provisioned - This makes OCDM fail Resolution: New systemd unit wpeframework-provisioning-ready.path allows OCDM to start timely Test Procedure: described in the ticket Implements: code changes in DeviceProvisioning and Thunder Startup Services Risks: No Source: COMCAST License: Apache-2.0 Upstream-Status: Pending Signed-off-by: Sergiy Gladkyy --- systemd/system/wpeframework-ocdm.service | 8 ++++++-- systemd/system/wpeframework-provisioning-ready.path | 11 +++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 systemd/system/wpeframework-provisioning-ready.path diff --git a/systemd/system/wpeframework-ocdm.service b/systemd/system/wpeframework-ocdm.service index 2261dcf..e49e804 100644 --- a/systemd/system/wpeframework-ocdm.service +++ b/systemd/system/wpeframework-ocdm.service @@ -1,9 +1,13 @@ [Unit] -Description=WPEFramework OCDM Initialiser +Description=WPEFramework OCDM Plugin Requires=wpeframework.service After=wpeframework.service ConditionPathExists=/tmp/wpeframeworkstarted + [Service] Type=oneshot RemainAfterExit=yes -ExecStart=/usr/bin/PluginActivator -r 200 OCDM +ExecStart=/usr/bin/PluginActivator org.rdk.OCDM + +[Install] +WantedBy=wpeframework-provisioning-ready.path diff --git a/systemd/system/wpeframework-provisioning-ready.path b/systemd/system/wpeframework-provisioning-ready.path new file mode 100644 index 0000000..d0236b0 --- /dev/null +++ b/systemd/system/wpeframework-provisioning-ready.path @@ -0,0 +1,11 @@ +[Unit] +Description=Wait for Thunder PROVISIONING precondition +Documentation=Thunder framework provisioning precondition fulfilled +After=wpeframework-deviceprovisioning.service + +[Path] +PathExists=/tmp/thunder-provisioning-precondition +MakeDirectory=false + +[Install] +WantedBy=multi-user.target \ No newline at end of file From 51f9ff2bf78fa5b7cecda34ad8e0cf4b242908f1 Mon Sep 17 00:00:00 2001 From: Sergiy Gladkyy Date: Fri, 29 Aug 2025 13:13:20 +0200 Subject: [PATCH 2/3] RDKEMW-3387: thunder-startup-servicee fix wpeframework-ocdm.service fails Reason for change: - OCDM fails w/o DRM (fail fast policy) - wpeframework-ocdm.service starts w/o DRM because it is a systemd service which is not aware when device is provisioned - This makes OCDM fail Resolution: New systemd unit wpeframework-provisioning-ready.path starts OCDM when device is provisioned Test Procedure: described in the ticket Implements: code changes in DeviceProvisioning and Thunder Startup Services Risks: No Source: COMCAST License: Apache-2.0 Upstream-Status: Pending Signed-off-by: Sergiy Gladkyy --- systemd/system/wpeframework-ocdm.service | 5 +++-- systemd/system/wpeframework-provisioning-ready.path | 1 + systemd/system/wpeframework-provisioning-ready.target | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 systemd/system/wpeframework-provisioning-ready.target diff --git a/systemd/system/wpeframework-ocdm.service b/systemd/system/wpeframework-ocdm.service index e49e804..3e47395 100644 --- a/systemd/system/wpeframework-ocdm.service +++ b/systemd/system/wpeframework-ocdm.service @@ -1,7 +1,8 @@ [Unit] Description=WPEFramework OCDM Plugin Requires=wpeframework.service -After=wpeframework.service +After=wpeframework.service wpeframework-provisioning-ready.target +Requisite=wpeframework-provisioning-ready.target ConditionPathExists=/tmp/wpeframeworkstarted [Service] @@ -10,4 +11,4 @@ RemainAfterExit=yes ExecStart=/usr/bin/PluginActivator org.rdk.OCDM [Install] -WantedBy=wpeframework-provisioning-ready.path +WantedBy=wpeframework-provisioning-ready.target diff --git a/systemd/system/wpeframework-provisioning-ready.path b/systemd/system/wpeframework-provisioning-ready.path index d0236b0..1afbbeb 100644 --- a/systemd/system/wpeframework-provisioning-ready.path +++ b/systemd/system/wpeframework-provisioning-ready.path @@ -5,6 +5,7 @@ After=wpeframework-deviceprovisioning.service [Path] PathExists=/tmp/thunder-provisioning-precondition +Unit=wpeframework-provisioning-ready.target MakeDirectory=false [Install] diff --git a/systemd/system/wpeframework-provisioning-ready.target b/systemd/system/wpeframework-provisioning-ready.target new file mode 100644 index 0000000..2016e03 --- /dev/null +++ b/systemd/system/wpeframework-provisioning-ready.target @@ -0,0 +1,5 @@ +[Unit] +Description=Thunder Provisioning Completed +Documentation=Indicates that Thunder PROVISIONING precondition has been fulfilled +RefuseManualStart=yes +RefuseManualStop=yes \ No newline at end of file From 5ca53f2875e3404d67f6061daac6b9dbb9ef912a Mon Sep 17 00:00:00 2001 From: Sergiy Gladkyy Date: Fri, 29 Aug 2025 21:31:56 +0200 Subject: [PATCH 3/3] RDKEMW-3387: thunder-startup-servicee fix wpeframework-ocdm.service fails Reason for change: - OCDM fails w/o DRM (fail fast policy) - wpeframework-ocdm.service starts w/o DRM because it is a systemd service which is not aware when device is provisioned - This makes OCDM fail Resolution: New systemd unit wpeframework-provisioning-ready.path starts OCDM when device is provisioned Test Procedure: described in the ticket Implements: code changes in DeviceProvisioning and Thunder Startup Services Risks: No Source: COMCAST License: Apache-2.0 Upstream-Status: Pending Signed-off-by: Sergiy Gladkyy --- systemd/system/wpeframework-ocdm.service | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/systemd/system/wpeframework-ocdm.service b/systemd/system/wpeframework-ocdm.service index 3e47395..5c06abd 100644 --- a/systemd/system/wpeframework-ocdm.service +++ b/systemd/system/wpeframework-ocdm.service @@ -3,12 +3,11 @@ Description=WPEFramework OCDM Plugin Requires=wpeframework.service After=wpeframework.service wpeframework-provisioning-ready.target Requisite=wpeframework-provisioning-ready.target -ConditionPathExists=/tmp/wpeframeworkstarted [Service] Type=oneshot RemainAfterExit=yes -ExecStart=/usr/bin/PluginActivator org.rdk.OCDM +ExecStart=/usr/bin/PluginActivator OCDM [Install] WantedBy=wpeframework-provisioning-ready.target