feat(opnsense-config): dnsmasq dhcp static mappings #130
No reviewers
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: NationTech/harmony#130
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/dnsmasqDhcpStatic"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
6f88fd00c1
to35a459f63c
a353249eec
to0070373714
fed4a8076c
to5142e2dd2d
@ -30,0 +26,4 @@
// })
// .collect();
// dns.add_static_mapping(hosts);
// Ok(())
Detect DNS used in OPNsense and apply the right configuration in the right place for the service.
Same for the other implementations below.
@ -0,0 +232,4 @@
inquire::Confirm::new(
&format!("push installer image files with `scp -r {}/* root@{}:/usr/local/http/scos/` until performance issue is resolved", okd_images_path.to_string_lossy(), topology.http_server.get_ip())).prompt().expect("Prompt error");
// let scos_http_path = PathBuf::from("scos");
russh is way too slow to upload large files, find a better alternative (e.g. scp if available)
@ -47,0 +53,4 @@
};
// TODO this could overflow, we should use proper subnet maths here instead of an ip
// address and guessing the subnet size from there
Prevent subnet overflow in DHCP range calculation
@ -49,0 +54,4 @@
};
// TODO this could overflow, we should use proper subnet maths here instead of an ip
// address and guessing the subnet size from there
See https://git.nationtech.io/NationTech/harmony/issues/138
@ -0,0 +10,4 @@
}
#[derive(Template)]
#[template(path = "okd/bootstrap.ipxe.j2")]
Rename to
okd_node.ipxe.j2
or something similar to reflect that this file works for any OKD node@ -108,6 +110,42 @@ impl SecretManager {
})
}
pub async fn get_or_prompt<T: Secret>() -> Result<T, SecretStoreError> {
Prompt is not working well for large single line pastes
@ -160,2 +164,3 @@
pub async fn save(&self) -> Result<(), Error> {
self.repository.save_config(&self.opnsense.to_xml()).await
let xml = &self.opnsense.to_xml();
self.repository.save_config(xml, &self.hash).await
Update the hash when saving a new config to make sure we're always on the last version (and prevent log warns)
@ -60,0 +64,4 @@
warn!("OPNSense config file changed since loading it! Hash when loading : {hash}");
// return Err(Error::Config(format!(
// "OPNSense config file changed since loading it! Hash when loading : {hash}"
// )));
Better handle this error with https://git.nationtech.io/NationTech/harmony/issues/141
@ -215,7 +215,6 @@
<description>System Administrators</description>
<scope>system</scope>
<gid>1999</gid>
<member>0</member>
See https://git.nationtech.io/NationTech/harmony/issues/142
@ -27,7 +27,6 @@
<description>System Administrators</description>
<scope>system</scope>
<gid>1999</gid>
<member>0</member>
See https://git.nationtech.io/NationTech/harmony/issues/142
@ -27,7 +27,6 @@
<description>System Administrators</description>
<scope>system</scope>
<gid>1999</gid>
<member>0</member>
See https://git.nationtech.io/NationTech/harmony/issues/142
dfc24e3b99
to7426a548ff
@ -228,1 +234,3 @@
"src/tests/data/config-full-25.7-dummy-dnsmasq-options.xml",
// "src/tests/data/config-full-ncd0.xml",
// "src/tests/data/config-full-25.7.xml",
// "src/tests/data/config-full-25.7-dummy-dnsmasq-options.xml",
These files are commented because of re-ordering issues as well as attribute params being removed. For example: