-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(NODE-1477): Configuration revamp (IC-OS integration) #1563
base: master
Are you sure you want to change the base?
Conversation
ic-os/components/misc/config.sh
Outdated
function get_config_value() { | ||
local CONFIG_FILE="/var/ic/config/config.json" | ||
local key=$1 | ||
jq -r "${key}" "${CONFIG_FILE}" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we get a non-existant key, should we throw an error? Or just log that the key has not been found and return null?
…ration"" This reverts commit 4517b63.
match &network_settings.ipv6_config { | ||
Ipv6Config::RouterAdvertisement => { | ||
Err(anyhow!("IC-OS router advertisement is not yet supported")) | ||
} | ||
Ipv6Config::Fixed(_) => Err(anyhow!("Fixed IP configuration is not yet supported")), | ||
Ipv6Config::Deterministic(ipv6_config) => { | ||
let ipv6_address = generate_ipv6_address(&ipv6_config.prefix, &generated_mac)?; | ||
eprintln!("Using ipv6 address: {}", ipv6_address); | ||
|
||
let formatted_mac = FormattedMacAddress::from(&generated_mac); | ||
generate_systemd_config_files( | ||
output_directory, | ||
ipv6_config, | ||
Some(&formatted_mac), | ||
&ipv6_address, | ||
) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note the change now that Ipv6Config is stored as an enum
… fetch-mgmt-mac.sh
The IC-OS tool has been created, but not yet used by the IC-OS: #1539
This PR integrates the config tool into the IC-OS. The config tool is utilized for config sanitization, organization, access, and propagation.
Once we are happy with the new design, we will worry about the rollout and preserving backwards compatibility.