voxpupuli / puppet-augeasproviders_grub

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

Attempt to support BLSCFG #60

Closed jcpunk closed 2 years ago

trevor-vaughan commented 3 years ago

I don't quite follow. Is there something that needs to be supported that grub_menuentry doesn't currently work with?

jcpunk commented 3 years ago

I didn't see the BLS bits down in there.

How would you recommend I use menu_entry to remove rhgb from my kernel_opts (RHEL8)?

Related to : https://github.com/hercules-team/augeasproviders_grub/issues/58

coveralls commented 3 years ago

Coverage Status

Coverage decreased (-16.6%) to 78.808% when pulling d5723ed2134f87ced5d4ac081c748d7e9f5b3368 on jcpunk:blscfg into ff09ddcb389bc266255f8281d3bad9c0fd308577 on hercules-team:master.

jcpunk commented 3 years ago

I've gotten this about as far as I can without someone who knows puppet providers giving a hand. In theory the tests are about right, it is the actual provider code that needs some help.....

trevor-vaughan commented 3 years ago

@jcpunk Sorry it took me so long to get back to you on this.

It looks like the following still works properly:

kernel_parameter { 'rhgb': ensure => absent }
jcpunk commented 3 years ago

I'm not showing the existing module works with BLS config:

[riehecky@leibniz ~]$ ssh root@192.168.122.171
Activate the web console with: systemctl enable --now cockpit.socket

Last login: Wed Dec 16 08:58:32 2020 from 192.168.122.1
[root@localhost ~]# cat /proc/cmdline 
BOOT_IMAGE=(hd0,msdos1)/boot/vmlinuz-4.18.0-257.el8.x86_64 root=UUID=bed1a7ae-faff-4179-9a69-93480e0ac781 ro resume=UUID=033a1427-cacd-449b-89ae-8eea74bba365 rhgb
[root@localhost ~]# cat /etc/sysconfig/grub 
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="resume=UUID=033a1427-cacd-449b-89ae-8eea74bba365"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true
[root@localhost ~]# puppet apply --verbose -e "kernel_parameter { 'rhgb': ensure => absent }"
Info: Loading facts
Info: Loading facts
Notice: Compiled catalog for localhost.localdomain in environment production in 0.03 seconds
Info: Applying configuration version '1608130737'
Notice: Applied catalog in 0.04 seconds
[root@localhost ~]# reboot
Connection to 192.168.122.171 closed by remote host.
Connection to 192.168.122.171 closed.
[riehecky@leibniz ~]$ ssh root@192.168.122.171
Activate the web console with: systemctl enable --now cockpit.socket

Last login: Wed Dec 16 08:58:39 2020 from 192.168.122.1
[root@localhost ~]# cat /proc/cmdline 
BOOT_IMAGE=(hd0,msdos1)/boot/vmlinuz-4.18.0-257.el8.x86_64 root=UUID=bed1a7ae-faff-4179-9a69-93480e0ac781 ro resume=UUID=033a1427-cacd-449b-89ae-8eea74bba365 rhgb
[root@localhost ~]# 
trevor-vaughan commented 3 years ago

@jcpunk This is actually what I'm looking into right now. When I ran it manually, it seems to have:

  1. Updated /etc/default/grub
  2. Updated the BLS configuration (as evidenced by running the grub2-editenv command)

BUT, I think that grub2-mkconfig still has to be run and there is a bug #63 that I'm working on fixing right now.

jhoblitt commented 2 years ago

Is this still needed?

jcpunk commented 2 years ago

I think the just released version 4.0.0 may do what I need. I'll need to test further to be sure

jcpunk commented 2 years ago

hmmm.... I'm not seeing 4.0.0 up on the forge...