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

No such file or directory: '/var/lib/pulp/media' #84

Open
Svenum opened this issue Mar 13, 2024 · 9 comments
Open

No such file or directory: '/var/lib/pulp/media' #84

Svenum opened this issue Mar 13, 2024 · 9 comments

Comments

@Svenum
Copy link

Svenum commented Mar 13, 2024

Version
quay.io/ansible/galaxy-operator:2024.02.29

Describe the bug
Every Pod is up and running but the api Pod has this error:

pulp [8224b4f3c07c49fca48ed93072f5a8ef]: pulpcore.app.views.status:ERROR: Failed to determine disk usage
Traceback (most recent call last):
  File "/venv/lib64/python3.11/site-packages/pulpcore/app/views/status.py", line 23, in _disk_usage
    return shutil.disk_usage(default_storage.location)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/shutil.py", line 1344, in disk_usage
    st = os.statvfs(path)
         ^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/pulp/media'

To Reproduce
Create an galaxy instance with the operator.

Expected behavior
The API Pod should run and work.

Additional context
My config:

---
apiVersion: galaxy.ansible.com/v1beta1
kind: Galaxy
metadata:
  name: galaxy
  namespace: galaxy
spec:
  hostname: galaxy-kube.example.com
  ingress_type: ingress
  storage_type: File
  file_storage_access_mode: ReadWriteOnce
  file_storage_size: 8Gi
  no_log: false
  api:
    replicas: 2
  content:
    replicas: 2
  web:
    replicas: 2
  worker:
    replicas: 2
  postgres_configuration_secret: galaxy-postgres-configuration
@kurokobo
Copy link
Contributor

/var/lib/pulp/media is created in PV by init container for api pod:

Ensure your PVC galaxyt-file-storage (created by Operator) is writable by UID: 1000.

@Svenum
Copy link
Author

Svenum commented Mar 13, 2024

The pvc has the user 0:700. (root:gid700) but the directory tmp and artifact are created by the api pod.

@kurokobo
Copy link
Contributor

tmp and assets are backed by emptyDir:

- name: tmp-file-storage
emptyDir: {}
- name: assets-file-storage
emptyDir: {}

- name: tmp-file-storage
mountPath: "/var/lib/pulp/tmp"
- name: assets-file-storage
mountPath: "/var/lib/pulp/assets"

So only media is on your PVC and has to be able to be written by 1000.

@kurokobo
Copy link
Contributor

@rooftopcellist
F.Y.I., perhaps mkdir for /var/lib/pulp/tmp in init container is not required.

@kurokobo
Copy link
Contributor

@Svenum @rooftopcellist
Uh-oh sorry ignore my comment above 😞

@kurokobo
Copy link
Contributor

@Svenum
I can't dive deeper this right away, but anyway, I had the same problem in the past, and I fixed it by making PVC writable by UID: 1000. In Pulp Operator, I had a user with UID 700, but in Galaxy Operator, I have UID 1000.

@Svenum
Copy link
Author

Svenum commented Mar 13, 2024

Yes in the pod I have the user wirh the und 1000. But the problem is not solved if I make an chown on the folder. The pvc should have the right rights automatically

@Svenum
Copy link
Author

Svenum commented Mar 14, 2024

The problem is, that I try to automate the installation of the Operator with ansible, and I dont want to do extra steps for the galaxy-operator.

@grimlokason
Copy link

Same issue here with default install by the operator, i had to manually create the folder /var/lib/pulp/media.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants