mirror of https://github.com/cirruslabs/tart.git
tart pull: open the VM directory after pulling under a lock (#936)
This commit is contained in:
parent
7c1ed4640f
commit
f7b38769a9
|
|
@ -47,8 +47,5 @@ struct Pull: AsyncParsableCommand {
|
|||
defaultLogger.appendNewLine("pulling \(remoteName)...")
|
||||
|
||||
try await VMStorageOCI().pull(remoteName, registry: registry, concurrency: concurrency, deduplicate: deduplicate)
|
||||
|
||||
// to explicitly set the image as being accessed so it won't get pruned immediately
|
||||
_ = try VMStorageOCI().open(remoteName)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -239,6 +239,9 @@ class VMStorageOCI: PrunableStorage {
|
|||
// are excluded from garbage collection
|
||||
VMDirectory(baseURL: vmURL(name)).markExplicitlyPulled()
|
||||
}
|
||||
|
||||
// to explicitly set the image as being accessed so it won't get pruned immediately
|
||||
_ = try VMStorageOCI().open(name)
|
||||
}
|
||||
|
||||
func linked(from: RemoteName, to: RemoteName) -> Bool {
|
||||
|
|
|
|||
Loading…
Reference in New Issue