Conversation
|
If I remember correct the reason was that when |
|
PS. May be behavior was changed since that time and now it works fine from any user, need to check, and if answer is yes, remove user check. |
ch-tools/ch_tools/monrun_checks/main.py Lines 165 to 173 in 66778cc We shouldn't see Wrong current user: root at all.
Moreover in the case I have fixed we see |
The behaviour hasn't been changed. If we eliminate the code for user checking it still raises an exception after starting under root previosly. |
After running highstate on CH host via
pssh-shstate running/usr/local/yandex/ch_wait_started.pyhangs up to timeout.Because such a command does not work
Or without
salt-callThe point is that
getpass.getuser()function relies on environment variables (LOGNAME,USER, etc) but nested sudo does not update it:I propose to extract name for effective uid and not to rely on environment variables.
After fix: