voxpupuli / puppet-augeasproviders_grub

Augeas-based grub type and providers
Apache License 2.0
9 stars 33 forks source link

Adding support for bootmode 'default' #3

Closed m4ce closed 8 years ago

m4ce commented 9 years ago

When bootmode is default, only the boot entry set as default will be considered when applying changes.

There was also an old post at https://www.redhat.com/archives/augeas-devel/2013-May/msg00006.html asking how to achieve this.

coveralls commented 9 years ago

Coverage Status

Coverage decreased (-2.16%) when pulling 8a40fc6d4b5c63ca08eb995b7c0adf1af9dfd39a on m4ce:bootmode_default into fe024d13249f4e4957a2e540ffe96496afd2eebe on hercules-team:master.

raphink commented 9 years ago

Thank you.

This change breaks the unit tests and is lacking additional tests.

Please add missing tests and fix existing ones.

coveralls commented 9 years ago

Coverage Status

Coverage decreased (-1.44%) when pulling 8ecf56f5f33f901cff57b4ae45c3e69ea80137ca on m4ce:bootmode_default into fe024d13249f4e4957a2e540ffe96496afd2eebe on hercules-team:master.

coveralls commented 9 years ago

Coverage Status

Coverage decreased (-1.44%) when pulling cd56442d4346073b5eeecab5c4ceeb32add2a0fd on m4ce:bootmode_default into fe024d13249f4e4957a2e540ffe96496afd2eebe on hercules-team:master.

coveralls commented 9 years ago

Coverage Status

Coverage decreased (-1.44%) when pulling cd56442d4346073b5eeecab5c4ceeb32add2a0fd on m4ce:bootmode_default into fe024d13249f4e4957a2e540ffe96496afd2eebe on hercules-team:master.

coveralls commented 9 years ago

Coverage Status

Coverage decreased (-1.44%) when pulling cd56442d4346073b5eeecab5c4ceeb32add2a0fd on m4ce:bootmode_default into fe024d13249f4e4957a2e540ffe96496afd2eebe on hercules-team:master.

coveralls commented 9 years ago

Coverage Status

Coverage decreased (-0.72%) when pulling 3e08e8ba79a45b41c75ecfcac0571fb6b505986d on m4ce:bootmode_default into fe024d13249f4e4957a2e540ffe96496afd2eebe on hercules-team:master.

coveralls commented 9 years ago

Coverage Status

Coverage decreased (-0.72%) when pulling 016b35a8bdb9f6d0f22e52e21de88fe36967819c on m4ce:bootmode_default into fe024d13249f4e4957a2e540ffe96496afd2eebe on hercules-team:master.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same when pulling 4ed07e8c07e4d45b94ec7951c3c16895357655fc on m4ce:bootmode_default into fe024d13249f4e4957a2e540ffe96496afd2eebe on hercules-team:master.

m4ce commented 9 years ago

Hi,

I've adjusted the unit tests and added the missing ones. This also led me to change the logic of how the kernel parameters are categorized as 'all', 'recovery', 'default' and 'normal'.

In the legacy grub, the current logic is:

if the parameter happens to be in the default entry AND all the recovery entryes AND all the normal entries, then 'all'
else if the parameter happens to be in at least one recovery entry, then 'recovery'
else if the parameter happens to be in the default entry, then 'default'
else 'normal'

In the grub2 provider, 'default' is just another alias for 'normal'.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same when pulling 8f6e502e253d0c08fd60641de5aece64b90f4c25 on m4ce:bootmode_default into fe024d13249f4e4957a2e540ffe96496afd2eebe on hercules-team:master.

raphink commented 9 years ago

Sorry for taking so long to review this @m4ce !

Could you update README.md with the new parameter and explanation on the fixed logic please?

raphink commented 8 years ago

@m4ce any news?

m4ce commented 8 years ago

@raphink,

sorry for not having come back to you in so long. I've updated the README.md to reflect the changes.

Happy holidays!

Cheers, Matteo

raphink commented 8 years ago

Rebased and merged as 2c47e358acbcdd99c35554a5e089aa10b709c6ba

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling a5d4ab9c060810cf2de2f95a8c39f850b893a7f0 on m4ce:bootmode_default into bd9a1bafe189aae2956d633abc1aee6a93d8c232 on hercules-team:master.