Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 88e2f24cc6 | |||
| a484a7ec17 |
4 changed files with 74 additions and 990 deletions
|
|
@ -390,8 +390,6 @@ read-only command on Yggdrasil on 2026-09-29. Nothing was written to the host.
|
||||||
(`:3670`, `:3715`), and topology refresh (`:3780`). After three refused
|
(`:3670`, `:3715`), and topology refresh (`:3780`). After three refused
|
||||||
continuity restarts, supervision stops restarting (`:3522-3528`) but keeps
|
continuity restarts, supervision stops restarting (`:3522-3528`) but keeps
|
||||||
supervising the route of a dead incarnation. Read.
|
supervising the route of a dead incarnation. Read.
|
||||||
Resolved by `cut-liveness-gates-presence`: route challenge and topology
|
|
||||||
refresh now run only for an incarnation observed running.
|
|
||||||
- F9. The continuity restart limit counts refused restarts per generation
|
- F9. The continuity restart limit counts refused restarts per generation
|
||||||
(`is_refused_restart`, `:3469-3488`). A restart that succeeds admits a new
|
(`is_refused_restart`, `:3469-3488`). A restart that succeeds admits a new
|
||||||
generation and resets the count. A unit that starts, is admitted, and then
|
generation and resets the count. A unit that starts, is admitted, and then
|
||||||
|
|
|
||||||
1019
src/control_plane.rs
1019
src/control_plane.rs
File diff suppressed because it is too large
Load diff
|
|
@ -762,7 +762,7 @@ impl StaticReleasePort for FilesystemStaticRelease {
|
||||||
binding: &StaticReleaseBinding,
|
binding: &StaticReleaseBinding,
|
||||||
release_id: &str,
|
release_id: &str,
|
||||||
) -> Result<StaticFlip> {
|
) -> Result<StaticFlip> {
|
||||||
use std::os::unix::fs::{OpenOptionsExt, PermissionsExt, symlink};
|
use std::os::unix::fs::{OpenOptionsExt, symlink};
|
||||||
|
|
||||||
// Everything up to and including the rename can refuse, and only that
|
// Everything up to and including the rename can refuse, and only that
|
||||||
// refuses: the link has not moved when `FlipRefused` is returned.
|
// refuses: the link has not moved when `FlipRefused` is returned.
|
||||||
|
|
@ -823,10 +823,6 @@ impl StaticReleasePort for FilesystemStaticRelease {
|
||||||
.create_new(true)
|
.create_new(true)
|
||||||
.mode(0o444)
|
.mode(0o444)
|
||||||
.open(&temporary_carry)?;
|
.open(&temporary_carry)?;
|
||||||
// The creation mode is masked by the service's umask
|
|
||||||
// (UMask=0027 yields 0440), and the web server reads this file
|
|
||||||
// as "other"; say 0444 on the open handle.
|
|
||||||
file.set_permissions(fs::Permissions::from_mode(0o444))?;
|
|
||||||
file.write_all(&bytes)?;
|
file.write_all(&bytes)?;
|
||||||
file.sync_all()?;
|
file.sync_all()?;
|
||||||
fs::rename(&temporary_carry, &carried)?;
|
fs::rename(&temporary_carry, &carried)?;
|
||||||
|
|
@ -17049,43 +17045,6 @@ processes 9
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The service runs with UMask=0027, which masks the create mode to 0440
|
|
||||||
/// and hides the carry from the web user. The umask is process-global, so
|
|
||||||
/// the proof runs in a child copy of this test binary and no sibling test
|
|
||||||
/// ever sees it.
|
|
||||||
#[cfg(unix)]
|
|
||||||
#[test]
|
|
||||||
fn static_release_carry_is_0444_under_the_service_umask() -> Result<()> {
|
|
||||||
use std::os::unix::fs::PermissionsExt;
|
|
||||||
const CHILD: &str = "IDUNN_TEST_CARRY_UMASK_CHILD";
|
|
||||||
const NAME: &str = "static_release_carry_is_0444_under_the_service_umask";
|
|
||||||
if std::env::var_os(CHILD).is_none() {
|
|
||||||
let path = format!("{}::{NAME}", module_path!().split_once("::").map_or("", |(_, rest)| rest));
|
|
||||||
let output = std::process::Command::new(std::env::current_exe()?)
|
|
||||||
.args(["--exact", path.as_str(), "--nocapture", "--test-threads=1"])
|
|
||||||
.env(CHILD, "1")
|
|
||||||
.output()?;
|
|
||||||
assert!(
|
|
||||||
output.status.success(),
|
|
||||||
"child under umask 0027 failed:\n{}\n{}",
|
|
||||||
String::from_utf8_lossy(&output.stdout),
|
|
||||||
String::from_utf8_lossy(&output.stderr)
|
|
||||||
);
|
|
||||||
assert!(
|
|
||||||
String::from_utf8_lossy(&output.stdout).contains("1 passed"),
|
|
||||||
"the child filter matched no test:\n{}",
|
|
||||||
String::from_utf8_lossy(&output.stdout)
|
|
||||||
);
|
|
||||||
return Ok(());
|
|
||||||
}
|
|
||||||
unsafe { libc::umask(0o027) };
|
|
||||||
let site = stand_in_site()?;
|
|
||||||
FilesystemStaticRelease.carry_and_flip(&site.binding, RELEASE_A)?;
|
|
||||||
let carried = site.binding.current_link.join("config.json");
|
|
||||||
assert_eq!(fs::metadata(&carried)?.permissions().mode() & 0o777, 0o444);
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
#[test]
|
#[test]
|
||||||
fn static_release_missing_site_config_fails_before_the_link_moves() -> Result<()> {
|
fn static_release_missing_site_config_fails_before_the_link_moves() -> Result<()> {
|
||||||
|
|
|
||||||
|
|
@ -304,7 +304,7 @@ fn lifecycle_brake_status(options: &BTreeMap<String, String>) -> Result<()> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn replace_lifecycle_brake(path: &Path, record: IdunnLifecycleBrakeRecord) -> Result<()> {
|
fn replace_lifecycle_brake(path: &Path, record: IdunnLifecycleBrakeRecord) -> Result<()> {
|
||||||
record.validate()?;
|
record.validate()?;
|
||||||
let store = SingleFileMessagePackBackingStore::new(path);
|
let store = SingleFileMessagePackBackingStore::new(path);
|
||||||
let entries = store.pull_all_read_only_snapshot()?;
|
let entries = store.pull_all_read_only_snapshot()?;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue