--seed is Kubernetes item K-S8, not K-S5 #454
No files matched your search
@@ -33,10 +33,10 @@ pub struct BootManager {
|
||||
/// inbuxa: K-S3: started with `--upgrade-store`: no listeners, no
|
||||
/// services; main upgrades the store's layout and exits
|
||||
pub upgrade_store: bool,
|
||||
/// inbuxa: K-S5: started with `--seed <PATH>`: like `--upgrade-store`,
|
||||
/// inbuxa: K-S8: started with `--seed <PATH>`: like `--upgrade-store`,
|
||||
/// and then main applies the seed and exits
|
||||
pub seed: Option<PathBuf>,
|
||||
/// inbuxa: K-S5: whether the store was new when this process started,
|
||||
/// inbuxa: K-S8: whether the store was new when this process started,
|
||||
/// before the defaults went in
|
||||
pub store_was_new: bool,
|
||||
}
|
||||
@@ -94,7 +94,7 @@ enum StoreOp {
|
||||
Console,
|
||||
// inbuxa: K-S3
|
||||
UpgradeStore,
|
||||
// inbuxa: K-S5
|
||||
// inbuxa: K-S8
|
||||
Seed(PathBuf),
|
||||
None,
|
||||
}
|
||||
@@ -181,7 +181,7 @@ impl BootManager {
|
||||
StoreOp::Seed(path) => Some(path.clone()),
|
||||
_ => None,
|
||||
};
|
||||
// inbuxa: K-S5: a seed run boots as --upgrade-store does
|
||||
// inbuxa: K-S8: a seed run boots as --upgrade-store does
|
||||
let one_shot = upgrade_store || seed.is_some();
|
||||
let registry = RegistryStore::init(
|
||||
PathBuf::from(config_path.unwrap()),
|
||||
@@ -197,7 +197,7 @@ impl BootManager {
|
||||
}
|
||||
let mut bootstrap = Bootstrap::new(registry).await;
|
||||
|
||||
// inbuxa: K-S5: a seed is only for a new store, which the defaults
|
||||
// inbuxa: K-S8: a seed is only for a new store, which the defaults
|
||||
// below stop being
|
||||
let store_was_new = seed.is_some()
|
||||
&& super::defaults::is_new_install(&bootstrap)
|
||||
|
||||
@@ -642,7 +642,7 @@ fn first_boot_key() -> ValueClass {
|
||||
})
|
||||
}
|
||||
|
||||
/// inbuxa: K-S5: a store no start has set up yet: no roles, or a first boot
|
||||
/// inbuxa: K-S8: a store no start has set up yet: no roles, or a first boot
|
||||
/// that hasn't finished. The same test the defaults use.
|
||||
pub async fn is_new_install(bp: &Bootstrap) -> trc::Result<bool> {
|
||||
Ok(bp.registry.count_object(ObjectType::Role).await? == 0 || first_boot_pending(bp).await?)
|
||||
|
||||
@@ -38,7 +38,7 @@ pub mod relay; // inbuxa: inbuxa Relay
|
||||
pub mod relay_message; // inbuxa: a relay's queues
|
||||
pub mod scheduled_reports; // inbuxa: scheduled reports and the weekly digest
|
||||
pub mod security_acceptance;
|
||||
pub mod seed; // inbuxa: K-S5: a new store's setup from a file (--seed)
|
||||
pub mod seed; // inbuxa: K-S8: a new store's setup from a file (--seed)
|
||||
pub mod sharing_policy;
|
||||
pub mod store_check; // inbuxa: checking the store's blobs
|
||||
pub mod store_snapshot; // inbuxa: a snapshot of the store
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
//! inbuxa: K-S5: a new store's setup from a file (`--seed`), for installs
|
||||
//! inbuxa: K-S8: a new store's setup from a file (`--seed`), for installs
|
||||
//! that are declared rather than clicked through, such as the Helm chart
|
||||
//! (docs/spec/store-seed.md).
|
||||
//!
|
||||
|
||||
@@ -68,7 +68,7 @@ async fn main() -> std::io::Result<()> {
|
||||
std::process::exit(Box::pin(upgrade_store_and_exit(&server)).await);
|
||||
}
|
||||
|
||||
// inbuxa: K-S5: --seed sets up a new store from a file and exits
|
||||
// inbuxa: K-S8: --seed sets up a new store from a file and exits
|
||||
if let Some(path) = init.seed.clone() {
|
||||
let server = init.inner.build_server();
|
||||
std::process::exit(Box::pin(seed_and_exit(&server, &path, init.store_was_new)).await);
|
||||
@@ -210,7 +210,7 @@ async fn upgrade_store_and_exit(server: &common::Server) -> i32 {
|
||||
flush_and_exit_code(code).await
|
||||
}
|
||||
|
||||
/// inbuxa: K-S5: `--seed`: the layout upgrade, then the seed
|
||||
/// inbuxa: K-S8: `--seed`: the layout upgrade, then the seed
|
||||
async fn seed_and_exit(
|
||||
server: &common::Server,
|
||||
path: &std::path::Path,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Feature spec: setting up a new store from a file (`--seed`)
|
||||
|
||||
Status: approved direction, 2026-11-18 (John chose "a setup file the server
|
||||
reads" over a chart job that drives recovery mode). Kubernetes item K-S5.
|
||||
reads" over a chart job that drives recovery mode). Kubernetes item K-S8.
|
||||
Not a rebuild (SPEC.md §4): inbuxa's own design.
|
||||
|
||||
## Provenance
|
||||
|
||||
Reference in new issue
Block a user