← Back to team overview

cloud-init-dev team mailing list archive

Re: [Merge] ~t0rrant/cloud-init:1819966-sysconfig-options into cloud-init:master



@Ryan: the `NTPSERVERARGS` was just an example from the original issue #1819966, what got me there in the first place was that when I wrote anything to `/etc/sysconfig/network` it was replaced by static content generated by cloud-init's `render_network_state` function on reboot. 
>From what I can see in the `cc_write_files` module, using that to generate the `/etc/sysconfig/network` file will only work on instance creation (default `frequency = PER_INSTANCE` for that module), and only if it comes before the network handlers. If you look into `cloudinit/net/sysconfig.py` the original code uses `util.write_file` method which overwrites the contents of the parameter file by default.

@Brendan: yes the ntp servers are obtained via DHCP and that is not an issue here, just the case that we may want persistent controllable settings independent of the DHCP data received.

At the time there is not really a clean way to configure the `/etc/sysconfig/network` with arbitrary options, which I guess is desirable.

The rationale for this is to be able to specify persistent network options that are not obtainable from DHCP (i.e: resolver option `rotate`), either because the information received from the DHCP server is incomplete, there are independent networks for each of my NICs thus one DHCP information taking priority on the other, because you may not have in control of what information in send from the DHCP server, or even just because you want to =)

That said, is there a better suited place in the code to add this functionality?

Your team cloud-init commiters is requested to review the proposed merge of ~t0rrant/cloud-init:1819966-sysconfig-options into cloud-init:master.