@exagone313/dsh-podman 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.0.
|
|
2
|
-
export declare const GIT_COMMIT = "
|
|
1
|
+
export declare const VERSION = "1.0.3";
|
|
2
|
+
export declare const GIT_COMMIT = "46f18d1";
|
package/docs/architecture.md
CHANGED
|
@@ -106,10 +106,12 @@ absolute search root runs from that root: `glob`'s `pattern` then anchors to its
|
|
|
106
106
|
Project mounts must contain no symlink component and are confined to the
|
|
107
107
|
projects root, so a symlink inside a writable project can neither redirect the
|
|
108
108
|
bind mount to a path outside it nor make the path the orchestrator validates
|
|
109
|
-
differ from the path podman mounts.
|
|
110
|
-
|
|
111
|
-
container's agent could otherwise rename a component of the
|
|
112
|
-
symlink before podman resolves it.
|
|
109
|
+
differ from the path podman mounts. Two containers may also not hold nested
|
|
110
|
+
project mounts when the outer one is read-write, whichever was created first:
|
|
111
|
+
the outer container's agent could otherwise rename a component of the inner path
|
|
112
|
+
to a symlink before podman resolves it, on a create or on any later restart. A
|
|
113
|
+
container being replaced is stopped before its mounts are resolved again, so its
|
|
114
|
+
own processes cannot race the create either.
|
|
113
115
|
|
|
114
116
|
## Guest agent and daemons
|
|
115
117
|
|
|
@@ -151,6 +153,13 @@ the read-write mounts forced read-only before running the tool. The harness's
|
|
|
151
153
|
`sandbox_permissions` escalation is granted without prompting for the same
|
|
152
154
|
reason: the widening it asks for has no effect here.
|
|
153
155
|
|
|
156
|
+
Read-only is enforced on the container a tool targets, not on the whole
|
|
157
|
+
workspace. Other containers in the same workspace may still hold read-write
|
|
158
|
+
mounts and run daemons, and a workspace's containers share a pod network
|
|
159
|
+
namespace, so a command that is allowed under read-only can reach a sibling
|
|
160
|
+
container over localhost and have it write. Read-only confines the session's own
|
|
161
|
+
container; it is not a guarantee that nothing in the workspace can be written.
|
|
162
|
+
|
|
154
163
|
Recreating a container or shutting down the orchestrator first asks the
|
|
155
164
|
container's guest agent to gracefully stop its daemons (SIGTERM, ~10s grace)
|
|
156
165
|
before podman tears the container down.
|
package/docs/architecture.zh.md
CHANGED
|
@@ -85,8 +85,9 @@ UUID),因此其容器共享一个网络命名空间。每个工作区都有
|
|
|
85
85
|
项目挂载不得包含任何符号链接组件,并被限制在 projects root
|
|
86
86
|
内,因此可写项目中的符号链接既不能将绑定挂载重定向到其外部的路径,也不能让
|
|
87
87
|
orchestrator 校验的路径与 podman
|
|
88
|
-
|
|
89
|
-
agent 就能在 podman
|
|
88
|
+
实际挂载的路径不一致。两个容器也不能持有嵌套的项目挂载(只要外层挂载是读写的),无论哪个先创建:否则外层容器的
|
|
89
|
+
agent 就能在 podman
|
|
90
|
+
解析之前(创建时或之后任何一次重启时)把内层路径的某个组件改名为符号链接。被替换的容器会先停止,再重新解析其挂载,因此它自己的进程也无法与创建过程竞争。
|
|
90
91
|
|
|
91
92
|
## Guest agent 与守护进程
|
|
92
93
|
|
|
@@ -123,6 +124,10 @@ PATH。
|
|
|
123
124
|
按钮渲染该提示——并在获准后以强制只读的挂载重建容器,再运行该工具。出于同样的原因,harness
|
|
124
125
|
的 `sandbox_permissions` 升权会被直接授予而不询问:它请求的放宽在此处没有效果。
|
|
125
126
|
|
|
127
|
+
只读模式是针对工具所作用的那个容器执行的,而非整个工作区。同一工作区中的其他容器仍可持有读写挂载并运行守护进程,而且工作区内的容器共享一个
|
|
128
|
+
pod 网络命名空间,因此在只读模式下被允许的命令可以通过 localhost
|
|
129
|
+
访问同级容器并让其写入。只读模式只约束会话自身的容器,并不保证工作区内没有任何东西可被写入。
|
|
130
|
+
|
|
126
131
|
重新创建容器或关闭 orchestrator 时,会先要求容器的 guest agent
|
|
127
132
|
优雅地停止其守护进程(SIGTERM,约 10 秒宽限期),然后 podman 才会拆除该容器。
|
|
128
133
|
|