Remove software.service

This commit removes the software.service and references in the code
related to this service.

Test Plan:
PASS: AIO-SX install.
PASS: Check no alarms raised.
PASS: Service not present in the host.

Change-Id: I0d1a756c0447815a032a6f19dcaeaf5dfa3f5198
Signed-off-by: Luiz Eduardo Bonatti <LuizEduardo.Bonatti@windriver.com>
This commit is contained in:
Luiz Eduardo Bonatti
2025-11-24 11:52:45 -03:00
parent e818a8fd9e
commit f8c624ee0a
7 changed files with 4 additions and 170 deletions

View File

@@ -37,8 +37,6 @@ override_dh_install:
${ROOT}/etc/init.d/software-controller-daemon
install -m 500 service-files/software-agent-init.sh \
${ROOT}/etc/init.d/software-agent
install -m 500 service-files/software-init.sh \
${ROOT}/etc/init.d/software
install -m 500 service-files/software-controller-init.sh \
${ROOT}/etc/init.d/software-controller
install -m 500 service-files/usm-initialize-init.sh \

View File

@@ -2,7 +2,7 @@
Description=Restore LVM Snapshots
DefaultDependencies=no
After=systemd-udev-settle.service local-fs.target var-log.mount
Before=software.service controllerconfig.service
Before=controllerconfig.service
[Service]
Type=oneshot

View File

@@ -1,6 +1,6 @@
[Unit]
Description=Unified Software Management Agent
After=syslog.target network-online.target software.service
After=syslog.target network-online.target
Before=pmon.service
[Service]

View File

@@ -1,6 +1,6 @@
[Unit]
Description=Unified Software Management Controller Daemon
After=syslog.target network-online.target software.service software-controller.service
After=syslog.target network-online.target software-controller.service
Before=pmon.service
[Service]

View File

@@ -1,6 +1,6 @@
[Unit]
Description=Unified Software Management Controller
After=syslog.service network-online.target software.service
After=syslog.service network-online.target
Before=software-agent.service software-controller-daemon.service
[Service]

View File

@@ -1,138 +0,0 @@
#!/bin/bash
#
# Copyright (c) 2023 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# Unified Software Management
# chkconfig: 345 20 23
# description: StarlingX Unified Software Management init script
### BEGIN INIT INFO
# Provides: software
# Required-Start: $syslog
# Required-Stop: $syslog
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Short-Description: software
# Description: Provides the Unified Software Management component
### END INIT INFO
NAME=$(basename $0)
. /usr/bin/tsconfig
. /etc/platform/platform.conf
logfile=/var/log/software.log
software_install_failed_file=/var/run/software_install_failed
software_updated_during_init_file=/etc/software/.software_updated_during_init
node_is_software_updated_rr_file=/var/persist/software-agent/node_is_software_updated_rr
# if the system has never been bootstrapped, system_mode is not set
# treat a non bootstrapped system like it is simplex
# and manually manage lighttpd, etc..
if [ "${system_mode}" = "" ]; then
system_mode="simplex"
fi
function LOG_TO_FILE {
echo "`date "+%FT%T.%3N"`: $NAME: $*" >> $logfile
}
function check_install_uuid {
# Check whether our installed load matches the active controller
CONTROLLER_UUID=`curl -sf http://controller:${http_port}/feed/rel-${SW_VERSION}/install_uuid`
if [ $? -ne 0 ]; then
if [ "$HOSTNAME" = "controller-1" ]; then
# If we're on controller-1, controller-0 may not have the install_uuid
# matching this release, if we're in an upgrade. If the file doesn't exist,
# bypass this check
return 0
fi
LOG_TO_FILE "Unable to retrieve installation uuid from active controller"
echo "Unable to retrieve installation uuid from active controller"
return 1
fi
if [ "$INSTALL_UUID" != "$CONTROLLER_UUID" ]; then
LOG_TO_FILE "This node is running a different load than the active controller and must be reinstalled"
echo "This node is running a different load than the active controller and must be reinstalled"
return 1
fi
return 0
}
# Check for installation failure
if [ -f /etc/platform/installation_failed ] ; then
LOG_TO_FILE "/etc/platform/installation_failed flag is set. Aborting."
echo "$(basename $0): Detected installation failure. Aborting."
exit 1
fi
# For AIO-SX, abort if config is not yet applied and this is running in init
if [ "${system_mode}" = "simplex" -a ! -f ${INITIAL_CONTROLLER_CONFIG_COMPLETE} -a "$1" = "start" ]; then
LOG_TO_FILE "Config is not yet applied. Skipping init software"
exit 0
fi
# If the management interface is bonded, it may take some time
# before communications can be properly setup.
# Allow up to $DELAY_SEC seconds to reach controller.
if [ "${system_mode}" = "simplex" ]; then
# Make the delay for simplex systems smaller.
# There is no active controller during reboot.
DELAY_SEC=10
else
DELAY_SEC=120
fi
START=`date +%s`
FOUND=0
while [ $(date +%s) -lt $(( ${START} + ${DELAY_SEC} )) ]; do
LOG_TO_FILE "Waiting for controller to be pingable"
ping -c 1 controller > /dev/null 2>&1 || ping6 -c 1 controller > /dev/null 2>&1
if [ $? -eq 0 ]; then
LOG_TO_FILE "controller is pingable"
FOUND=1
break
fi
sleep 1
done
if [ ${FOUND} -eq 0 ]; then
# 'controller' is not available, just exit
LOG_TO_FILE "Unable to contact active controller (controller). Boot will continue."
exit 1
fi
# skip the service execution if booting in the rollback deployment
if grep -q "ostree=/ostree/2" /proc/cmdline; then
LOG_TO_FILE "System is booted from rollback deployment. Skipping execution..."
exit 0
fi
RC=0
case "$1" in
start)
if [ "${system_mode}" = "simplex" ]; then
LOG_TO_FILE "***** Skipping SX legacy patch init service *****"
else
LOG_TO_FILE "***** Skipping DX legacy patch init service *****"
fi
;;
stop)
# Nothing to do here
;;
restart)
LOG_TO_FILE "***** Skipping DX legacy patch init service *****"
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $RC

View File

@@ -1,26 +0,0 @@
[Unit]
Description=Unified Software Management
After=syslog.target network-online.target
Before=software-agent.service
[Service]
Type=oneshot
User=root
ExecStart=/etc/init.d/software start
RemainAfterExit=yes
StandardOutput=journal+console
StandardError=journal+console
# cgroup performance engineering
# - software.service does not provide latency critical service
# - several processes are 100% cpu hog, and/or use significant disk IO
# (eg, /usr/bin/software-agent, ostree, etc)
# - set 1/8th default share
# - set lower IO priority (effective only with 'bfq' scheduler)
CPUShares=128
Nice=19
IOSchedulingClass=best-effort
IOSchedulingPriority=7
[Install]
WantedBy=multi-user.target