@@ -26,8 +26,8 @@ use vz_runtime_contract::{
2626 SandboxBackend , SandboxSpec , SandboxState ,
2727} ;
2828use vz_stack:: {
29- Action , ContainerRuntime , OrchestrationConfig , StackError , StackEvent , StackExecutor ,
30- StackOrchestrator , StateStore , apply, parse_compose,
29+ Action , ContainerRuntime , ImagePolicy , OrchestrationConfig , StackError , StackEvent ,
30+ StackExecutor , StackOrchestrator , StateStore , apply, parse_compose,
3131} ;
3232
3333fn has_virtualization_entitlement ( ) -> bool {
@@ -701,6 +701,7 @@ services:
701701 let orch_config = OrchestrationConfig {
702702 poll_interval : Some ( 2 ) ,
703703 max_rounds : 30 ,
704+ image_policy : ImagePolicy :: AllowAll ,
704705 } ;
705706 let mut orchestrator = StackOrchestrator :: new ( executor, reconcile_store, orch_config) ;
706707
@@ -834,6 +835,7 @@ services:
834835 let orch_config = OrchestrationConfig {
835836 poll_interval : Some ( 2 ) ,
836837 max_rounds : 20 ,
838+ image_policy : ImagePolicy :: AllowAll ,
837839 } ;
838840 let mut orchestrator = StackOrchestrator :: new ( executor, reconcile_store, orch_config) ;
839841 let result = orchestrator. run ( & spec, None ) . unwrap ( ) ;
@@ -995,6 +997,7 @@ services:
995997 let orch_config = OrchestrationConfig {
996998 poll_interval : Some ( 2 ) ,
997999 max_rounds : 20 ,
1000+ image_policy : ImagePolicy :: AllowAll ,
9981001 } ;
9991002 let mut orchestrator = StackOrchestrator :: new ( executor, reconcile_store, orch_config) ;
10001003
@@ -1124,6 +1127,7 @@ services:
11241127 let orch_config = OrchestrationConfig {
11251128 poll_interval : Some ( 2 ) ,
11261129 max_rounds : 30 ,
1130+ image_policy : ImagePolicy :: AllowAll ,
11271131 } ;
11281132 let mut orchestrator = StackOrchestrator :: new ( executor, reconcile_store, orch_config) ;
11291133 let result = orchestrator. run ( & spec, None ) . unwrap ( ) ;
@@ -1325,6 +1329,8 @@ services:
13251329 command: ["sh", "-c", "while true; do sleep 1; done"]
13261330 volumes:
13271331 - journey-data:/journey
1332+ volumes:
1333+ journey-data:
13281334"# ;
13291335
13301336 let home = std:: env:: var ( "HOME" ) . unwrap ( ) ;
@@ -1341,19 +1347,14 @@ services:
13411347 let reconcile_store = StateStore :: open ( & db_path) . unwrap ( ) ;
13421348 let executor = StackExecutor :: new ( bridge, exec_store, tmp. path ( ) ) ;
13431349
1344- // Create the persistent volume
1345- let data_img = tmp. path ( ) . join ( "data.img" ) ;
1346- create_sparse_disk ( & data_img, 10 * 1024 * 1024 * 1024 ) ;
1347- let vol_spec = vz_stack:: VolumeSpec {
1348- name : "journey-data" . to_string ( ) ,
1349- driver : None ,
1350- driver_opts : HashMap :: new ( ) ,
1351- } ;
1352- executor. ensure_volume ( & vol_spec, & data_img) . unwrap ( ) ;
1350+ // Ensure the named volume directory exists
1351+ let vol_dir = tmp. path ( ) . join ( "volumes" ) . join ( "journey-data" ) ;
1352+ std:: fs:: create_dir_all ( & vol_dir) . unwrap ( ) ;
13531353
13541354 let orch_config = OrchestrationConfig {
13551355 poll_interval : Some ( 2 ) ,
13561356 max_rounds : 40 ,
1357+ image_policy : ImagePolicy :: AllowAll ,
13571358 } ;
13581359 let mut orchestrator = StackOrchestrator :: new ( executor, reconcile_store, orch_config) ;
13591360
0 commit comments