Agent Upgrade issue - File busy!: /opt/CA/r11.3/SystemAgent/autosys_dev/cybspawn.bin

book

Article ID: 222612

calendar_today

Updated On:

Products

CA Workload Automation AE - System Agent (AutoSys)

Issue/Introduction

We are seeing below issue while trying an agent upgrade if job is running on machine.

Before agent upgrade we have stopped agent using /etc/init.d script.

Also tried killing cybAgent.bin, however its not stopping the cybspawn.bin.

===========================

Custom Action:            cybermation.iainstaller.library.CybFatalException
                          Status: FATAL ERROR
                          Additional Notes: FATAL ERROR -     class cybermation.iainstaller.library.CybFatalException FatalInstallException: The agent is currently running or has jobs still executing. It cannot be upgraded.

====================STDERR ENTRIES==================

Checking for agent shutdown
Running command: /opt/CA/r11.3/SystemAgent/autosys_dev/cybAgent -s
Upgrade check failed: com.ca.sysagt.utilities.AgentUtilsException: File busy!: /opt/CA/r11.3/SystemAgent/autosys_dev/cybspawn.bin
Execute Custom Code
    class cybermation.iainstaller.library.upgrade.UpgradeCheck NonfatalInstallException Upgrade check failed: com.ca.sysagt.utilities.AgentUtilsException: File busy!: /opt/CA/r11.3/SystemAgent/autosys_dev/cybspawn.bin

Environment

Release : 12.0

Component : CA Workload Automation System Agent

Resolution

Unix/Linux O/S architecture allows file copy while the files are in-use, so I am able to successfully upgrade an Agent on Linux with the below install options while jobs are running on the Agent.
./setup.bin -i SILENT  -DACCEPT_EULA=ACCEPT -DAGENT_UPGRADE_FORCE=true -DUPGRADE_ACTIVEJOB_CHECK=false -DAGENT_UPGRADE_PATH=/opt/CA/WorkloadAutomationAE/SystemAgent/WA_AGENT -DUSE_BUNDLED_JVM=true
There are two variables that the Agent installer depends on:
01. UPGRADE_ACTIVEJOB_CHECK:
It specifies the installer to check for running jobs and stop the agent before upgrading the agent.
UPGRADE_ACTIVEJOB_CHECK = true or false (the default is true)
 false: do not perform agent upgrade checks and Agent will not be stopped before upgrading the agent
 true: perform agent upgrade checks and stop Agent before upgrade
 If set to false and an upgrade may fail if unable to overwrite the existing files/binaries based on the O/S architecture.
02. AGENT_UPGRADE_FORCE:
It specifies the installer to force an upgrade ignoring warnings if any.
AGENT_UPGRADE_FORCE = true or false (the default is false)
 false:  The agent upgrade will treat all warnings as failures.
 true:  The agent upgrade will not fail due to any warnings.
Windows O/S architecture does not allow file copy while files are in use. So Agent upgrade fails no matter whether these variables are set to proper value.