nanovms / ops

ops - build and run nanos unikernels
https://ops.city
MIT License
1.27k stars 132 forks source link

Manifest.finalize(): do not retrieve NTP options from environment #1349

Closed francescolavra closed 2 years ago

francescolavra commented 2 years ago

Retrieving NTP klib configuration options from the environment requires updating Ops every time a new option is added or existing options are modified (in fact, the current code is missing support for newly added options such as 'ntp_max_slew_ppm' and 'ntp_max_freq_ppm'). In addition, options put in the environment are limited to string values, which prevents supporting e.g. array-valued options such as 'ntp_servers'. This commit removes the retrieval of NTP options from the environment; such options can be set via "ManifestPassthrough", similarly to what is done for other klibs. Example:

{
  "ManifestPassthrough": {
    "ntp_servers": ["us.pool.ntp.org", "12.34.56.78:1234"],
    "ntp_poll_min": "4",
    "ntp_poll_max": "6"
  }
}