libct: remove relabeling dead code, deprecate Mount.Relabel#5152
libct: remove relabeling dead code, deprecate Mount.Relabel#5152cyphar merged 1 commit intoopencontainers:mainfrom
Conversation
There is no way to set Mount.Relabel field via OCI spec (config.json), and so the relabeling code is never used. My guess it's a leftover from times when runc used to be part of Docker. Remove it, and mark Relabel field as deprecated. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
|
(unless, of course, someone uses libcontainer to run containers (which I doubt). |
cyphar
left a comment
There was a problem hiding this comment.
@LittleLightLittleFire used to use libcontainer directly to start containers but he switched to using stock runc some time ago IIRC.
In any case, LGTM.
rata
left a comment
There was a problem hiding this comment.
LGTM. @kolyshkin wanna add a changelog entry?
|
I'll merge it and write my own in #5154. |
| Data string `json:"data,omitempty"` | ||
|
|
||
| // Relabel source if set, "z" indicates shared, "Z" indicates unshared. | ||
| Relabel string `json:"relabel,omitempty"` |
There was a problem hiding this comment.
Wait, should this have been json:"-"...?
There was a problem hiding this comment.
All I can say it was initially added by commit 49951d9. At that time the code was at github.com/docker/libcontainer (and that repo was 4 months old), and I'm not even sure who was the actual or the proposed user (dockerd?).
There was a problem hiding this comment.
Ah! Right, it should be explicitly omitted at this time.
There was a problem hiding this comment.
Opened #5160. That one should be included into rc.1 or we'll have a new empty Relabel field in state.json.
There is no way to set
Mount.Relabelfield via OCI spec (config.json), and so the relabeling code is never used.My guess it's a leftover from times when runc used to be part of Docker.
Remove it, and mark
Relabelfield as deprecated and for future removal.