Skip to content

2025.2.5.0-b35

@shashwat-yb shashwat-yb tagged this 01 Jul 18:26
Summary: Fixes a buggy SUDO_ACCESS check in the YNP provisioning script generator. populateSudoCheck was falling back to sudo -n pwd to detect sudo access, which incorrectly set SUDO_ACCESS="true" for non-sudo users in environments where sudo -n pwd happens to succeed. Now SUDO_ACCESS is only "true" when the user is actually root (id -u == 0). This ports the fix from D49398 to 2025.2, where it was missed during the golang YNP migration backport.

Test Plan:
Provision a universe node as a root/sudo user → verify SUDO_ACCESS="true" and root-only steps run.
Provision as a non-sudo user (--noroot) → verify SUDO_ACCESS="false" and the script no longer misdetects sudo access via sudo -n pwd.
Confirm generated provision script contains only the id -u == 0 check (no elif sudo -n pwd branch).

Reviewers: nsingh, ayush.kushwaha, amahajan

Reviewed By: nsingh

Subscribers: yugaware

Differential Revision: https://phorge.dev.yugabyte.com/D55118
Assets 2
Loading