It's all about the answers!

Ask a question


Martina Riedel (20323341) | asked Dec 06 '13, 1:27 p.m.
retagged Dec 10 '13, 11:24 a.m. by David Lafreniere (4.8k7)
I am running scm -r nickname commands in our build and am getting the below error when more than one scm command is running.

Could not secure .jazz-scm:
Failed to set permissions on directory /home/myhome/.jazz-scm

I googled a bit and found references to SCM_ALLOW_INSECURE, but that is only documented for RTC 4.0.x
Does anybody know whether it also work for RTC

I also found references that suggested to remove .jazz-scm and have scm recreate it and I did that and have started a bunch of builds again.

Accepted answer

permanent link
Shashikant Padur (4.2k27) | answered Dec 08 '13, 10:24 p.m.
I believe that env var was introduced in 4.0. Does the scm tool have enough priviliges? or is your home directory on a NFS? You could also try pointing your configuration directory to some other location using the scm --config option or use the SCM_CONFIG_DIRECTORY
Martina Riedel selected this answer as the correct answer

Martina Riedel commented Dec 09 '13, 9:12 a.m.

It can do the lock when only one scm command is running. The issue is when 2 or more are running at the same time and only one of  them can get the lock.

Shashikant Padur commented Dec 09 '13, 10:16 p.m.

I remember that there was a race condition that could occur when running multiple commands from different consoles. I haven't seen any error related to that with respect to setting the permissions.

If the error is about locking a sandbox when two scm processes is accessing it then that is fine as we only allow one scm process to manage the sandbox.
Can you elaborate on your usecase? You could also try using 'lscm' instead of 'scm'.

Martina Riedel commented Dec 23 '13, 2:03 p.m.

this is nothing to do with a sandbox.
We are running the builds form Build Forge.
That means that all builds run from the same service account.
We use the -r nickname, so the pw doesn't get exposed.
The BF project is generic and used from literally thousands of build definitions.
Builds run in parallel, each has its own workspace, sandbox etc. They do commands like
scm list components, scm compare, scm list baselines, scm deliver
In fact scm list components is run as the very first command and the output is parsed to determine the stream name.
As probability will have it, if 2 or more builds are started in succession, the list components commands run at the same time and often 1 has that error.

I tried setting SCM_ALLOW_INSECURE=true and it looks like it works in as well, its just undocumented.
I'll set it in the BF env and watch whether the error goes away.

Martina Riedel commented Jan 02 '14, 10:55 a.m.

SCM_ALLOW_INSECURE=true has no effect in RTC
All our shares are NFS. Its a VM.
I have put in code that checks the error message for "Could not secure .jazz-scm" and retries in that case.

Shashikant Padur commented Jan 02 '14, 9:11 p.m.

I just found this article that mentions the issue with NFS... 

Your answer

Register or to post your answer.