Skip to content

Conversation

@boddumanohar
Copy link
Collaborator

@boddumanohar boddumanohar commented Jul 23, 2025

All containers use root as their user, even unpriviledged ones, which is against Kubernetes best practices and doesn’t work on OpenShift

Current issues

2025-07-25 04:08:59,409: INFO:  uio_pci_generic module loaded successfully.
Traceback (most recent call last):
  File "/app/simplyblock_web/node_configure.py", line 64, in <module>
    status = generate_automated_deployment_config(
  File "/usr/local/lib/python3.9/site-packages/simplyblock_core/storage_node_ops.py", line 2575, in generate_automated_deployment_config
    nodes_config, system_info = utils.generate_configs(max_lvol, max_prov, sockets_to_use, nodes_per_socket,
  File "/usr/local/lib/python3.9/site-packages/simplyblock_core/utils/__init__.py", line 1430, in generate_configs
    nvmes = detect_nvmes(pci_allowed, pci_blocked)
  File "/usr/local/lib/python3.9/site-packages/simplyblock_core/utils/__init__.py", line 1211, in detect_nvmes
    pci_utils.ensure_driver(pci, 'nvme')
  File "/usr/local/lib/python3.9/site-packages/simplyblock_core/utils/pci.py", line 82, in ensure_driver
    (_device(address) / 'driver_override').write_text(driver_name if override else '\n')
  File "/usr/local/lib/python3.9/pathlib.py", line 1213, in write_text
    with self.open(mode='w', encoding=encoding, errors=errors) as f:
  File "/usr/local/lib/python3.9/pathlib.py", line 1180, in open
    return io.open(self, mode, buffering, encoding, errors, newline,
  File "/usr/local/lib/python3.9/pathlib.py", line 1038, in _opener
    return self._accessor.open(self, flags, mode)
PermissionError: [Errno 13] Permission denied: '/sys/bus/pci/devices/0000:00:02.0/driver_override'

RUN chown -R appuser:appgroup /app && \
python setup.py install

USER appuser
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it work in that order? I only ever had the USER before chown, but if it works, great :)

@boddumanohar boddumanohar marked this pull request as draft July 25, 2025 04:10
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

Successfully merging this pull request may close these issues.

3 participants