Compose selected State Anchor paths over prepared roots
This commit is contained in:
parent
71b0266cf2
commit
4dd2b150d2
3 changed files with 1575 additions and 163 deletions
|
|
@ -988,6 +988,8 @@ pub struct StateAnchorOwnership {
|
|||
pub work_path: Option<HostPath>,
|
||||
pub merged_path: Option<HostPath>,
|
||||
pub daemon: PersistedHostProcessOwnership,
|
||||
pub user_namespace: Option<NamespaceIdentity>,
|
||||
pub mount_namespace: Option<NamespaceIdentity>,
|
||||
pub mount: Option<MountIdentity>,
|
||||
}
|
||||
|
||||
|
|
@ -1102,6 +1104,8 @@ impl StateAnchorOwnership {
|
|||
work_path: None,
|
||||
merged_path: None,
|
||||
daemon: PersistedHostProcessOwnership::unassigned(),
|
||||
user_namespace: None,
|
||||
mount_namespace: None,
|
||||
mount: None,
|
||||
}
|
||||
}
|
||||
|
|
@ -1112,6 +1116,8 @@ impl StateAnchorOwnership {
|
|||
&& self.work_path.is_none()
|
||||
&& self.merged_path.is_none()
|
||||
&& self.daemon.is_unassigned()
|
||||
&& self.user_namespace.is_none()
|
||||
&& self.mount_namespace.is_none()
|
||||
&& self.mount.is_none()
|
||||
}
|
||||
|
||||
|
|
@ -1121,6 +1127,8 @@ impl StateAnchorOwnership {
|
|||
&& self.work_path.is_some()
|
||||
&& self.merged_path.is_some()
|
||||
&& self.daemon.is_current_committed()
|
||||
&& self.user_namespace.is_some()
|
||||
&& self.mount_namespace.is_some()
|
||||
&& self.mount.is_some()
|
||||
}
|
||||
|
||||
|
|
@ -1133,6 +1141,8 @@ impl StateAnchorOwnership {
|
|||
validate_option_progress(self.work_path.as_ref(), next.work_path.as_ref())?;
|
||||
validate_option_progress(self.merged_path.as_ref(), next.merged_path.as_ref())?;
|
||||
validate_process_progress(&self.daemon, &next.daemon)?;
|
||||
validate_option_progress(self.user_namespace.as_ref(), next.user_namespace.as_ref())?;
|
||||
validate_option_progress(self.mount_namespace.as_ref(), next.mount_namespace.as_ref())?;
|
||||
validate_option_progress(self.mount.as_ref(), next.mount.as_ref())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -396,6 +396,8 @@ fn state_anchor_ownership(
|
|||
work_path: Some(HostPath::new(b"work".to_vec())),
|
||||
merged_path: Some(HostPath::new(b"merged".to_vec())),
|
||||
daemon,
|
||||
user_namespace: Some(namespace()),
|
||||
mount_namespace: Some(namespace()),
|
||||
mount: mount_identity,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -334,6 +334,8 @@ fn every_schema_shape_round_trips_and_rejects_malformed_or_unknown_versions() {
|
|||
work_path: Some(HostPath::new(b"work".to_vec())),
|
||||
merged_path: Some(HostPath::new(b"merged".to_vec())),
|
||||
daemon: owned_process(63),
|
||||
user_namespace: Some(namespace()),
|
||||
mount_namespace: Some(namespace()),
|
||||
mount: Some(mount()),
|
||||
},
|
||||
&mut seen,
|
||||
|
|
|
|||
Loading…
Reference in a new issue