filesystem_info
Usage
This interface defines how a charm that exports a shared filesystem can expose the required mount information to a client charm that wants to mount the filesystem.
Direction
The filesystem_info interface implements a provider/requirer pattern. The Requirer is a charm that wishes to
mount a shared filesystem, and the Provider is the charm exporting the mount information to do that.
flowchart TD
Requirer --> Provider
Provider -- endpoint --> Requirer
Behavior
The exported endpoint from the Provider needs to adhere to a sublanguage of the URI grammar, which is specified by [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986
Examples
The following examples show some URIs adhering to the defined grammar, and their equivalent components.
- nfs://(192.168.1.1:65535)/export
- scheme: nfs
- userinfo: None
- hosts: 192.168.1.1:65535
- path-absolute: /export
- options: None
- lustre://(192.168.227.11%40tcp1,192.168.227.12%40tcp1)/export
- scheme: lustre
- userinfo: None
- hosts: 192.168.227.11@tcp1 192.168.227.12@tcp1
- path-absolute: /export
- options: None
- cephfs://fsuser@(192.168.1.1,192.168.1.2,192.168.1.3)/export?fsid=asdf1234&auth=secret%3AYXNkZnF3ZXJhc2RmcXdlcmFzZGZxd2Vy&filesystem=scratch
- scheme: cephfs
- userinfo: fsuser
- hosts: 192.168.1.1 192.168.1.2 192.168.1.3
- path-absolute: /export
- options:
- fsid: asdf1234
- auth: secret:YXNkZnF3ZXJhc2RmcXdlcmFzZGZxd2Vy
- filesystem: scratch
Provider
- Is expected to adhere to both the defined grammar and the additional requirements specified here.
- Is expected to export mount information for a valid and accessible shared filesystem.
Requirer
- Is expected to be able to parse the exported endpoint from the provider according to the defined grammar.
- Is expected to either have support for mounting the provider's exported filesystem, or gracefully handle when it cannot mount it.
Relation Data
Only the provider must export relation data.
Example
provider:
app: {
"endpoint": "lustre://(192.168.227.11%40tcp1,192.168.227.12%40tcp1)/export"
}
unit: {}
requirer:
app: {}
unit: {}