bsdci / libioc

A Python library to manage jails with ioc{age,ell}
https://bsd.ci/libioc
Other
38 stars 11 forks source link

add config with no exists config #671

Open himrock922 opened 5 years ago

himrock922 commented 5 years ago

ref #630

I commit of parameter that was said "unknown" with config.
For example, `The config property 'vnet_default_interface' is unknown`
Because I don't know very well about config detail, I need refactoring it.

This PR related to issue #626

Hi All, I'm sorry, after rebase execute, confflict code(like as <<<HEAD, ======) mixed PR(Also, reflog failed). So, recreate branch...

Make sure to follow and check these boxes before submitting a PR! Thank you.

gronke commented 5 years ago

Hi All, I'm sorry, after rebase execute, confflict code(like as <<<HEAD, ======) mixed PR(Also, reflog failed). So, recreate branch...

No worries, your set of changes is great to spot the differences to other variants.

Adding the values to the defaults has the effect that ioc does no longer complain about unknown JailConfig properties, but they will just be ignored when processing a jail. There are the cases:

  1. A feature is missing in libioc
    1. feature needs to be implemented
    2. config property can be added to Globals
  2. An iocage feature is unfortunately named
    1. the value can be mapped to a more reasonable internal name
    2. mapped name is added to the Globals
  3. iocage duplicates a feature with other name
    1. ignore the value on read (maybe verify with the other settings, but still ignore it)
    2. calculate the value on configuration write, so that the result remains compatible
  4. The iocage feature has design flaws
    1. will not be implemented
    2. warn users with error
    3. a --ignore-compat flag (or similar) can turn the error (2) into a warning and continue

As one with the ideas from your other branch, @himrock922, I'd like to derive more Issues from each individual change you suggest to the Globals. Doing so, while following the workflow described above, will lead to a user friendly solution with minimal breakage for iocage users. (iocage_legacy should not be affected).