Skip to content

[BUG]: enableagent.sh incorrect installation process - Re-Open Task - $PATH does not contain paths defined on /etc/environment #5362

@HoLengZai

Description

@HoLengZai

What happened?

Hi,
I do believe that all closed issues are ignored. So I would like to request to re-open the following issue:
$PATH does not contain paths defined on /etc/environment 3461
as it's not fixed and we have already provided all the analyses, workarounds

It's been since 2021 and this issue is still not fixed.
You don't need to change the source code of the agent, you just need to change the content of the following script (which is for unknown reason, not in this git repo) for the unattended installation of the Pipeline Agent used by VMSS extension
https://vstsagenttools.blob.core.windows.net/tools/ElasticPools/Linux/<script_version>/enableagent.sh
Example: https://vstsagenttools.blob.core.windows.net/tools/ElasticPools/Linux/17/enableagent.sh
Official MS docs which referring to this script: https://learn.microsoft.com/en-gb/azure/devops/pipelines/agents/scale-set-agents?view=azure-devops#lifecycle-of-a-scale-set-agent

It is very simple to reproduce this issue:
Build the official image provided by Microsoft: https://github.com/actions/runner-images
You even don't need to customize or add any tools as the enableagent.sh will break the PATH by using the secure_path value.
Create a VMSS on Azure and install the Pipeline agent using Azure DevOps portal.
Run a pipeline using this agent pool to display the env vars and you will see thatthe PATH is totally incorrect and doesn't respect the content of /etc/environment file or the .path file

Thanks for your consideration.

Previous participants:
@AlexrDev (Alexander Rietdijk)
@ChristopheLav (Christophe Lavalle)
@DARB-CCM-S-20 (BradleyMcC)
@HoLengZai
@Jean-FrancoisBeaudet (Jeff Beaudet)
@RelicCornhusk (Vitor)
@RobinDink (Robin D)
@catthehacker (Ryan)
@cavemandaveman
@chrisdecker1201 (Christian Decker)
@danielitit
@jappenzesr
@kuleshovilya
@marcuslopes (Marcus Lopes)
@mortenlerudjordet (Morten Lerudjordet)
@mzarglis
@ohlrogge (Niklas Ohlrogge)
@patrickmoore-nc
@pbcahill (Patrick Cahill)
@teck-kcheema
@tonyskidmore (Tony Skidmore)
@vladislav-ryzhov (Vladislav Ryzhov)

Versions

All versions, since this repo exist, there is this issue for unattended

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

All Ubuntu versions

Version controll system

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions