Skip to content

Support additional LXC mount-point options (ro, mountoptions, acl, quota) and bind mounts #137

Description

@jakduch

Summary

Two gaps in LXC mount-point handling in fog-proxmox:

  1. Mount options dropped on read. Fog::Proxmox::Compute::Disk (lib/fog/proxmox/compute/models/disk.rb) declares only a subset of mount options, and ServerConfig#initialize_disks extracts declared attributes only. So ro, mountoptions, acl, quota are parsed away when reading a container config — they can be written via pass-through but do not round-trip on edit. (replicate/shared are declared and do round-trip.)
  2. Bind mounts not representable. DiskHelper.extract_storage_volid_size (lib/fog/proxmox/helpers/disk_helper.rb) assumes a storage:size / volid volume; a host-path bind mount (mp0: /host/dir,mp=/ct/dir,size=0) starts with / and the regex can't parse it, so bind mounts can't be modelled.

Proposed change

  • Add ro, mountoptions, acl, quota as attributes on Disk.
  • Support a bind-mount / host-directory volume (leading /, size=0) in DiskHelper.

Context

Needed by foreman_fog_proxmox to expose complete LXC mount-point options and bind mounts.

Drafted with the assistance of Claude (Cowork); reviewed by me before submitting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions