Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grub_config value true causes puppet-lint or augeus errors #45

Open
tparkercbn opened this issue Jul 29, 2019 · 3 comments
Open

grub_config value true causes puppet-lint or augeus errors #45

tparkercbn opened this issue Jul 29, 2019 · 3 comments

Comments

@tparkercbn
Copy link
Contributor

grub_config {'GRUB_DISABLE_OS_PROBER':
    value   => true,
}

Error: /Stage[main]/Boot::Grub2/Grub_config[GRUB_DISABLE_OS_PROBER]/ensure: change from 'absent' to 'present' failed: Could not set 'present' on ensure: no implicit conversion of true into String (file: /etc/puppetlabs/code/environments/production/modules/boot/manifests/grub2.pp, line: 32)

@trevor-vaughan
Copy link
Contributor

@tparkercbn Can you please test this directly with augtool to help pinpoint whether it is a lens issue or a provider issue?

@tparkercbn
Copy link
Contributor Author

Seems to be a provider issue. augtool doesn't care at all about the quotes. I think the issue is exactly what it says. There is no implicit conversion from Boolean true to String 'true', See augtool test below.

augtool> set etc/default/grub/GRUB_DISABLE_OS_PROBER true
augtool> save
Saved 1 file(s)
augtool> quit
[LIVE] mgaweb1 [k: mgaweb1]:~ # cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_CMDLINE_LINUX="root=/dev/vdb console=tty1 console=ttyS0,115200n8 rd.net.timeout.dhcp=2 biosdevname=0 net.ifnames=0"
GRUB_DISABLE_RECOVERY="true"
GRUB_TERMINAL="console serial"
GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200"
GRUB_DISABLE_OS_PROBER=true

@trevor-vaughan
Copy link
Contributor

Thanks, that's quite helpful! Looks like we might have to cast everything to a String for the provider.

trevor-vaughan added a commit to trevor-vaughan/augeasproviders_grub that referenced this issue Jul 29, 2019
* Ensure that Boolean values are converted to Strings
* Ensure the String values have quotes around them if not already
  present

Fixes voxpupuli#44, voxpupuli#45
trevor-vaughan added a commit to trevor-vaughan/augeasproviders_grub that referenced this issue Jul 31, 2019
* Ensure that Boolean values are converted to Strings
* Ensure the String values have quotes around them if not already
  present

Fixes voxpupuli#44, voxpupuli#45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants