Repository: conda/conda

Issue:
unexpected file locking warnings and errors - nuissance messages
I am getting errors and warnings related to locking when I activate an environment as a user. The only other activity that is going on is that the account used to manage the central install is running conda build to build a package - but it is doing so from an environment called 'manage' that is distinct from the environment the user account is trying to activate. 

I would call these nuisance messages since I am able to activate the environment. 

Here is conda info

```
(ana-1.0.0) psanaphi101: ~/mlearn $ conda info
Current conda install:

               platform : linux-64
          conda version : 4.2.5
       conda is private : False
      conda-env version : 2.6.0
    conda-build version : 1.19.2
         python version : 2.7.12.final.0
       requests version : 2.10.0
       root environment : /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7  (read only)
    default environment : /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7/envs/ana-1.0.0
       envs directories : /reg/neh/home/davidsch/.conda/envs
                          /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7/envs
          package cache : /reg/neh/home/davidsch/.conda/envs/.pkgs
                          /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7/pkgs
           channel URLs : file:///reg/g/psdm/sw/conda/channels/system-rhel7/linux-64/
                          file:///reg/g/psdm/sw/conda/channels/system-rhel7/noarch/
                          file:///reg/g/psdm/sw/conda/channels/external-rhel7/linux-64/
                          file:///reg/g/psdm/sw/conda/channels/external-rhel7/noarch/
                          https://repo.continuum.io/pkgs/free/linux-64/
                          https://repo.continuum.io/pkgs/free/noarch/
                          https://repo.continuum.io/pkgs/pro/linux-64/
                          https://repo.continuum.io/pkgs/pro/noarch/
                          file:///reg/g/psdm/sw/conda/channels/psana-rhel7/linux-64/
                          file:///reg/g/psdm/sw/conda/channels/psana-rhel7/noarch/
                          https://conda.anaconda.org/scikit-beam/linux-64/
                          https://conda.anaconda.org/scikit-beam/noarch/
                          file:///reg/g/psdm/sw/conda/channels/testing-rhel7/linux-64/
                          file:///reg/g/psdm/sw/conda/channels/testing-rhel7/noarch/
            config file : /reg/neh/home/davidsch/.condarc
           offline mode : False


```

and here is the output when activating the environment

```
psanaphi101: ~ $ source activate ana-1.0.0
-bash: /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7/bin/conda: /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7/bin/python: bad interpreter: No such file or directory
psanaphi101: ~ $ source activate ana-1.0.0
WARNING conda.common.disk:rm_rf(195): Failed to remove /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7/envs/ana-1.0.0/bin/conda.
ERROR conda.common.disk:rm_rf(215): rm_rf failed for /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7/envs/ana-1.0.0/bin/conda
WARNING conda.common.disk:rm_rf(195): Failed to remove /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7/envs/ana-1.0.0/bin/activate.
ERROR conda.common.disk:rm_rf(215): rm_rf failed for /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7/envs/ana-1.0.0/bin/activate
WARNING conda.common.disk:rm_rf(195): Failed to remove /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7/envs/ana-1.0.0/bin/deactivate.
ERROR conda.common.disk:rm_rf(215): rm_rf failed for /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7/envs/ana-1.0.0/bin/deactivate
```

unexpected file locking warnings and errors - nuissance messages
I am getting errors and warnings related to locking when I activate an environment as a user. The only other activity that is going on is that the account used to manage the central install is running conda build to build a package - but it is doing so from an environment called 'manage' that is distinct from the environment the user account is trying to activate. 

I would call these nuisance messages since I am able to activate the environment. 

Here is conda info

```
(ana-1.0.0) psanaphi101: ~/mlearn $ conda info
Current conda install:

               platform : linux-64
          conda version : 4.2.5
       conda is private : False
      conda-env version : 2.6.0
    conda-build version : 1.19.2
         python version : 2.7.12.final.0
       requests version : 2.10.0
       root environment : /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7  (read only)
    default environment : /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7/envs/ana-1.0.0
       envs directories : /reg/neh/home/davidsch/.conda/envs
                          /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7/envs
          package cache : /reg/neh/home/davidsch/.conda/envs/.pkgs
                          /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7/pkgs
           channel URLs : file:///reg/g/psdm/sw/conda/channels/system-rhel7/linux-64/
                          file:///reg/g/psdm/sw/conda/channels/system-rhel7/noarch/
                          file:///reg/g/psdm/sw/conda/channels/external-rhel7/linux-64/
                          file:///reg/g/psdm/sw/conda/channels/external-rhel7/noarch/
                          https://repo.continuum.io/pkgs/free/linux-64/
                          https://repo.continuum.io/pkgs/free/noarch/
                          https://repo.continuum.io/pkgs/pro/linux-64/
                          https://repo.continuum.io/pkgs/pro/noarch/
                          file:///reg/g/psdm/sw/conda/channels/psana-rhel7/linux-64/
                          file:///reg/g/psdm/sw/conda/channels/psana-rhel7/noarch/
                          https://conda.anaconda.org/scikit-beam/linux-64/
                          https://conda.anaconda.org/scikit-beam/noarch/
                          file:///reg/g/psdm/sw/conda/channels/testing-rhel7/linux-64/
                          file:///reg/g/psdm/sw/conda/channels/testing-rhel7/noarch/
            config file : /reg/neh/home/davidsch/.condarc
           offline mode : False


```

and here is the output when activating the environment

```
psanaphi101: ~ $ source activate ana-1.0.0
-bash: /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7/bin/conda: /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7/bin/python: bad interpreter: No such file or directory
psanaphi101: ~ $ source activate ana-1.0.0
WARNING conda.common.disk:rm_rf(195): Failed to remove /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7/envs/ana-1.0.0/bin/conda.
ERROR conda.common.disk:rm_rf(215): rm_rf failed for /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7/envs/ana-1.0.0/bin/conda
WARNING conda.common.disk:rm_rf(195): Failed to remove /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7/envs/ana-1.0.0/bin/activate.
ERROR conda.common.disk:rm_rf(215): rm_rf failed for /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7/envs/ana-1.0.0/bin/activate
WARNING conda.common.disk:rm_rf(195): Failed to remove /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7/envs/ana-1.0.0/bin/deactivate.
ERROR conda.common.disk:rm_rf(215): rm_rf failed for /reg/g/psdm/sw/conda/inst/miniconda2-dev-rhel7/envs/ana-1.0.0/bin/deactivate
```



Discussion:

Resolving patch:
diff --git a/conda/common/disk.py b/conda/common/disk.py
--- a/conda/common/disk.py
+++ b/conda/common/disk.py
@@ -192,7 +192,7 @@ def rm_rf(path, max_retries=5, trash=True):
                     move_result = move_path_to_trash(path)
                     if move_result:
                         return True
-                log.warn("Failed to remove %s.", path)
+                log.info("Failed to remove %s.", path)
 
         elif isdir(path):
             try:
@@ -212,7 +212,7 @@ def rm_rf(path, max_retries=5, trash=True):
         return True
     finally:
         if exists(path):
-            log.error("rm_rf failed for %s", path)
+            log.info("rm_rf failed for %s", path)
             return False
 
 


Test patch: