Sudo not allowing IATEMPDIR for NetOps Performance Management installs
search cancel

Sudo not allowing IATEMPDIR for NetOps Performance Management installs

book

Article ID: 236647

calendar_today

Updated On:

Products

CA Performance Management - Usage and Administration DX NetOps

Issue/Introduction

When upgrading in Performance Management, I am getting this error:

sudo ./CAPerfCenterSetup.bin -i console
Preparing to install
WARNING: /tmp does not have enough disk space! Attempting to use /root for install base and tmp dir.

I set IATEMPDIR to use a /tmp alternative with the required 4 GB free space but when I tried to run it via sudo it failed.

sudo IATEMPDIR=/opt/PortalTemp ./CAPerfCenterSetup.bin -i console
sudo: sorry, you are not allowed to set the following environment variables: IATEMPDIR

What do I need to set in the sudoers file to allow me to use the IATEMPDIR variable?

Installing DX NetOps Performance Management Portal web UI server as sudo user returns error when using IATEMPDIR.

Installing DX NetOps Performance Management Data Aggregator server as sudo user returns error when using IATEMPDIR. The server has noexec set on /tmp causing an inability to install the DA software without using IATEMPDIR.

When trying to install the DA we see the following error.

[<installUser>@xxx netops]$ date; sudo IATEMPDIR=/opt/tmp ./installDA.bin -i console; date
Mon Mar  6 14:56:56 EST 2023
sudo: sorry, you are not allowed to set the following environment variables: IATEMPDIR
Mon Mar  6 14:56:56 EST 2023

Using the EXPORT option for setting IATEMPDIR:

[<installUser>@xxx  netops]$ export IATEMPDIR=/opt/tmp
[<installUser>@xxx netops]$ date; sudo -E ./installDA.bin -i console; date
Mon Mar  6 14:57:36 EST 2023
sudo: sorry, you are not allowed to preserve the environment
Mon Mar  6 14:57:36 EST 2023

Environment

All supported DX NetOps Performance Management releases

Cause

The sudoers file isn't configured to allow use of alternative variable values.

Resolution

Add an env_keep entry to the systems sudoers file allowing use of the IATEMPDIR for /tmp redirection.

This is similar to how we have users preserve env vars for sudo on the DR side. Seen in the "(Optional) Configure the Passwordless Sudo User Account for the Data Repository" section. This part is what is being pointed out:

  • Defaults env_keep +="VERT_DBA_USR VERT_DBA_HOME VERT_DBA_GRP VERT_DBA_DATA_DIR _ENV_VPWD_VAR"

Add a similar entry to the sudoers configuration on the DA host to allow use of IATEMPDIR. It would look something like this:

  • Defaults env_keep +="IATEMPDIR"