Skip to content

Commit 895e600

Browse files
committed
refactor(volume): remove single-volume mount command
1 parent 38087de commit 895e600

2 files changed

Lines changed: 1 addition & 20 deletions

File tree

docs/verity-volumes.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ reads them.
7575

7676
For diagnostics, `dstack-volume scan` lists recognized disks and
7777
`dstack-volume status app-compose.json` compares requested roots with attached
78-
and active devices. A single entry can be activated with
79-
`dstack-volume mount app-compose.json INDEX`.
78+
and active devices.
8079

8180
## Trust and limitations
8281

dstack/crates/dstack-volume/src/bin/dstack-volume.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ enum VolumeCommand {
5454
#[arg(default_value = "app-compose.json")]
5555
compose: PathBuf,
5656
},
57-
/// Activate one required volume by its index in app compose.
58-
Mount { compose: PathBuf, index: usize },
5957
/// List recognized dstack volume devices.
6058
Scan,
6159
/// Compare required volumes with attached and active devices.
@@ -69,7 +67,6 @@ fn main() -> Result<()> {
6967
tracing_subscriber::fmt().init();
7068
match Cli::parse().command {
7169
VolumeCommand::MountAll { compose } => mount_all(compose),
72-
VolumeCommand::Mount { compose, index } => mount_one(compose, index),
7370
VolumeCommand::Scan => scan(),
7471
VolumeCommand::Status { compose } => status(compose),
7572
}
@@ -111,21 +108,6 @@ fn mount_all(compose_path: PathBuf) -> Result<()> {
111108
Ok(())
112109
}
113110

114-
fn mount_one(compose_path: PathBuf, index: usize) -> Result<()> {
115-
let compose = read_compose(&compose_path)?;
116-
let requested = compose
117-
.verity_volumes
118-
.get(index)
119-
.with_context(|| format!("volume index {index} is out of range"))?;
120-
let volumes = prepare_volumes()?;
121-
activate_requested(index, requested, &volumes, &mut HashSet::new()).with_context(|| {
122-
format!(
123-
"failed to activate required volume {index} at {}",
124-
requested.target.display()
125-
)
126-
})
127-
}
128-
129111
fn scan() -> Result<()> {
130112
for volume in prepare_volumes()? {
131113
println!(

0 commit comments

Comments
 (0)