Skip to content

[Bug]: Not translating block/volume Filesystem cache and sync modes to runtimeOptions. #876

@jglogan

Description

@jglogan

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

Our plumbing for these VZ device attachments options is broken, which means that we're using the default values.

For container we want to default to the safest sync option and allow the user to opt into higher performance but less safe options.

Current behavior

ContainerClient defaults for Filesystem are the following, but auto/full aren't being set in the SandboxService.

    /// A block based filesystem.
    public static func block(
        format: String, source: String, destination: String, options: MountOptions, cache: CacheMode = .auto,
        sync: SyncMode = .full
    ) -> Filesystem {
        .init(
            type: .block(format: format, cache: cache, sync: sync),
            source: URL(fileURLWithPath: source).absolutePath(),
            destination: destination,
            options: options
        )
    }

    /// A named volume filesystem.
    public static func volume(
        name: String, format: String, source: String, destination: String, options: MountOptions,
        cache: CacheMode = .auto, sync: SyncMode = .full
    ) -> Filesystem {
        .init(
            type: .volume(name: name, format: format, cache: cache, sync: sync),
            source: URL(fileURLWithPath: source).absolutePath(),
            destination: destination,
            options: options
        )
    }

Expected behavior

SandboxService should translate the cache and sync properties on the parameters to the runtimeOptions on containerization Mount.

Environment

- OS: 
- Xcode: 
- Container:

Relevant log output

N/A

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    nextItems in scope for the next few milestonesstorageissues and features associated with storage.

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions