feat(opnsense-config): dnsmasq dhcp static mappings #130

Merged
letian merged 32 commits from feat/dnsmasqDhcpStatic into faet/okdinstallation 2025-09-08 19:06:19 +00:00
Owner
No description provided.
johnride added 1 commit 2025-09-01 21:34:52 +00:00
feat(opnsense-config): dnsmasq dhcp static mappings
Some checks failed
Run Check Script / check (pull_request) Failing after 31s
138e414727
johnride added 1 commit 2025-09-01 23:14:35 +00:00
wip: bootstrap step of okd installation required some refactoring, its getting there
Some checks failed
Run Check Script / check (pull_request) Failing after 30s
f076d36297
johnride added 1 commit 2025-09-02 03:20:44 +00:00
wip: OKD Installation full process automation underway, ready to test bootstrapping very soon
Some checks failed
Run Check Script / check (pull_request) Failing after 30s
6f88fd00c1
johnride force-pushed feat/dnsmasqDhcpStatic from 6f88fd00c1 to 35a459f63c 2025-09-02 03:21:55 +00:00 Compare
johnride added 1 commit 2025-09-02 03:36:40 +00:00
wip: OKd installation, some cleanup of unused and some refactoring
All checks were successful
Run Check Script / check (pull_request) Successful in 1m13s
241980ebec
johnride added 1 commit 2025-09-02 04:10:34 +00:00
feat: Can now select a bootstrap host and save the role mapping to database
Some checks failed
Run Check Script / check (pull_request) Failing after 33s
f6e665f990
johnride added 1 commit 2025-09-02 04:39:58 +00:00
johnride force-pushed feat/dnsmasqDhcpStatic from a353249eec to 0070373714 2025-09-02 04:41:15 +00:00 Compare
johnride added 1 commit 2025-09-02 15:26:12 +00:00
johnride added 1 commit 2025-09-02 15:46:48 +00:00
johnride added 1 commit 2025-09-03 00:55:47 +00:00
feat: OKD Installation now generates ignition files, copies them over, also uploads scos images
Some checks failed
Run Check Script / check (pull_request) Failing after 30s
6f746d4c88
johnride added 1 commit 2025-09-03 04:00:40 +00:00
feat: OKD bootstrap automation pretty much complete with a few prompt for manual steps
Some checks failed
Run Check Script / check (pull_request) Failing after 1m12s
f1209b3823
johnride added 1 commit 2025-09-03 04:39:25 +00:00
wip minor refactor in okd example
Some checks failed
Run Check Script / check (pull_request) Failing after 1m8s
ceea03d6ce
johnride added 1 commit 2025-09-03 12:39:46 +00:00
fix: Support multiple mac address on static host binding
Some checks failed
Run Check Script / check (pull_request) Failing after 30s
fed4a8076c
johnride force-pushed feat/dnsmasqDhcpStatic from fed4a8076c to 5142e2dd2d 2025-09-03 12:40:11 +00:00 Compare
johnride added 1 commit 2025-09-03 12:53:53 +00:00
fix: opnsense dhcp test and formatting
All checks were successful
Run Check Script / check (pull_request) Successful in 1m12s
160939de21
johnride added 1 commit 2025-09-03 16:09:50 +00:00
johnride added 1 commit 2025-09-03 17:07:07 +00:00
fix: Use ssh key from FileContent in OKDIpxe score instead of hardcoded path
Some checks failed
Run Check Script / check (pull_request) Failing after 28s
680902e450
johnride added 1 commit 2025-09-03 17:18:04 +00:00
fix: OPnsense xml fields for wk1 after update to 25.7
Some checks failed
Run Check Script / check (pull_request) Failing after 29s
a03327d7e4
johnride added 1 commit 2025-09-03 21:50:21 +00:00
johnride added 1 commit 2025-09-04 00:53:51 +00:00
johnride added 1 commit 2025-09-04 02:42:22 +00:00
johnride added 1 commit 2025-09-04 15:29:22 +00:00
chore: Rename interpret name Okd.. string to OKD..
Some checks failed
Run Check Script / check (pull_request) Failing after 30s
e7ccfe6969
johnride added 1 commit 2025-09-04 21:23:22 +00:00
johnride added 1 commit 2025-09-04 21:49:09 +00:00
feat: Control plane bootstraping logic implemented, next step is testing it!
Some checks failed
Run Check Script / check (pull_request) Failing after 18s
902185daa4
johnride added 1 commit 2025-09-04 21:54:37 +00:00
johnride added 2 commits 2025-09-05 03:30:09 +00:00
johnride added 2 commits 2025-09-05 03:34:42 +00:00
johnride added 1 commit 2025-09-05 03:47:14 +00:00
johnride added 1 commit 2025-09-08 13:14:12 +00:00
doc: Host preparation notes
Some checks failed
Run Check Script / check (pull_request) Failing after 1m0s
14566e0327
letian reviewed 2025-09-08 15:08:47 +00:00
@ -30,0 +26,4 @@
// })
// .collect();
// dns.add_static_mapping(hosts);
// Ok(())
Owner

Detect DNS used in OPNsense and apply the right configuration in the right place for the service.

Same for the other implementations below.

Detect DNS used in OPNsense and apply the right configuration in the right place for the service. Same for the other implementations below.
letian reviewed 2025-09-08 15:25:34 +00:00
@ -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");
Owner

russh is way too slow to upload large files, find a better alternative (e.g. scp if available)

russh is way too slow to upload large files, find a better alternative (e.g. scp if available)
letian reviewed 2025-09-08 15:35:04 +00:00
@ -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
Owner

Prevent subnet overflow in DHCP range calculation

Prevent subnet overflow in DHCP range calculation
letian reviewed 2025-09-08 15:36:45 +00:00
@ -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
Owner
See https://git.nationtech.io/NationTech/harmony/issues/138
letian reviewed 2025-09-08 15:38:27 +00:00
@ -0,0 +10,4 @@
}
#[derive(Template)]
#[template(path = "okd/bootstrap.ipxe.j2")]
Owner

Rename to okd_node.ipxe.j2 or something similar to reflect that this file works for any OKD node

Rename to `okd_node.ipxe.j2` or something similar to reflect that this file works for any OKD node
letian reviewed 2025-09-08 15:40:42 +00:00
@ -108,6 +110,42 @@ impl SecretManager {
})
}
pub async fn get_or_prompt<T: Secret>() -> Result<T, SecretStoreError> {
Owner

Prompt is not working well for large single line pastes

Prompt is not working well for large single line pastes
letian added 1 commit 2025-09-08 15:45:51 +00:00
revert changes to harmony_secret local_file
Some checks failed
Run Check Script / check (pull_request) Failing after 1m3s
a8d421efdc
letian reviewed 2025-09-08 15:49:23 +00:00
@ -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
Owner

Update the hash when saving a new config to make sure we're always on the last version (and prevent log warns)

Update the hash when saving a new config to make sure we're always on the last version (and prevent log warns)
letian added 1 commit 2025-09-08 15:51:22 +00:00
remove missing file for config tests
Some checks failed
Run Check Script / check (pull_request) Failing after 1m0s
d7dd8bd5c1
letian reviewed 2025-09-08 15:52:34 +00:00
@ -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}"
// )));
Owner
Better handle this error with https://git.nationtech.io/NationTech/harmony/issues/141
letian approved these changes 2025-09-08 15:54:42 +00:00
letian added 1 commit 2025-09-08 18:54:33 +00:00
remove duplicate "member" attribute and remove broken configs (for now)
All checks were successful
Run Check Script / check (pull_request) Successful in 1m7s
dfc24e3b99
letian reviewed 2025-09-08 18:55:25 +00:00
@ -215,7 +215,6 @@
<description>System Administrators</description>
<scope>system</scope>
<gid>1999</gid>
<member>0</member>
Owner
See https://git.nationtech.io/NationTech/harmony/issues/142
letian reviewed 2025-09-08 18:55:33 +00:00
@ -27,7 +27,6 @@
<description>System Administrators</description>
<scope>system</scope>
<gid>1999</gid>
<member>0</member>
Owner
See https://git.nationtech.io/NationTech/harmony/issues/142
letian reviewed 2025-09-08 18:55:41 +00:00
@ -27,7 +27,6 @@
<description>System Administrators</description>
<scope>system</scope>
<gid>1999</gid>
<member>0</member>
Owner
See https://git.nationtech.io/NationTech/harmony/issues/142
letian force-pushed feat/dnsmasqDhcpStatic from dfc24e3b99 to 7426a548ff 2025-09-08 19:01:06 +00:00 Compare
letian reviewed 2025-09-08 19:03:36 +00:00
@ -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",
Owner

These files are commented because of re-ordering issues as well as attribute params being removed. For example:

<    "    <unboundplus version=\"1.0.12\" persisted_at=\"1755708112.29\">",
<    "    <user uuid=\"1d2ed537-5d1a-4772-9600-37b93f9f798b\">",
>    "    <unboundplus version=\"1.0.12\">",
>    "    <user>",
These files are commented because of re-ordering issues as well as attribute params being removed. For example: ``` < " <unboundplus version=\"1.0.12\" persisted_at=\"1755708112.29\">", < " <user uuid=\"1d2ed537-5d1a-4772-9600-37b93f9f798b\">", > " <unboundplus version=\"1.0.12\">", > " <user>", ```
letian merged commit da5a869771 into faet/okdinstallation 2025-09-08 19:06:19 +00:00
letian deleted branch feat/dnsmasqDhcpStatic 2025-09-08 19:06:19 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: NationTech/harmony#130
No description provided.