-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PLAT-13080] Do not use sudo command if the user is already root in n…
…ode-agent installer Summary: Some customers do not have sudo but can run as root using other commands. This change detects it. Test Plan: Installed node-agent using this (cloud) For on-prem manual. ``` [ec2-user@ip-10-9-103-155 ~]$ sudo mv /usr/bin/sudo /usr/bin/sido [ec2-user@ip-10-9-103-155 ~]$ sudo -bash: /usr/bin/sudo: No such file or directory [ec2-user@ip-10-9-103-155 ~]$ sido su - Last login: Tue Mar 12 03:01:29 UTC 2024 on pts/0 [root@ip-10-9-103-155 ~]# cd /home/yugabyte/ [root@ip-10-9-103-155 yugabyte]# ls installer.sh node-agent [root@ip-10-9-103-155 yugabyte]# ./installer.sh -c install_service --user yugabyte Using node agent port 9070. * Starting YB Node Agent install_service. * Installing Node Agent Systemd Service [Unit] Description=YB Anywhere Node Agent After=network-online.target [Service] User=yugabyte WorkingDirectory=/home/yugabyte/node-agent LimitCORE=infinity LimitNOFILE=1048576 LimitNPROC=12000 ExecStart=/home/yugabyte/node-agent/pkg/bin/node-agent server start Restart=always RestartSec=2 [Install] WantedBy=multi-user.target * Starting the systemd service * Started the systemd service * Run 'systemctl status yb-node-agent' to check the status of the yb-node-agent * Run 'sudo systemctl stop yb-node-agent' to stop the yb-node-agent service ``` Also validated state transition via upgrade and new install. Reviewers: cwang, nbhatia, amalyshev Reviewed By: nbhatia Subscribers: yugaware Differential Revision: https://phorge.dev.yugabyte.com/D33049
- Loading branch information
Showing
2 changed files
with
42 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters