Maintenance Manager is one of the WPEFramework Thunder Plugin that manages the daily maintenance activities on RDK device.
| Daily Maintenance | Set of Activities (or tasks) that needs to be executed daily without impacting the UX. Executed when the user is not actively using the CPE |
|---|---|
| Maintenance Activity | Activity (or Task) that is a part of Daily Maintenance. They are considered critical and wake up the Device from DEEPSLEEP power state to be executed |
| DCM | Device Configuration Manager, it fetches and updates configuration for Device |
| RFC | RDK Runtime Feature Control, is used for remotely controlling CPE software features on RDK platforms. Release Management uses RFC for staged rollout of new features. |
| Log Upload | Uploads all the logs at the time specified in DCMSettings.conf or when the size reaches predefined limit |
| FW Download (swupdate/ rdkfwupgrader) | Checkis if there is a new firmware update is required and performing the update on the device (if needed) |
Also known as Maintenance on Bootup. RDK automatically performs a Maintenance as soon as the device boots up. Unsolicited maintenance occurs on each and every bootup. Device will look for critical updates on boot and performs maintenance of critical activities without application triggering maintenance. The isRebootPending will be set to false unless there is an RFC/FWUpdate needed. Below are the tasks executed as part of unsolicited maintenance.
Also known as Scheduled Maintenance/ Daily Maintenance. This is executed daily based on Maintenance Start Time triggered by Application. The isRebootPending is set to true irrespective of XConf configuration. Below are the tasks executed as part of Solicited Maintenance
Note: Both Unsolicited and Solicited maintenance cannot be triggered at the same time. If a Solicited Maintenance is started while an Unsolicited Maintenance is in progress, then the Solicited Maintenance will be notified and postponed to the next day.
WhoAmI is used by device to determine the operating context (partner, product/experience, Regional configService) and load the right firmware so that we can activate and use the service that user signed up for. It happens only in Unsolicited Maintenance. It is not defaulted in RDKE yet (as of 25Q2). WhoAmI has dependency on components such as AuthService which has to be refactored before making it suitable for community builds usage.
| Activity/ Task Name | RDKV | RDKE | ||
|---|---|---|---|---|
| Wrapper | Task | Wrapper | Task | |
| RFC | /lib/rdk/Start_RFC.sh | /lib/rdk/RFCbase.sh | /lib/rdk/StartMaintenanceTasks.sh RFC | ENABLE_RFC_MANAGER flag Enabled |
/usr/bin/rfcMgr | ||||
| ENABLE_RFC_MANAGER flag Disbled | ||||
/lib/rdk/RFCbase.sh | ||||
| SWUPDATE | /lib/rdk/swupdate_utility.sh | FWDOWNLOAD RFC Enabled | /lib/rdk/StartMaintenanceTasks.sh SWUPDATE | /usr/bin/rdkvfwupgrader 0 1 |
/usr/bin/rdkvfwupgrader 0 1 | ||||
| FWDOWNLOAD RFC Disabled | ||||
/lib/rdk/deviceInitiatedFWDnld.sh | ||||
| LOGUPLOAD | /lib/rdk/Start_uploadSTBLogs.sh | /lib/rdk/uploadSTBLogs.sh | /lib/rdk/StartMaintenanceTasks.sh LOGUPLOAD | /lib/rdk/uploadSTBLogs.sh |
The DCMScript.sh (in RDKV) or dcmd (in RDKE) will parse the /tmp/DCMSettings.conf file to get XConf Data fetched by Telemetry. Data likeurn:settings:CheckSchedule:cron is used to get start_hr and start_min values and urn:settings:TimeZoneMode is used to get the tz_mode data. Device is expected to receive the time based on the time zone confiigured in the device. This parsed data is then stored to /opt/rdk_maintenance.conf file by DCM. The data can be used to calculate the Maintenance Start Time for the next scheduled Maintenance (SOLICITED). The Maintenance Start Time is calculated using /lib/rdk/getMaintenanceStartTime.sh (in RDKV) or using CalculateStartTime() API in MaintenanceManager internally.
Maintenance Manager logs can be found in wpeframework log.
Grep string: grep -inr "MaintenanceManager.cpp" /opt/logs/maintenance.log*