> It's LGTM for implementation part, but I think the unit test for it is
> required.
There seems to be unit tests already for the `update_grub_file` function [1]. Would I need to add something additionally to test for the change made in the template file?
This is to allow inheriting the pre-existing kernel cmdline parameters the default option. With the charm no longer resetting the value of `GRUB_CMDLINE_LINUX_DEFAULT` to an empty string, it'll only append to the already existing values (ex: coming from MAAS).
These parameters have been switched around so that the pre-existing console values (ex: coming from MAAS) will not be overwritten by the charm. According to my understanding, the console parameters (if defined) from `$GRUB_CMDLINE_LINUX_DEFAULT` will take precedence since they are declared the last.
> It's LGTM for implementation part, but I think the unit test for it is
> required.
There seems to be unit tests already for the `update_grub_file` function [1]. Would I need to add something additionally to test for the change made in the template file?
[1]: https:/ /git.launchpad. net/charm- sysconfig/ tree/src/ tests/unit/ test_lib. py#n250
> Also please provide more detail to explain why this change works.
``` LINUX_DEFAULT= ""
-{% else -%}
-GRUB_CMDLINE_
```
This is to allow inheriting the pre-existing kernel cmdline parameters the default option. With the charm no longer resetting the value of `GRUB_CMDLINE_ LINUX_DEFAULT` to an empty string, it'll only append to the already existing values (ex: coming from MAAS).
``` LINUX_DEFAULT= "$GRUB_ CMDLINE_ LINUX_DEFAULT console= ttyS0,115200 console=tty0" LINUX_DEFAULT= "console= ttyS0,115200 console=tty0 $GRUB_CMDLINE_ LINUX_DEFAULT"
-GRUB_CMDLINE_
+GRUB_CMDLINE_
```
These parameters have been switched around so that the pre-existing console values (ex: coming from MAAS) will not be overwritten by the charm. According to my understanding, the console parameters (if defined) from `$GRUB_ CMDLINE_ LINUX_DEFAULT` will take precedence since they are declared the last.