Uninstalling the Trino Protector
The single-node uninstallation script generated by the configurator script is used to uninstall the Trino Protector. Copy and execute the single-node uninstallation script to all the nodes in the Trino cluster.
Execute the following steps on every co-ordinator and worker node of the Trino Cluster.
Log in to the node, where you want to execute the uninstallation script.
Copy/Download the single-node uninstallation script previously generated by the configurator script to any directory.
Navigate to the directory where the single-node uninstallation script is located.
To view the syntax and the usage of the uninstallation script, run the following command.
./TrinoProtector_UninstallationScript_10.0.0+x.sh --helpPress ENTER.
The command displays the syntax with the mandatory and optional arguments. The mandatory and optional arguments are explained in the following tables.
Table 1. Mandatory Arguments for the Uninstallation ScriptArgument Description --uninstall-rpagent-and-logforwarder=<yes|no>Instructs the script whether to remove the RPAgent and the Log Forwarder from the current node in the Trino cluster. The acceptable values are: yes- remove the RPAgent and the Log Forwarder from the current node in the Trino cluster.no- skip removing the RPAgent and the Log Forwarder if they were already not installed by the corresponding Trino Protector installation script.
--trino-plugin-dir=</path/to/plugin/>Specifies the absolute path to the Trino plugin directory. Note
You can set a custom plugin path using theplugin.dirproperty in thenode.propertiesTrino configuration file. Ensure that the current sudoer user has permissions to read and write into this directory.--trino-service-user=<user>Specifies the name of the user running the Trino server. You can use this argument to set the ownership of the peptrinoplugin directory and also to restart the Trino server if you specify the--restart-trino-server-via=launcherargument.Note
- Ensure that the current
sudoeruser is able to run commands as the Trino service user using thesudo -ucommand. - Ensure that the Trino service user is able to read the
files from the
<installation_directory>path.
--delete-protegrity-user=<yes|no>Specifies whether to remove or retain the Protegrity service user and group, that were created during the installation process, from the current node in the Trino cluster. Set the value for this argument to nowhen you set the value for the--uninstall-rpagent-and-logforwarderargument tono. The accepted values are:yes- instructs the script to remove the Protegrity service user and group from the current node in the cluster.no- instructs the script to skip the removal of the Protegrity service user and the group.
Table 2. Optional Arguments for the Uninstallation Script
Argument Description –sudo-disabled- Use this flag if
sudoersis disabled on the cluster. - If you use this flag, the script will skip the use of the
sudocommand. The current user will be used to remove and stop the Protegrity services. Therefore, the user must have permissions to remove the Protegrity files under the<installation_directory>and the Trino plugin directory and to modify theconfig.propertiesfile. - The input values for the
–trino-service-userand the–protegrity-userarguments must be same as the current user. - You will be unable to use the
–restart-trino-server-viaargument - When you exclude this argument, a user with
sudoersprivilege is required to execute the script. It is recommended to use aNOPASSWDsudoers user. Else, the script will prompt for a password.
–protegrity-user=<user>If you specify this argument, then the script will set the Protegrity service user that was provided during installation to set the owner of the installed directories and files, and to start the Protegrity services. Ensure that the Protegrity service user has read permissions on the parent directories of the <installation_directory>.Note
- If you set the value of the
–uninstall-rpagent-and-logforwarderargument toyes, then the uninstallation script will use this user account to stop the RPAgent and the Log Forwarder services. - Ensure that the current user with sudoer privileges is
able to execute the commands as the Protegrity service user
(using the
sudo -ucommand) to stop the Protegrity services. - If you set the value of the
–sudo-disabledargument toyes, then the script will use this user account to stop the Protegrity services.
If you fail to specify this argument, then the installation script will set the current user as the Protegrity service user.–protegrity-group=<group>If you specify this argument, then the script will set the Protegrity service group that was given during installation to set the group of the installed directories and files, and to start the Protegrity services. If you fail to specify this argument, then the installation script will set the current user’s primary group as the Protegrity service group.–restart-trino-server-via=<systemd|init|launcher>If you specify this argument, then the script will restart the running Trino server after removing the peptrinoplugin. The script will not restart the Trino server if the server is in the stopped state. If you want to use this argument, ensure that you enablesudoto restart the Trino server. The acceptable values are:systemd- instructs the script to use thesystemctlcommand to check the status and restart the Trino server. This argument requires the–trino-systemd-service-nameargument to be specified.init- instructs the script to use theservicecommand to check the status and restart the Trino server. This argument also requires you to specify the–trino-init-service-nameargument.launcher- instructs the script to use the Trino launcher script to check the status and restart Trino server. This argument requires the–trino-launcher-pathand the optional–trino-launcher-argsarguments.
–trino-systemd-service-name=<service name>Specifies the name of the systemdservice associated with the Trino server. You must specify this argument when you use the–restart-trino-server-via=systemdargument.–trino-init-service-name=<init service name>Specifies the name of the Sys V init service associated with the Trino server. You must pass this argument when you specify the –restart-trino-server-via=initargument.–trino-launcher-path=</path/to/bin/launcher>Specifies the absolute path to the Trino server launcher script. For example, /usr/lib/trino/bin/launcher. You must specify this argument when you use the–restart-trino-server-via=launcherargument.–trino-launcher-args=“arg1 [arg2…]"Specifies the valid command line arguments to the Trino launcher script. You can use this argument with the –trino-launcher-pathargument. If you specify this argument, then the arguments listed between the double-quotes will be passed to the Trino launcher script for thestatusand therestartcommands. If you fail to specify this argument, then no argument will be passed to the Trino launcher script for thestatusand therestartcommands.Depending on the requirements, run the uninstallation script with the required arguments.
For example, on a Starburst Trino cluster installed via RPM, one combination of the arguments to the single-node uninstallation script is listed below.
./TrinoProtector_UninstallationScript_10.0.0+x.sh \ > --uninstall-rpagent-and-logforwarder=yes \ > --trino-plugin-dir=/usr/lib/starburst/plugin \ > --trino-service-user=starburst \ > --protegrity-user=ptyitusr \ > --protegrity-group=ptyitusr \ > --delete-protegrity-user=yesNote: If you want the Trino Server to automatically restart after removing the components, then specify the value for the
--restart-trino-server-viaargument for the uninstallation script. Otherwise, you will have to manually restart the Trino Server after the uninstallation is complete.Press ENTER. The script removes the components as specified in the arguments.
./TrinoProtector_UninstallationScript_10.0.0+6.sh \ > --uninstall-rpagent-and-logforwarder=yes \ > --trino-plugin-dir=/usr/lib/starburst/plugin \ > --trino-service-user=starburst \ > --protegrity-user=ptyitusr \ > --protegrity-group=ptyitusr \ > --delete-protegrity-user=yes Protegrity Trino Protector Uninstallation Script started... Validating sudo permissions for root ************************************************************************************ Welcome to the Trino Protector Uninstall Wizard. ************************************************************************************ This will uninstall the Trino Protector from your system. Stopping RPAgent on current node... Stopping Logforwarder on current node... RPAgent uninstallation started ************************************************************************************ Welcome to the RPAgent Setup Wizard. ************************************************************************************ Uninstalled RPAgent on current node... Logforwarder uninstallation started ************************************************************************************ Welcome to the LogForwarder Setup Wizard. ************************************************************************************ Uninstalling LogForwarder .... LogForwarder uninstalled on current node at location /opt/protegrity/logforwarder/ PepTrino Plugin Jars uninstallation started ************************************************************************************ Welcome to the PepTrino Setup Wizard. ************************************************************************************ Uninstalling PepTrino .... PepTrino uninstalled on current node at location /opt/protegrity/peptrino/ JcoreLite uninstallation started ************************************************************************************ Welcome to the JcoreLite Setup Wizard. ************************************************************************************ Uninstalling JcoreLite .... JcoreLite for Trino Protector uninstalled on current node at location /opt/protegrity/peptrino/lib/ Setting ownership of /opt/protegrity/logs and /opt/protegrity/peptrino recursively to root:root. Setting ownership of /opt/protegrity to root:root. Removing Protegrity service user 'ptyitusr' and group 'ptyitusr' from current node. User 'ptyitusr' deleted Group 'ptyitusr' deleted Trino Protector plugin jars and JcoreLite libraries uninstalled from /opt/protegrity/peptrino/ directory Finished executing TrinoProtectorUninstall468_Linux-ALL_10.0.0+x.sh script. Check the logs at /opt/protegrity/logs/ Started uninstallation of PepTrino from plugin dir in foreground... Checking if Trino Plugin Dir is present on node. Trino Plugin Directory /usr/lib/starburst/plugin found. Removing peptrino plugin directory from /usr/lib/starburst/plugin Trino Protector Plugin successfully removed from /usr/lib/starburst/plugin Checking if Trino service user exists. Checking if systemctl is on PATH. systemctl found on PATH. Checking if 'starburst' is a valid systemd unit. 'starburst' is a valid systemd unit. Checking if Trino Server is started and running via systemctl Trino server is running Restarting Trino Server... Trino Server successfully restarted via systemctl. Trino Protector UDFs were unregistered on Trino Server restart. Verify via trino CLI (show functions;) or by checking Trino's server.log Successfully completed all steps of Uninstallation Script
Feedback
Was this page helpful?