Uploaded image for project: 'Image Builder'
  1. Image Builder
  2. COMPOSER-2030

Support arbitrary custom mountpoints

XMLWordPrintable

    • Support arbitrary custom mountpoints
    • 13
    • False
    • None
    • False
    • Testable
    • To Do
    • RHELBU-2358 - Image Builder support for custom filesystem mount points
    • 0% To Do, 0% In Progress, 100% Done

       
      Currently, Image Builder allows to add extra mountpoints only to a pre-defined set of locations. However, customers demand more location. Let's make them happy.
       

      Goal:

      • Allow users to specify arbitrary extra mountpoints.
      • Implement a denylist for mountpoints that simply cannot be backed by a physical partition:

      Acceptance Criteria:

      • Image Builder has loosened rules for custom mountpoints.
      • This is available both in the hosted service and on-prem (including UIs).

      Open questions:

      • systemd changes its support for separate /usr. We need to check how it affects IB. See https://github.com/systemd/systemd/blob/82b7bf8c1c8c6ded6f56b43998c803843a3b944b/NEWS#L7
        •  [thozza] This does not have effect on IB, since our policy does not support custom mountpoints under /usr and we also do not support custom mountpoints for paths which are merged into /usr. Having /usr on a separate partition is supported, since systemd fstab generator handles it in initram and mounts it before switching the root.

      Final mountpoints policy

      As defined in https://github.com/osbuild/images/blob/main/internal/pathpolicy/policies.go

       

      Mountpoint path Policy
      /
      • Customizing the root mountpoint is allowed.
      • Any paths under the root which are not explicitly prohibited are allowed.
      /usr
      • Custom mountpoit with this path is allowed
      • NO mountpoints with this path prefix (a.k.a sub directories) are allowed.
      /etc
      • NOT allowed (must be on the root partition)
      /sys
      • NOT allowed (API FS)
      /proc
      • NOT allowed (API FS)
      /dev
      • NOT allowed (API FS)
      /run
      • NOT allowed (API FS)
      /bin
      • NOT allowed (merged to /usr)
      /sbin
      • NOT allowed (merged to /usr)
      /lib
      • NOT allowed (merged to /usr)
      /lib64
      • NOT allowed (merged to /usr)
      /lost+found
      • NOT allowed (used by ext filesystems)
      /boot/efi
      • NOT allowed (used by EFI)
      /sysroot
      • NOT allowed (used by systemd / ostree)
      /var/run
      • NOT allowed (symlink to ../run which is on tmpfs)
      /var/lock
      • NOT allowed (symlink to ../run/lock which is on tmpfs)

       

            thozza@redhat.com Tomas Hozza
            obudai@redhat.com Ondrej Budai
            Tomas Hozza
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: