Code review comment for ~goneri/cloud-init:freebsd_set_password

Revision history for this message
Gonéri Le Bouder (goneri) wrote :

Thank for your feedback. There is another chpasswd binary on FreeBSD (https://www.freshports.org/www/chpasswd/) that is supposed to be compatible with the one Linux. But it's not maintained anymore and so, may not be as reliable as the official version. I've afraid the use of 'which' may create some lack of consitency in the plugins. Since it's pretty hard to troubleshoot Cloud-Init, I prefer to have something absolutely deterministic.

Also, depending on the format of the metadata, two different functions are used to set the password. This lack of consistency increases the complexity of the software (two functions for the same result) and result of subtile bugs. For instance, in the case of FreeBSD, one of the two strategy was working fine, the other was broken.

I understand you feel nervous with the change, but I'm convinced it will improve the quality of the code base. I suggest we try test it more intensivly instead. If you are willing to go in this direction, I will be happy to design some functional tests to validate the result on different operating system image. For instance, I already use Ansible locally to valide cloud-init behaviour.

« Back to merge proposal