Data Repository error running admintools command with list_allnodes option
search cancel

Data Repository error running admintools command with list_allnodes option

book

Article ID: 224698

calendar_today

Updated On:

Products

CA Performance Management - Usage and Administration DX NetOps

Issue/Introduction

The database runs fine. We're able to stop and start it without issue.

Preparing to upgrade the database we're running the stated admintools command with the list_allnodes argument but it returns an error.

[dradmin@drNode bin]$ ./admintools -t list_allnodes
dirname: missing operand
Try 'dirname --help' for more information.
Traceback (most recent call last):
File "/opt/vertica/bin/TXT1check.py", line 6, in <module>
from vertica.config import DBinclude
ImportError: No module named vertica.config

Environment

All supported DX NetOps Performance Management releases r21.2.2 and earlier.

Cause

The error is due to an issue with the readlink command utilized by the command. The readlink command is installed on most common Linux system via the coreutils package that includes common commands such as chmod, chown, etc.

The readlink command is failing to work properly, causing a failure of the command due to failure to read and validate a license file named lchk.sh.

Resolution

There are a few methods available to resolve this problem.

  1. Upgrade to release r21.2.3 or newer. This brings an upgrade to the Vertica 10.1.1 which no longer uses the lchk.sh file.
  2. Edit the (default path) more /opt/vertica/bin/lchk.sh file. Make it match the following (default paths shown).
    1. #!/bin/bash --norc
      #echo $1 $2
      export PYTHONPATH="$3"
      SCRIPT_FULL_PATH=/opt/vertica/bin/lchk.sh
      SCRIPT_DIR='dirname ${SCRIPT_FULL_PATH}'
      PYTHON_DIR='/opt/vertica/bin/../oss/python'
      ${PYTHON_DIR}/bin/python $2/TXTlcheck.py $1 $2
    2. If it does not work, uncomment the echo line to print what it's doing to the screen.
  3. Determine the cause for the issue with readlink problem and resolve it at the system level.