Skip to content
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

Support request for Docker installed with faasd (invalid) #331

Closed
ikhyunAn opened this issue Jun 15, 2023 · 5 comments
Closed

Support request for Docker installed with faasd (invalid) #331

ikhyunAn opened this issue Jun 15, 2023 · 5 comments
Labels
invalid This doesn't seem right question Further information is requested support

Comments

@ikhyunAn
Copy link

Why do you need this?

I cannot deploy functions anymore due to disk space running out, which I assume occurs from "snapshots" taking up space

Who is this for?

School research

Expected Behaviour

Although I have deleted all faasd functions and docker images, my function wouldn't deploy due to disk space running out. I tried to run these commands

sudo ctr --namespace openfaas-fn task delete -f $FN
sudo ctr --namespace openfaas-fn container delete $FN
sudo ctr --namespace openfaas-fn snapshot remove $FN-snapshot

but instead of successfully removing them, I got error messages such as
ERRO[0000] failed to load task from [function_name]

Current Behaviour

Whenever I deploy a function, I get the error message saying:

#22 33.66 ERROR: Could not install packages due to an OSError: [Errno 28] No space left on device
#22 33.66
------
Dockerfile:39
--------------------
  37 |     COPY function/requirements.txt	.
  38 |
  39 | >>> RUN pip install -r requirements.txt --target=/home/app/python
  40 |
  41 |     WORKDIR /home/app/
--------------------
ERROR: failed to solve: process "/bin/sh -c pip install -r requirements.txt --target=/home/app/python" did not complete successfully: exit code: 1

List All Possible Solutions and Workarounds

If there's way of removing unused snapshots / docker images / caches that would be great.
If not, I suggest that when 'faas-cli remove [function_name]' is run all the snapshots etc. are removed as well.

Which Solution Do You Recommend?

Steps to Reproduce (for bugs)

Your Environment

  • OS and architecture:

  • Versions:

go version

containerd -version

containerd github.com/containerd/containerd v1.7.0 1fbd70374134b891f97ce19c70b6e50c7b9f4e0d

uname -a

Linux ubuntu 5.15.0-73-generic #80-Ubuntu SMP Mon May 15 15:18:26 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/os-release

PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

faasd version

faasd version: 0.16.9	commit: e1d90bba609a55ca123d26e5b7e1ccfcfedf3e8f
@alexellis
Copy link
Member

Hey it looks like you may have mistakenly installed Docker on faasd VM? The output that you're sharing isn't from faasd but from Docker run.

Can you explain please?

And share df -h / along with lsblk

@alexellis
Copy link
Member

/set title: Support request

@derek derek bot changed the title OSError: [Errno 28] No space left on device Support request Jun 16, 2023
@ikhyunAn
Copy link
Author

The VM I'm using is a collaborative workspace, and the docker is installed on the VM on which faasd is also installed. I have the minio set up on the vm, the reason why docker is installed on the vm.
I do see that it's recommended not to install the docker into the same host as faasd, but does the error message I'm seeing come from this problem?

I have uninstalled/deleted other packages and system files to free space, so the values on df -h are now lower than what they were. Before the /dev/vda usage was close to 100%.

df -h
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           392M  976K  391M   1% /run
/dev/vda1        22G   14G  7.3G  66% /
tmpfs           2.0G  168K  2.0G   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
/dev/vda15      105M  6.1M   99M   6% /boot/efi
tmpfs           392M   12K  392M   1% /run/user/1000
NAME    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0     7:0    0 116.8M  1 loop /snap/core/14946
loop1     7:1    0  63.3M  1 loop /snap/core20/1879
loop2     7:2    0  63.5M  1 loop /snap/core20/1891
loop3     7:3    0 111.9M  1 loop /snap/lxd/24322
loop4     7:4    0  53.2M  1 loop /snap/snapd/19122
loop5     7:5    0  53.3M  1 loop /snap/snapd/19361
loop6     7:6    0   4.2M  1 loop /snap/tree/18
sr0      11:0    1   366K  0 rom
vda     252:0    0    22G  0 disk
├─vda1  252:1    0  21.9G  0 part /
├─vda14 252:14   0     4M  0 part
└─vda15 252:15   0   106M  0 part /boot/efi

@nitishkumar71
Copy link
Member

faasd internal implementation already does the cleanup for task, snapshot and container, as implemented here.

@alexellis
Copy link
Member

You cannot have docker installed on the same host as faasd, this is probably why you're running into problems.

BuildKit can be installed and used, with faas-cli shrinkwrap followed by docker build.

See also: https://docs.openfaas.com/cli/build/

@alexellis alexellis changed the title Support request Support request for Docker installed with faasd (invalid) Sep 13, 2023
@alexellis alexellis added invalid This doesn't seem right question Further information is requested support labels Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right question Further information is requested support
Projects
None yet
Development

No branches or pull requests

3 participants