summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorvsoch <vsoch@users.noreply.github.com>2021-04-14 21:23:10 -0600
committerTodd Gamblin <tgamblin@llnl.gov>2021-04-15 00:01:41 -0700
commit613348ec90e41e3e403fe4566bf1b3cc9c364a52 (patch)
tree30ffe820eb4cafb8ffb3cf4495013cb4930d2235 /share
parent393542064d07a00c57d0a0da0f3d054f53ec3220 (diff)
downloadspack-613348ec90e41e3e403fe4566bf1b3cc9c364a52.tar.gz
spack-613348ec90e41e3e403fe4566bf1b3cc9c364a52.tar.bz2
spack-613348ec90e41e3e403fe4566bf1b3cc9c364a52.tar.xz
spack-613348ec90e41e3e403fe4566bf1b3cc9c364a52.zip
Use `gethostname()` instead of `getfqdn()` for lock debug mode
In debug mode, processes taking an exclusive lock write out their node name to the lock file. We were using `getfqdn()` for this, but it seems to produce inconsistent results when used from within some github actions containers. We get this error because getfqdn() seems to return a short name in one place and a fully qualified name in another: ``` File "/home/runner/work/spack/spack/lib/spack/spack/test/llnl/util/lock.py", line 1211, in p1 assert lock.host == self.host AssertionError: assert 'fv-az290-764....cloudapp.net' == 'fv-az290-764' - fv-az290-764.internal.cloudapp.net + fv-az290-764 !!!!!!!!!!!!!!!!!!!! Interrupted: stopping after 1 failures !!!!!!!!!!!!!!!!!!!! == 1 failed, 2547 passed, 7 skipped, 22 xfailed, 2 xpassed in 1238.67 seconds == ``` This seems to stem from https://bugs.python.org/issue5004. We don't really need to get a fully qualified hostname for debugging, so use `gethostname()` because its results are more consistent. This seems to fix the issue. Signed-off-by: vsoch <vsoch@users.noreply.github.com>
Diffstat (limited to 'share')
0 files changed, 0 insertions, 0 deletions