Skip to content

Commit 89136de

Browse files
authored
Merge pull request #159 from cgwalters/remove-ignition-support
install: Drop ignition support
2 parents a39cf87 + 60f454f commit 89136de

File tree

4 files changed

+1
-355
lines changed

4 files changed

+1
-355
lines changed

lib/src/bootloader.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ use fn_error_context::context;
1111

1212
use crate::task::Task;
1313

14-
/// This variable is referenced by our GRUB fragment
15-
pub(crate) const IGNITION_VARIABLE: &str = "$ignition_firstboot";
1614
const GRUB_BOOT_UUID_FILE: &str = "bootuuid.cfg";
1715
/// The name of the mountpoint for efi (as a subdirectory of /boot, or at the toplevel)
1816
pub(crate) const EFI_DIR: &str = "efi";

lib/src/ignition.rs

Lines changed: 0 additions & 321 deletions
This file was deleted.

lib/src/install.rs

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,6 @@ pub(crate) struct InstallTargetOpts {
7575

7676
#[derive(clap::Args, Debug, Clone, Serialize, Deserialize)]
7777
pub(crate) struct InstallConfigOpts {
78-
/// Path to an Ignition config file
79-
#[clap(long, value_parser)]
80-
pub(crate) ignition_file: Option<Utf8PathBuf>,
81-
82-
/// Digest (type-value) of the Ignition config
83-
///
84-
/// Verify that the Ignition config matches the specified digest,
85-
/// formatted as <type>-<hexvalue>. <type> can be sha256 or sha512.
86-
#[clap(long, value_name = "digest", value_parser)]
87-
pub(crate) ignition_hash: Option<crate::ignition::IgnitionHash>,
88-
8978
/// Disable SELinux in the target (installed) system.
9079
///
9180
/// This is currently necessary to install *from* a system with SELinux disabled
@@ -207,6 +196,7 @@ pub(crate) struct State {
207196
pub(crate) skopeo_supports_containers_storage: bool,
208197
#[allow(dead_code)]
209198
pub(crate) setenforce_guard: Option<crate::lsm::SetEnforceGuard>,
199+
#[allow(dead_code)]
210200
pub(crate) config_opts: InstallConfigOpts,
211201
pub(crate) target_opts: InstallTargetOpts,
212202
pub(crate) install_config: config::InstallConfiguration,
@@ -844,15 +834,6 @@ async fn install_to_filesystem_impl(state: &State, rootfs: &mut RootSetup) -> Re
844834
if state.override_disable_selinux {
845835
rootfs.kargs.push("selinux=0".to_string());
846836
}
847-
// This is interpreted by our GRUB fragment
848-
if state.config_opts.ignition_file.is_some() {
849-
rootfs
850-
.kargs
851-
.push(crate::ignition::PLATFORM_METAL_KARG.to_string());
852-
rootfs
853-
.kargs
854-
.push(crate::bootloader::IGNITION_VARIABLE.to_string());
855-
}
856837

857838
// Write the aleph data that captures the system state at the time of provisioning for aid in future debugging.
858839
{
@@ -878,16 +859,6 @@ async fn install_to_filesystem_impl(state: &State, rootfs: &mut RootSetup) -> Re
878859
)?;
879860
tracing::debug!("Installed bootloader");
880861

881-
// If Ignition is specified, enable it
882-
if let Some(ignition_file) = state.config_opts.ignition_file.as_deref() {
883-
let src = std::fs::File::open(ignition_file)
884-
.with_context(|| format!("Opening {ignition_file}"))?;
885-
let bootfs = rootfs.rootfs.join("boot");
886-
crate::ignition::write_ignition(&bootfs, &state.config_opts.ignition_hash, &src)?;
887-
crate::ignition::enable_firstboot(&bootfs)?;
888-
println!("Installed Ignition config from {ignition_file}");
889-
}
890-
891862
// ostree likes to have the immutable bit on the physical sysroot to ensure
892863
// that it doesn't accumulate junk; all system state should be in deployments.
893864
Task::new("Setting root immutable bit", "chattr")

lib/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ mod bootloader;
3030
#[cfg(feature = "install")]
3131
mod containerenv;
3232
#[cfg(feature = "install")]
33-
pub(crate) mod ignition;
34-
#[cfg(feature = "install")]
3533
mod install;
3634
mod k8sapitypes;
3735
#[cfg(feature = "install")]

0 commit comments

Comments
 (0)