# S390x Adding APT Sources - No usable temporary directory found - /tmp ENOSPC

**URL:** <https://travis-ci.community/t/s390x-adding-apt-sources-no-usable-temporary-directory-found-tmp-enospc/8635>\
**Category:** Multi CPU Architecture\
**Tags:** bug\
**Created:** [May 16, 2020, 3:16am UTC](https://travis-ci.community/t/s390x-adding-apt-sources-no-usable-temporary-directory-found-tmp-enospc/8635 "2020-05-16T03:16:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![grooverdan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/grooverdan/32/5129_2.png) [@grooverdan](https://travis-ci.community/u/grooverdan)\
**Post date:** [May 16, 2020, 3:16am UTC](https://travis-ci.community/t/s390x-adding-apt-sources-no-usable-temporary-directory-found-tmp-enospc/8635/1 "2020-05-16T03:16:03Z")

</div>

[https://travis-ci.org/github/google/snappy/jobs/687681456](https://travis-ci.org/github/google/snappy/jobs/687681456)  
[https://travis-ci.org/github/MariaDB/server/jobs/687470429](https://travis-ci.org/github/MariaDB/server/jobs/687470429)

```
touch: cannot touch '/tmp/apt-key-gpghome.awyHQGKW4U/pubring.gpg': No space left on device

0.17s0.01ssed: couldn't open temporary file /etc/apt/sources.list.d/sedN8LRop: No space left on device

0.04s0.00s0.01s0.00s0.00s/home/travis/.travis/job_stages: line 158: /tmp/hosts.tmp: No space left on device

0.00s0.00s0.05s/home/travis/.travis/job_stages: line 173: /tmp/hosts_127_0_0_1: No space left on device

/home/travis/.travis/job_stages: line 174: /tmp/hosts_sans_127_0_0_1: No space left on device

```

at adding a repository stage:

```
Traceback (most recent call last):

  File "/usr/bin/apt-add-repository", line 107, in <module>

    sp = SoftwareProperties(options=options)

  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 130, in __init__

    self.apt_key = AptAuth(rootdir=rootdir)

  File "/usr/lib/python3/dist-packages/softwareproperties/AptAuth.py", line 49, in __init__

    self.tmpdir = tempfile.mkdtemp()

  File "/usr/lib/python3.6/tempfile.py", line 499, in mkdtemp

    prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir)

  File "/usr/lib/python3.6/tempfile.py", line 269, in _sanitize_params

    dir = gettempdir()

  File "/usr/lib/python3.6/tempfile.py", line 437, in gettempdir

    tempdir = _get_default_tempdir()

  File "/usr/lib/python3.6/tempfile.py", line 372, in _get_default_tempdir

    dirlist)

FileNotFoundError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/home/travis/build']

The command "sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test"" failed and exited with 1 during .
```

---

<div class="post-metadata">

**Author:** ![fingolfin](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/fingolfin/32/2110_2.png) [@fingolfin](https://travis-ci.community/u/fingolfin)\
**Post date:** [May 16, 2020, 10:26pm UTC](https://travis-ci.community/t/s390x-adding-apt-sources-no-usable-temporary-directory-found-tmp-enospc/8635/2 "2020-05-16T22:26:41Z")

</div>

The “No space left on device” resp. “Disk quota exceeded” affects all the non-intel platforms (arm64, s390x, ppc64le), presumably because they share some common infrastructure code and hence also the bugs in that. Unfortunately, Travis CI staff has failed to respond to this or even just acknowledge this or a multitude of other problems on these three platforms. ☹  
Related posts on this topic:

- [https://travis-ci.community/t/5507](https://travis-ci.community/t/5507)
- [https://travis-ci.community/t/5954](https://travis-ci.community/t/5954)
- [https://travis-ci.community/t/7619](https://travis-ci.community/t/7619)
- [https://travis-ci.community/t/8006](https://travis-ci.community/t/8006)
- [https://travis-ci.community/t/8635](https://travis-ci.community/t/8635)

---

<div class="post-metadata">

**Author:** ![grooverdan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/grooverdan/32/5129_2.png) [@grooverdan](https://travis-ci.community/u/grooverdan)\
**Post date:** [May 17, 2020, 1:24am UTC](https://travis-ci.community/t/s390x-adding-apt-sources-no-usable-temporary-directory-found-tmp-enospc/8635/3 "2020-05-17T01:24:17Z")

</div>

yes, seen and hit those too. Saw, probably one of those, that arm64 got an increase. This is slightly odder as its the /tmp that’s full from the start rather than the main build space. Maybe its just the first thing that’s hit.

---

<div class="post-metadata">

**Author:** ![junaruga](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/junaruga/32/8943_2.png) [@junaruga](https://travis-ci.community/u/junaruga)\
**Post date:** [May 25, 2020, 11:47am UTC](https://travis-ci.community/t/s390x-adding-apt-sources-no-usable-temporary-directory-found-tmp-enospc/8635/4 "2020-05-25T11:47:27Z")

</div>

Ruby project is observing the following error on s390x job too.  
Do you think it comes from the same reason with others?

[https://travis-ci.org/github/ruby/ruby/jobs/682520961#L177](https://travis-ci.org/github/ruby/ruby/jobs/682520961#L177)

```auto
+ sudo -E apt-add-repository -y ppa:ubuntu-toolchain-r/test
Traceback (most recent call last):
...
FileNotFoundError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/home/travis/build/ruby/ruby']

```

[https://travis-ci.org/github/ruby/ruby/jobs/690823780#L103](https://travis-ci.org/github/ruby/ruby/jobs/690823780#L103)

```auto
/home/travis/.travis/job_stages: line 427: mtu.jsonpatch: No space left on device
/home/travis/.travis/job_stages: line 428: daemon.json: No space left on device
mv: cannot stat 'daemon.json': No such file or directory
resolvconf
tee: /etc/resolvconf/resolv.conf.d/tail: No space left on device

```

---

<div class="post-metadata">

**Author:** ![fingolfin](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/fingolfin/32/2110_2.png) [@fingolfin](https://travis-ci.community/u/fingolfin)\
**Post date:** [May 27, 2020, 9:33am UTC](https://travis-ci.community/t/s390x-adding-apt-sources-no-usable-temporary-directory-found-tmp-enospc/8635/5 "2020-05-27T09:33:52Z")

</div>

I think it is likely that this is the same issue, yes. They seem to have fixed (or at least improved) the issue for Arm64, but apparently the same fix was not applied to s390x.

Likewise, the bug where some Python directories were owned in root apparently was fixed for Arm64, but not for s390x.

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [October 24, 2020, 12:45am UTC](https://travis-ci.community/t/s390x-adding-apt-sources-no-usable-temporary-directory-found-tmp-enospc/8635/6 "2020-10-24T00:45:22Z")

</div>

> [@No space left on device for System Z](https://travis-ci.community/t/no-space-left-on-device-for-system-z/5954/20):
>
> [A check shows](https://travis-ci.com/github/native-api/test_travis/builds/190963069) that an s390x worker has 18G of space, [in accordance with documentation](https://docs.travis-ci.com/user/reference/overview/#virtualisation-environment-vs-operating-system).
