AutoSys Workload Automation

Expand all | Collapse all

order sourcing env files when autosys run jobs in 11.3.6

Jump to Best Answer
  • 1.  order sourcing env files when autosys run jobs in 11.3.6

    Posted 08-29-2017 12:39 AM

    Hi

    We have upgraded autosys 11.3.6 from 4.5, but there have been wrong working some jobs which are made shell and pro*c.

    For example.. . Some temp file could not created to right directory. It seems can't recognized some $var).

    I think the reason is env files. (.profile, auto.profile  etc).

    But env files are working well in 4.5 right before.

     

    Is it some different procedure working job via autosys between 4,5 and 11.3.6 ?

    That is, some jobs could not working in 11.3.6 agent with some errors.

     

    Is there some considerstions after agent upgrade 11.3.6 from 4.5 when same jobs run via autosys ?

     

    Job types are variable ( simple shell, call some shell in shell, pro*c, call some files in pro*c.)

    This jobs have been working in autosys 4.5 and now several jobs could't working with some error. (can't recognized some variable in enf files, I think)

     

     

    Thanks



  • 2.  Re: order sourcing env files when autosys run jobs in 11.3.6
    Best Answer

    Broadcom Employee
    Posted 08-29-2017 01:32 AM

    Hi Han,

     

    There are some differences between the 4.5 agent and the 11.3 agent.

     

    The PWD (present working directory) can be set as required using the variable oscomponent.initialworkingdirectory.  Please refer to the following documentation.

     

    https://docops.ca.com/ca-wla-ae-wcc/11-4-2/en/scheduling/ae-scheduling/command-jobs-overview/the-directory-the-job-runs-under

     

    You can also refer to the following documentation which helps to configure the agent to behave like legacy 4.5 agent.

     

    https://docops.ca.com/ca-workload-automation-system-agent/11-3/en/configuring/configure-the-agent/configure-the-agent-to-behave-like-a-legacy-remote-agent

     



  • 3.  Re: order sourcing env files when autosys run jobs in 11.3.6

    Broadcom Employee
    Posted 08-29-2017 03:58 AM

    Hi Han

     

    Just to add some information

     

    11.3 agents DO NOT behave like previous releases.

    The current working directory is under the agent directory, . the job owner's home directory, and the job execution environment is setup in a different order. These differences in behavior can cause jobs to run differently than they may have previously.

    Example of the current working directory:

    A command job running "pwd" will output the following:

    4.5 = /home/job_owner
    11.0 = /home/job_owner
    11.3 = /opt/CA/WorkloadAutomationAE/SystemAgent/WA_AGENT

    Example of the order in which 11.3 sets up the job execution environment:

    global_profile > user_profile > job_profile > auto.profile

    To get same behaviour as 4.5

    After the agent install completes, stop the agent.
    Go to "/opt/CA/WorkloadAutomationAE/SystemAgent/WA_AGENT"

     

    1. Open "agentparm.txt" in vi, or your editor of choice.

    2. Locate the following section:

      # Unix specific settings

    3. Add or update the following parameters

      #this tells the agent to switch to the user home
      oscomponent.initialworkingdirectory=USER
      #these are required to prevent the sourcing of the user's login profile
      oscomponent.noforceprofile=true
      oscomponent.profiles.src.delay=true
      oscomponent.profiles.global.override=true
    4. restart the Agent


  • 4.  Re: order sourcing env files when autosys run jobs in 11.3.6

    Posted 08-29-2017 06:53 AM

    This is causing the issues I found this with Scott Fowler last year:

    Profile

    If a job is not respecting variables in the profile listed in the profile attribute check on these settings in system agent

    • legacy mode is chosen:
      • noforceprofile=true
      • profiles.src.delay=true 
    • legacy is not chosen and you need the user login profile sourced then you need to make sure you do not delay the profile. 
      • noforceprofile=false
      • profiles.src.delay=false