sassoftware / SAS-lsm

The SAS-lsm utility provides consistent management of single- or multi-tiered SAS-related services for UNIX/Linux deployments from a single shell script.
Apache License 2.0
8 stars 4 forks source link

Provide ability to disable "last version check" #1

Closed frayos closed 2 years ago

frayos commented 2 years ago

Hello, is it possible in the config to define a variable to avoid checking the "last version" ?

Indeed on some "black site" machines (no internet) this "check" crashes th sas_lsm script with :

./SAS_lsm: line 1252: syntax error near unexpected token `<'
./SAS_lsm: line 1252: ` done < <(ssh ${SSHOPTIONS} ${INST}@${HOST} find ${TIEX} -name "*_${UETYPE}_${ACTION}_*" -print0 | sort -z) ######NEED TO SEE IF SORT IS ON SOLARIS#####'

Thanks ! Younes

Greg-Arledge commented 2 years ago

Hi Younes,

What Linux distro is this? Are you using userexits? The section of code on line 1252 it is complaining about is in the userexit function. I'm not sure why the version check would cause an error there. The version check is designed to fail gracefully in the case of no internet access.

ajforeman commented 2 years ago

Hi Younes,

I concur with Greg and am unsure what that may have to do with the version check function. Please do let us know the distro and shell in use on the machine where you ran into that.

If you do want to test removing the version check for whatever reason, you can simply comment out the call to the check_version function inside the initialize function. Looks like in the current master branch that is line 639 of the main _SASlsm script.

frayos commented 2 years ago

Hello, thanks for the feedbacks ! I'm the proxy for a PSD colleague (hocine b.)

RHEL 7.9 sh points to /bin/bash

When he gave the http proxy variable, it just started working

I'll ask to confirm if commenting #639 gives same results ! and or provide bash -x output of the script.

To be noted, customer had DNS resolution so its not really "no internet acces"

frayos commented 2 years ago

let's close, the PSD person went on something else