Prepare the upgrade of the Workload Scheduler for z/OS agent to version 10.1 Fix Pack 3 for Linux x86_64
Log In or Register to download the BES file, and more.

0 Votes

Description

Prepare the upgrade of the Workload Scheduler for z/OS agent to version 10.1 Fix Pack 3 for Linux x86_64

The following fixlet performs the following actions:

  • Downloads the images from the BigFix server / relay.
  • Extracts the images.
  • Checks if the IBM Workload Scheduler command line tools are running (conman, composer, fileaid). If they are running, the action fails.
  • Enables the Install fixlet for the upgrade.

NOTE: this is an update of Fixlets created by BigFix.me user https://bigfix.me/user/WorkloadAutomationSupportTeam and publisehd as BigFix.me fixlets:

26834/26833/26832/...../26825 


Property Details

ID27011
StatusBeta - Preliminary testing ready for more
TitlePrepare the upgrade of the Workload Scheduler for z/OS agent to version 10.1 Fix Pack 3 for Linux x86_64
DomainBESC
Download Size613438179
SourceInternal
Source Release Date7/7/2023 12:00:00 AM
KeywordsUpdate/Install
Added by on 11/3/2023 1:35:13 AM
Last Modified by on 11/3/2023 1:35:13 AM
Counters 451 Views / 0 Downloads
User Rating 1 star 2 star 3 star 4 star 5 star * Average over 0 ratings. ** Log In or Register to add your rating.

Relevance

Used in 54 fixlets   * Results in a true/false
Show indented relevance
architecture of operating system = "x86_64"
Used in 64 fixlets and 1 analsis   * Results in a true/false
Show indented relevance
version of client >= "8.2"
Used in 1 fixlet   * Results in a true/false
Show indented relevance
(name of it as lowercase starts with "linux") of operating system
Used in 1 fixlet   * Results in a true/false
Show indented relevance
not exists file "__TWSUpgrade.lck" of client folder of current site
Used in 1 fixlet   * Results in a true/false
Show indented relevance
"9.5.0.3" <= ((following text of firsts "." of tuple string items 1 of (concatenations ", " of following texts of firsts "/Tivoli/Workload_Scheduler/maestro_DN_" of variables of files "TWSRegistry.dat" of (if windows of operating system then (windows folder;system x64 folder; system x32 folder) else folders "/etc/TWS"))) as version| "0" as version)
Used in 1 fixlet   * Results in a true/false
Show indented relevance
"10.1.0.3" > ((following text of firsts "." of tuple string items 1 of (concatenations ", " of following texts of firsts "/Tivoli/Workload_Scheduler/maestro_DN_" of variables of files "TWSRegistry.dat" of (if windows of operating system then (windows folder;system x64 folder; system x32 folder) else folders "/etc/TWS"))) as version| "0" as version)

Actions

Action 1 (default)

Action Link Click here to deploy this action.
Script Type BigFix Action Script
// Download image from the BigFix server / relay
prefetch 10.1.0-IBM-IWS-LNX_X86_64_ZOS_AGENT-FP0003.zip sha1:af179053b7b7b4b5f05e125ae79489191a8d0c23 size:613438179 http://127.0.0.1:52311/uploads/af179053b7b7b4b5f05e125ae79489191a8d0c23/10.1.0-IBM-IWS-LNX_X86_64_ZOS_AGENT-FP0003.zip.bfswd

parameter "Image" = "10.1.0-IBM-IWS-LNX_X86_64_ZOS_AGENT-FP0003.zip"

// Create subfolder /tmp/TWA
folder create "/tmp/TWA"

// Create subfolder /tmp/TWA/tws1013
folder create "/tmp/TWA/tws1013"

// Cleanup subfolder 1013
folder delete "{pathname of client folder of current site}/1013"

// Create subfolder 1013
folder create "{pathname of client folder of current site}/1013"

// Retrieve TMP from relevance
parameter "TMP" = "{pathname of client folder of current site}/1013"

// Download unzip from the BigFix server / relay
// prefetch unzip sha1:9c4c819edc673e672ace26350cf877207fded479 size:102488 http://127.0.0.1:52311/uploads/9c4c819edc673e672ace26350cf877207fded479/unzip-linux_x86.bfswd sha256:4a0a85b7aaba38008dd752b95d7a187a85fa01e33b9f272325047ac5a1bb7de7
// Extract image to $TMP/TWA/tws1013
if {not exists folder "TWS" of folder (parameter "TMP") | false}
// Delete __createfile
    delete __createfile

// Delete $TMP/run.sh
    delete "{parameter "TMP"}/run.sh"

// Create extract script
    createfile until EOF
#!/bin/sh
"/usr/bin/unzip" -o "{pathname of client folder of current site & "/__Download/" & parameter "Image"}" -d "{parameter "TMP"}"
if [ "$?" = "0" ]
then
    exit 0
else
    rm -rf "{parameter "TMP"}" >/dev/null 2>&1
    mkdir -p "{parameter "TMP"}"
    unzip -o "{pathname of client folder of current site & "/__Download/" & parameter "Image"}" -d "{parameter "TMP"}"
    exit $?
fi
EOF
// Move __createfile to $TMP/run.sh
    move __createfile "{parameter "TMP"}/run.sh"

// Execute run.sh
    wait sh "{parameter "TMP"}/run.sh"

// Continue if the return code of the previous command was 0
    continue if {exit code of action = 0}

// Delete $TMP/run.sh
    delete "{parameter "TMP"}/run.sh"
endif

// Retrieve ActionTools from relevance
parameter "ActionTools" = "{parameter "TMP" & "/TWS/LINUX_X86_64/ACTIONTOOLS"}"

// Retrieve UserOwner from relevance
parameter "UserOwner" = "{(preceding text of first "-" of it | it) of concatenation "-" of items 0 of ((((following text of first "DN_UserOwner=" of element whose (it contains "DN_UserOwner=") of it) , (following text of first "DN_InstallationPath=" of element whose (it contains "DN_InstallationPath=") of it) , (following text of first "DN_MajorVersion=" of element whose (it contains "DN_MajorVersion=") of it) , (following text of first "DN_MinorVersion=" of element whose (it contains "DN_MinorVersion=") of it) , (if ((following text of first "DN_MaintenanceVersion=" of element whose (it contains "DN_MaintenanceVersion=") of it) != "") then (following text of first "DN_MaintenanceVersion=" of element whose (it contains "DN_MaintenanceVersion=") of it) else "0") , (following text of first "DN_Agent=" of element whose (it contains "DN_Agent=") of it) , (maximum of (lasts 2 of substrings separated by "-" of ((if it != "" then it else "00") of concatenation "-" of (following texts of firsts "DN_PackageName=" of elements whose (it contains "FP_TWS") of it)) as integer))) of (set of items 1 of (item 0 of it, elements of item 1 of it) whose (item 1 of it contains ("/" & item 0 of it & "_DN"))) of (unique values of preceding texts of firsts "_DN" of following texts of firsts "/Tivoli/Workload_Scheduler/" of elements of it, it) of (set of lines of file "TWSRegistry.dat" of folder "/etc/TWS")) whose ((item 5 of it = "LWA") AND ((((item 2 of it as integer = 9 AND item 3 of it as integer = 3 AND item 4 of it as integer = 0 AND item 6 of it as integer > 2) OR (item 2 of it as integer = 9 AND item 3 of it as integer = 4 AND item 4 of it as integer = 0) OR (item 2 of it as integer = 9 AND item 3 of it as integer = 5 AND item 4 of it as integer = 0 AND item 6 of it as integer < 3)) AND (exists file ".zcentric" of folder (item 1 of it as string & "/_uninstall/ACTIONTOOLS"))))))}"

// Retrieve InstallationPath from relevance
parameter "SourceInstallationPath" = "{(preceding text of first "-" of it | it) of concatenation "-" of items 1 of ((((following text of first "DN_UserOwner=" of element whose (it contains "DN_UserOwner=") of it) , (following text of first "DN_InstallationPath=" of element whose (it contains "DN_InstallationPath=") of it) , (following text of first "DN_MajorVersion=" of element whose (it contains "DN_MajorVersion=") of it) , (following text of first "DN_MinorVersion=" of element whose (it contains "DN_MinorVersion=") of it) , (if ((following text of first "DN_MaintenanceVersion=" of element whose (it contains "DN_MaintenanceVersion=") of it) != "") then (following text of first "DN_MaintenanceVersion=" of element whose (it contains "DN_MaintenanceVersion=") of it) else "0") , (following text of first "DN_Agent=" of element whose (it contains "DN_Agent=") of it) , (maximum of (lasts 2 of substrings separated by "-" of ((if it != "" then it else "00") of concatenation "-" of (following texts of firsts "DN_PackageName=" of elements whose (it contains "FP_TWS") of it)) as integer))) of (set of items 1 of (item 0 of it, elements of item 1 of it) whose (item 1 of it contains ("/" & item 0 of it & "_DN"))) of (unique values of preceding texts of firsts "_DN" of following texts of firsts "/Tivoli/Workload_Scheduler/" of elements of it, it) of (set of lines of file "TWSRegistry.dat" of folder "/etc/TWS")) whose ((item 5 of it = "LWA") AND ((((item 2 of it as integer = 9 AND item 3 of it as integer = 3 AND item 4 of it as integer = 0 AND item 6 of it as integer > 2) OR (item 2 of it as integer = 9 AND item 3 of it as integer = 4 AND item 4 of it as integer = 0) OR (item 2 of it as integer = 9 AND item 3 of it as integer = 5 AND item 4 of it as integer = 0 AND item 6 of it as integer < 3)) AND (exists file ".zcentric" of folder (item 1 of it as string & "/_uninstall/ACTIONTOOLS"))))))}"

// Retrieve MajorVersion from relevance
parameter "SourceMajorVersion" = "{(preceding text of first "-" of it | it) of concatenation "-" of items 2 of ((((following text of first "DN_UserOwner=" of element whose (it contains "DN_UserOwner=") of it) , (following text of first "DN_InstallationPath=" of element whose (it contains "DN_InstallationPath=") of it) , (following text of first "DN_MajorVersion=" of element whose (it contains "DN_MajorVersion=") of it) , (following text of first "DN_MinorVersion=" of element whose (it contains "DN_MinorVersion=") of it) , (if ((following text of first "DN_MaintenanceVersion=" of element whose (it contains "DN_MaintenanceVersion=") of it) != "") then (following text of first "DN_MaintenanceVersion=" of element whose (it contains "DN_MaintenanceVersion=") of it) else "0") , (following text of first "DN_Agent=" of element whose (it contains "DN_Agent=") of it) , (maximum of (lasts 2 of substrings separated by "-" of ((if it != "" then it else "00") of concatenation "-" of (following texts of firsts "DN_PackageName=" of elements whose (it contains "FP_TWS") of it)) as integer))) of (set of items 1 of (item 0 of it, elements of item 1 of it) whose (item 1 of it contains ("/" & item 0 of it & "_DN"))) of (unique values of preceding texts of firsts "_DN" of following texts of firsts "/Tivoli/Workload_Scheduler/" of elements of it, it) of (set of lines of file "TWSRegistry.dat" of folder "/etc/TWS")) whose ((item 5 of it = "LWA") AND ((((item 2 of it as integer = 9 AND item 3 of it as integer = 3 AND item 4 of it as integer = 0 AND item 6 of it as integer > 2) OR (item 2 of it as integer = 9 AND item 3 of it as integer = 4 AND item 4 of it as integer = 0) OR (item 2 of it as integer = 9 AND item 3 of it as integer = 5 AND item 4 of it as integer = 0 AND item 6 of it as integer < 3)) AND (exists file ".zcentric" of folder (item 1 of it as string & "/_uninstall/ACTIONTOOLS"))))))}"

// Retrieve MinorVersion from relevance
parameter "SourceMinorVersion" = "{(preceding text of first "-" of it | it) of concatenation "-" of items 3 of ((((following text of first "DN_UserOwner=" of element whose (it contains "DN_UserOwner=") of it) , (following text of first "DN_InstallationPath=" of element whose (it contains "DN_InstallationPath=") of it) , (following text of first "DN_MajorVersion=" of element whose (it contains "DN_MajorVersion=") of it) , (following text of first "DN_MinorVersion=" of element whose (it contains "DN_MinorVersion=") of it) , (if ((following text of first "DN_MaintenanceVersion=" of element whose (it contains "DN_MaintenanceVersion=") of it) != "") then (following text of first "DN_MaintenanceVersion=" of element whose (it contains "DN_MaintenanceVersion=") of it) else "0") , (following text of first "DN_Agent=" of element whose (it contains "DN_Agent=") of it) , (maximum of (lasts 2 of substrings separated by "-" of ((if it != "" then it else "00") of concatenation "-" of (following texts of firsts "DN_PackageName=" of elements whose (it contains "FP_TWS") of it)) as integer))) of (set of items 1 of (item 0 of it, elements of item 1 of it) whose (item 1 of it contains ("/" & item 0 of it & "_DN"))) of (unique values of preceding texts of firsts "_DN" of following texts of firsts "/Tivoli/Workload_Scheduler/" of elements of it, it) of (set of lines of file "TWSRegistry.dat" of folder "/etc/TWS")) whose ((item 5 of it = "LWA") AND ((((item 2 of it as integer = 9 AND item 3 of it as integer = 3 AND item 4 of it as integer = 0 AND item 6 of it as integer > 2) OR (item 2 of it as integer = 9 AND item 3 of it as integer = 4 AND item 4 of it as integer = 0) OR (item 2 of it as integer = 9 AND item 3 of it as integer = 5 AND item 4 of it as integer = 0 AND item 6 of it as integer < 3)) AND (exists file ".zcentric" of folder (item 1 of it as string & "/_uninstall/ACTIONTOOLS"))))))}"

// Retrieve MaintenanceVersion from relevance
parameter "SourceMaintenanceVersion" = "{(preceding text of first "-" of it | it) of concatenation "-" of items 4 of ((((following text of first "DN_UserOwner=" of element whose (it contains "DN_UserOwner=") of it) , (following text of first "DN_InstallationPath=" of element whose (it contains "DN_InstallationPath=") of it) , (following text of first "DN_MajorVersion=" of element whose (it contains "DN_MajorVersion=") of it) , (following text of first "DN_MinorVersion=" of element whose (it contains "DN_MinorVersion=") of it) , (if ((following text of first "DN_MaintenanceVersion=" of element whose (it contains "DN_MaintenanceVersion=") of it) != "") then (following text of first "DN_MaintenanceVersion=" of element whose (it contains "DN_MaintenanceVersion=") of it) else "0") , (following text of first "DN_Agent=" of element whose (it contains "DN_Agent=") of it) , (maximum of (lasts 2 of substrings separated by "-" of ((if it != "" then it else "00") of concatenation "-" of (following texts of firsts "DN_PackageName=" of elements whose (it contains "FP_TWS") of it)) as integer))) of (set of items 1 of (item 0 of it, elements of item 1 of it) whose (item 1 of it contains ("/" & item 0 of it & "_DN"))) of (unique values of preceding texts of firsts "_DN" of following texts of firsts "/Tivoli/Workload_Scheduler/" of elements of it, it) of (set of lines of file "TWSRegistry.dat" of folder "/etc/TWS")) whose ((item 5 of it = "LWA") AND ((((item 2 of it as integer = 9 AND item 3 of it as integer = 3 AND item 4 of it as integer = 0 AND item 6 of it as integer > 2) OR (item 2 of it as integer = 9 AND item 3 of it as integer = 4 AND item 4 of it as integer = 0) OR (item 2 of it as integer = 9 AND item 3 of it as integer = 5 AND item 4 of it as integer = 0 AND item 6 of it as integer < 3)) AND (exists file ".zcentric" of folder (item 1 of it as string & "/_uninstall/ACTIONTOOLS"))))))}"

// Retrieve AgentType from relevance
parameter "AgentType" = "{(preceding text of first "-" of it | it) of concatenation "-" of items 5 of ((((following text of first "DN_UserOwner=" of element whose (it contains "DN_UserOwner=") of it) , (following text of first "DN_InstallationPath=" of element whose (it contains "DN_InstallationPath=") of it) , (following text of first "DN_MajorVersion=" of element whose (it contains "DN_MajorVersion=") of it) , (following text of first "DN_MinorVersion=" of element whose (it contains "DN_MinorVersion=") of it) , (if ((following text of first "DN_MaintenanceVersion=" of element whose (it contains "DN_MaintenanceVersion=") of it) != "") then (following text of first "DN_MaintenanceVersion=" of element whose (it contains "DN_MaintenanceVersion=") of it) else "0") , (following text of first "DN_Agent=" of element whose (it contains "DN_Agent=") of it) , (maximum of (lasts 2 of substrings separated by "-" of ((if it != "" then it else "00") of concatenation "-" of (following texts of firsts "DN_PackageName=" of elements whose (it contains "FP_TWS") of it)) as integer))) of (set of items 1 of (item 0 of it, elements of item 1 of it) whose (item 1 of it contains ("/" & item 0 of it & "_DN"))) of (unique values of preceding texts of firsts "_DN" of following texts of firsts "/Tivoli/Workload_Scheduler/" of elements of it, it) of (set of lines of file "TWSRegistry.dat" of folder "/etc/TWS")) whose ((item 5 of it = "LWA") AND ((((item 2 of it as integer = 9 AND item 3 of it as integer = 3 AND item 4 of it as integer = 0 AND item 6 of it as integer > 2) OR (item 2 of it as integer = 9 AND item 3 of it as integer = 4 AND item 4 of it as integer = 0) OR (item 2 of it as integer = 9 AND item 3 of it as integer = 5 AND item 4 of it as integer = 0 AND item 6 of it as integer < 3)) AND (exists file ".zcentric" of folder (item 1 of it as string & "/_uninstall/ACTIONTOOLS")))))) & "Z"}"

// Retrieve FixPack from relevance
parameter "SourceFixPack" = "{(preceding text of first "-" of it | it) of concatenation "-" of ((items 6 of ((((following text of first "DN_UserOwner=" of element whose (it contains "DN_UserOwner=") of it) , (following text of first "DN_InstallationPath=" of element whose (it contains "DN_InstallationPath=") of it) , (following text of first "DN_MajorVersion=" of element whose (it contains "DN_MajorVersion=") of it) , (following text of first "DN_MinorVersion=" of element whose (it contains "DN_MinorVersion=") of it) , (if ((following text of first "DN_MaintenanceVersion=" of element whose (it contains "DN_MaintenanceVersion=") of it) != "") then (following text of first "DN_MaintenanceVersion=" of element whose (it contains "DN_MaintenanceVersion=") of it) else "0") , (following text of first "DN_Agent=" of element whose (it contains "DN_Agent=") of it) , (maximum of (lasts 2 of substrings separated by "-" of ((if it != "" then it else "00") of concatenation "-" of (following texts of firsts "DN_PackageName=" of elements whose (it contains "FP_TWS") of it)) as integer))) of (set of items 1 of (item 0 of it, elements of item 1 of it) whose (item 1 of it contains ("/" & item 0 of it & "_DN"))) of (unique values of preceding texts of firsts "_DN" of following texts of firsts "/Tivoli/Workload_Scheduler/" of elements of it, it) of (set of lines of file "TWSRegistry.dat" of folder "/etc/TWS")) whose ((item 5 of it = "LWA") AND ((((item 2 of it as integer = 9 AND item 3 of it as integer = 3 AND item 4 of it as integer = 0 AND item 6 of it as integer > 2) OR (item 2 of it as integer = 9 AND item 3 of it as integer = 4 AND item 4 of it as integer = 0) OR (item 2 of it as integer = 9 AND item 3 of it as integer = 5 AND item 4 of it as integer = 0 AND item 6 of it as integer < 3)) AND (exists file ".zcentric" of folder (item 1 of it as string & "/_uninstall/ACTIONTOOLS"))))))) as string)}"

// Retrieve ProcessFile
parameter "ProcessFile" = "{"/tmp/TWA/tws1013/tws1013_process_" & parameter "UserOwner" & ".txt"}"

// Call twsCheckInstance.sh to check whether command line tools are still running
if {(parameter "AgentType" = "FTA") | false}
    wait sh "{parameter "ActionTools"}/twsCheckInstance.sh" "{parameter "UserOwner"}" "{parameter "SourceInstallationPath"}" "cmdLines" "{parameter "ProcessFile"}"

// Continue if the return code of the previous command was 0
    continue if {exit code of action = 0}
endif


// Create new filelistJobs_bck86
if {(((parameter "SourceMajorVersion" = "8") AND (((parameter "SourceMinorVersion" = "5") AND (parameter "SourceMaintenanceVersion" = "1")) OR ((parameter "SourceMinorVersion" = "6") AND (parameter "SourceMaintenanceVersion" = "0")))) OR (parameter "SourceMajorVersion" = "9")) | false}
    delete "{parameter "ActionTools"}/filelistJobs_bck86"

// Delete __createfile
    delete __createfile

// Create new filelistJobs_bck86
    createfile until EOF
jobmanrc
bin/taskLauncher
EOF

// Move filelistJobs_bck86 to ACTIONTOOLS
    move __createfile "{parameter "ActionTools"}/filelistJobs_bck86"
endif

// Delete __createfile
delete __createfile

// Create the lock file
if {(parameter "AgentType" = "FTA") | false}
    createfile until EOF
UserOwner={parameter "UserOwner"}
SourceInstallationPath={parameter "SourceInstallationPath"}
SourceVersion={parameter "SourceMajorVersion" & "." & parameter "SourceMinorVersion" & "." & parameter "SourceMaintenanceVersion" & "." & parameter "SourceFixPack" }
SourceMajorVersion={parameter "SourceMajorVersion"}
SourceMinorVersion={parameter "SourceMinorVersion"}
SourceMaintenanceVersion={parameter "SourceMaintenanceVersion"}
SourceFixPack={parameter "SourceFixPack"}
TargetVersion=10.1.0.3
TargetMajorVersion=10
TargetMinorVersion=1
TargetMaintenanceVersion=0
TargetFixPack=3
AgentType={parameter "AgentType"}
EOF
else
    createfile until EOF
UserOwner={parameter "UserOwner"}
SourceInstallationPath={parameter "SourceInstallationPath"}
SourceVersion={parameter "SourceMajorVersion" & "." & parameter "SourceMinorVersion" & "." & parameter "SourceMaintenanceVersion" & "." & parameter "SourceFixPack" }
SourceMajorVersion={parameter "SourceMajorVersion"}
SourceMinorVersion={parameter "SourceMinorVersion"}
SourceMaintenanceVersion={parameter "SourceMaintenanceVersion"}
SourceFixPack={parameter "SourceFixPack"}
TargetVersion=10.1.0.3
TargetMajorVersion=10
TargetMinorVersion=1
TargetMaintenanceVersion=0
TargetFixPack=3
AgentType={parameter "AgentType"}
EOF
endif

// Delete __TWSUpgrade.lck in BigFix subfolder
delete "{pathname of client folder of current site}/__TWSUpgrade.lck"

// Move __createfile to _TWSUpgrade.lck in BigFix subfolder
move __createfile "{pathname of client folder of current site}/__TWSUpgrade.lck"
Success Criteria

This action will be considered successful when all lines of the action script have completed successfully.


Sharing

Social Media:
Share this page on Yammer

Comments

Log In or Register to leave comments!