"Undeploy" was a service task in Runtime, but it never actually got Undeployed, rather it kept the status "Undeploying" for hours in RE.
Resolution
- Ensure the feature is removed from runtime by the list command.
========
* Start the Runtime client.
* Execute the below command,
feature:list | grep -i featurename
feature:uninstall featurename
========
- Stop Remote engine and runtime services.
- Also confirm the task is removed from:
*Stop the Remote Engine
*Remove the task id from " $RE_HOME/data/dsrunner/exec/microservices/<taskExecutionId>.(# if it is service we use microservices or if it is route we can use OSGi)
*Restart the Remote Engine.
- Perform the deployment of the new version followed by undeployment once the task is undeployed.
This solution is applicable only when one of the routes or services has an issue.