-
Notifications
You must be signed in to change notification settings - Fork 541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mount correction #854
Mount correction #854
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,22 +65,37 @@ For all platform-specific configuration values, the scope defined below in the [ | |
For Linux, the parameters are as documented in [mount(2)][mount.2] system call man page. | ||
For Solaris, the mount entry corresponds to the 'fs' resource in the [zonecfg(1M)][zonecfg.1m] man page. | ||
|
||
|
||
* **`destination`** (string, REQUIRED) Destination of mount point: path inside container. | ||
This value MUST be an absolute path. | ||
* Windows: one mount destination MUST NOT be nested within another mount (e.g., c:\\foo and c:\\foo\\bar). | ||
* Solaris: corresponds to "dir" of the fs resource in [zonecfg(1M)][zonecfg.1m]. | ||
* **`type`** (string, OPTIONAL) The type of the filesystem to be mounted. | ||
* Linux: filesystem types supported by the kernel as listed in */proc/filesystems* (e.g., "minix", "ext2", "ext3", "jfs", "xfs", "reiserfs", "msdos", "proc", "nfs", "iso9660"). | ||
* Windows: this field MUST NOT be supplied. | ||
* Solaris: corresponds to "type" of the fs resource in [zonecfg(1M)][zonecfg.1m]. | ||
* **`source`** (string, OPTIONAL) A device name, but can also be a directory name or a dummy. | ||
* Windows: a local directory on the filesystem of the container host. UNC paths and mapped drives are not supported. | ||
* Solaris: corresponds to "special" of the fs resource in [zonecfg(1M)][zonecfg.1m]. | ||
* **`options`** (array of strings, OPTIONAL) Mount options of the filesystem to be used. | ||
* Linux: supported options are listed in the [mount(8)][mount.8] man page. Note both [filesystem-independent][mount.8-filesystem-independent] and [filesystem-specific][mount.8-filesystem-specific] options are listed. | ||
* Solaris: corresponds to "options" of the fs resource in [zonecfg(1M)][zonecfg.1m]. | ||
|
||
### Example (Windows) | ||
|
||
```json | ||
"mounts": [ | ||
{ | ||
"destination": "C:\\folder-inside-container", | ||
"source": "C:\\folder-on-host", | ||
"options": [] | ||
} | ||
] | ||
``` | ||
|
||
### <a name="configLinuxAndSolarisMounts" />Linux and Solaris Mounts | ||
|
||
For Linux and Solaris based systems the mounts structure has the following fields: | ||
|
||
* **`type`** (string, OPTIONAL) The type of the filesystem to be mounted. | ||
* Linux: filesystem types supported by the kernel as listed in */proc/filesystems* (e.g., "minix", "ext2", "ext3", "jfs", "xfs", "reiserfs", "msdos", "proc", "nfs", "iso9660"). | ||
* Solaris: corresponds to "type" of the fs resource in [zonecfg(1M)][zonecfg.1m]. | ||
|
||
### Example (Linux) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This (and the Solaris example) may want another There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. I thought about adding another |
||
|
||
```json | ||
|
@@ -100,18 +115,6 @@ For all platform-specific configuration values, the scope defined below in the [ | |
] | ||
``` | ||
|
||
### Example (Windows) | ||
|
||
```json | ||
"mounts": [ | ||
{ | ||
"destination": "C:\\folder-inside-container", | ||
"source": "C:\\folder-on-host", | ||
"options": [] | ||
} | ||
] | ||
``` | ||
|
||
### Example (Solaris) | ||
|
||
```json | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,12 +112,11 @@ type Platform struct { | |
|
||
// Mount specifies a mount for a container. | ||
type Mount struct { | ||
// Destination is the path where the mount will be placed relative to the container's root. The path and child directories MUST exist, a runtime MUST NOT create directories automatically to a mount point. | ||
// Destination is the absolute path where the mount will be placed in the container. | ||
Destination string `json:"destination"` | ||
// Type specifies the mount kind. | ||
Type string `json:"type,omitempty"` | ||
// Source specifies the source path of the mount. In the case of bind mounts on | ||
// Linux based systems this would be the file on the host. | ||
Type string `json:"type,omitempty" platform:"linux,solaris"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure I understand this comment. Is this change not entirely consistent with the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I'm saying I'd like something closer to: ## Mounts
…current section contents without `type`…
### Linux and Solaris Mounts
For Linux- and Solaris-based systems the mount structure has the following additional properties:
* **`type`** (string, OPTIONAL) … Then a Windows config setting There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I see. It confused me because the comment was against There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I'm saying that your current There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, that's done. But I've been consistent with the existing Update pushed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In the I'd rather have the other bits changed too (e.g. we do use the hypenated “Linux-based” here), but I'm fine punting those to follow-up work as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed on a follow-up consistency PR covering the markdown generally. |
||
// Source specifies the source path of the mount. | ||
Source string `json:"source,omitempty"` | ||
// Options are fstab style mount options. | ||
Options []string `json:"options,omitempty"` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can reduce future conflicts with #846 by adjusting these to use four-space indents when we touch the lines. That doesn't have to happen in this PR, but I think it's useful for reducing the rebase load on @Mashimiao if this PR lands first.