microsoft / azure-pipelines-agent

Azure Pipelines Agent 🚀

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG]: Installing DevOpsAgent on SLES 15 fails

SebastianRoether opened this issue · comments

What happened?

Installation fails because installdependencies.sh tries to install openssl 1.0.0 which is not supported for SLES 15. Most likely because the code here

# we might on OpenSUSE
OSTYPE=$(grep ^ID_LIKE $filepath | cut -f2 -d=)
if [ -z $OSTYPE ]
then
    OSTYPE=$(grep ^ID $filepath | cut -f2 -d=)
fi
echo $OSTYPE

# is_sles=1 if it is a SLES OS
[ -n $OSTYPE ] && ([ $OSTYPE == '"sles"' ] || [ $OSTYPE == '"sles_sap"' ]) && is_sles=1

was written for SLES 12, but SLES 15 apparently added ID_LIKE (12.3 vs 15.0), so for SLES 15, this never sets is_sles=1

And then this does not work for SLES 15

if [[ -n $is_sles ]]
then
    zypper -n install lttng-ust libopenssl1_1 krb5 zlib libicu
else
    zypper -n install lttng-ust libopenssl1_0_0 krb5 zlib libicu
fi

Versions

SLES15 SP5, Agent Version 3.236.1

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

SLES15 SP5

Version controll system

No response

Relevant log output

2024-03-11 15:40:35 Zipfile is /agent/vsts-agent-linux-x64-**3.236.1**.tar.gz<br>
2024-03-11 15:40:39 Installing dependencies ++ id -u + user_id=0 + '[' 0 -ne 0 ']' + '[' -e /etc/os-release ']' + filepath=/etc/os-release + '[' -e /etc/os-release ']' + echo '--------OS Information--------' + cat /etc/os-release + echo ------------------------------ + '[' -e /etc/debian_version ']' + '[' -e /etc/alpine-release ']' + '[' -e /etc/redhat-release ']' ++ grep '^ID_LIKE' /etc/os-release ++ cut -f2 -d= + OSTYPE='"suse"' + '[' -z '"suse"' ']' + echo '"suse"' + '[' -n '"suse"' ']' + '[' '"suse"' == '"sles"' ']' + '[' '"suse"' == '"sles_sap"' ']' + [[ -n "suse" ]] + [[ "suse" == \"\s\u\s\e\" ]] + echo '**The current OS is SUSE based**' + command -v zypper + '[' 0 -eq 0 ']' + [[ -n '' ]] + zypper -n install lttng-ust **libopenssl1_0_0** krb5 zlib libicu System management is locked by the application with pid 2352 (zypper). Close this application before trying again. + '[' 7 -ne 0 ']' + echo ''\''zypper'\'' failed with exit code '\''0'\''' + print_errormessage + echo 'Can'\''t install dotnet core dependencies.' + print_repositories_and_deps_warning + echo 'Please make sure that required repositories are connected for relevant package installer.' + echo 'For issues with dependencies installation (like '\''dependency was not found in repository'\'' or '\''problem retrieving the repository index file'\'') - you can reach out to distribution owner for futher support.' + echo 'You can manually install all required dependencies based on following documentation' + echo https://docs.microsoft.com/dotnet/core/install/linux + exit 1
2024-03-11 15:40:39 Dependencies installation failed 2024-03-11 15:40:39 Configuring build agent

Hi @SebastianRoether, thank you for the feedback and for the investigation, we'll take a look!

Hi @SebastianRoether, the fix was applied in v3.238.0.
I'm closing the issue, please feel free to reopen it in case of errors!