-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setenv not working with < #1899
Comments
Can you please explain to us where this |
The The configuration I am trying to use is:
|
The setenv exists n the config file. You can do a setenv as explained in
the documentation:
https://xrootd.slac.stanford.edu/doc/dev55/Syntax_config.htm#_Toc520499869
…On Wed, 8 Feb 2023, Guilherme Amadio wrote:
Can you please explain to us where this `setenv` command is? If that's a `~/.tcshrc` or similar, I don't see how this could be a problem with XRootD.
--
Reply to this email directly or view it on GitHub:
#1899 (comment)
You are receiving this because you were assigned.
Message ID: ***@***.***>
|
Thank you both for the explanations. I will have a look tomorrow how to fix this one. |
Actually, I assigned myself to fix this as I wrote the code in the first
place. Let me if that is OK with you so that we both don't work on it.
Andy
…On Wed, 8 Feb 2023, Guilherme Amadio wrote:
Thank you both for the explanations. I will have a look tomorrow how to fix this one.
--
Reply to this email directly or view it on GitHub:
#1899 (comment)
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
########################################################################
Use REPLY-ALL to reply to list
To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1
|
Hi Andy, I can fix this one, leave it for me. It looks as if the code below is not going to override an environment variable if it's already set: https://github.com/xrootd/xrootd/blob/master/src/XrdOuc/XrdOucStream.cc#L1458-L1460 @IceyMu Can you please confirm that |
I've tried running my configs on a new virtual machine and this makes the config work with |
Actually, the "if" (if that is what you are talking about) is merely
saying if the envar is not set or if it is set but the new value differs
from the old value then it is set. The latter part of the clause (i.e. set
it only if it is a different) is needed to not loose memory as config
files can be reprocessed multiple times. So, I'd say something else is
going on. The amount of memory lost is small but it dirties up valgrind
output if not minimized.
…On Mon, 13 Feb 2023, Guilherme Amadio wrote:
Hi Andy, I can fix this one, leave it for me. It looks as if the code below is not going to override an environment variable if it's already set:
https://github.com/xrootd/xrootd/blob/master/src/XrdOuc/XrdOucStream.cc#L1458-L1460
@IceyMu Can you please confirm that `AWS_ACCESS_KEY_ID` is not set when you launch the server?
--
Reply to this email directly or view it on GitHub:
#1899 (comment)
You are receiving this because you were assigned.
Message ID: ***@***.***>
|
Then I would surmise that the problem was the virtual machine not the code
and this ticket can be closed, right?
…On Mon, 13 Feb 2023, IceyMu wrote:
I've tried running my configs on a new virtual machine and this makes the config work with `setenv` and `<` together.
--
Reply to this email directly or view it on GitHub:
#1899 (comment)
You are receiving this because you were assigned.
Message ID: ***@***.***>
|
Indeed, after I commented I went through the code a bit more carefully and saw that it it's working for both |
Hello,
When I try to read the value of a file into an environment variable using setenv and < I get back an empty environment variable e.g
setenv AWS_ACCESS_KEY_ID < /etc/xrootd/access_key
Doesn't change the environment variable AWS_ACCESS_KEY_ID.
I can however read from a file into a variable using set and then copy that variable to the environment variable e.g
set ACCESS_KEY < /etc/xrootd/access_key
setenv AWS_ACCESS_KEY_ID = $ACCESS_KEY
Makes the environment variable AWS_ACCESS_KEY_ID have the value of the contents of /etc/xrootd/access_key
setenv also works if I were to pass the value directly e.g
setenv AWS_ACCESS_KEY_ID = 1234
I am using xrootd 5.5.1 from the epel repository.
Thanks
The text was updated successfully, but these errors were encountered: