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

Provider does not validate that the live value was successfully applied #33

Open
rybal06 opened this issue Jul 22, 2019 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@rybal06
Copy link

rybal06 commented Jul 22, 2019

When something fails to apply, module does not provide an error, instead keeps trying to apply the same setting on subsequent puppet agent runs.

Here is an example, setting the kernel.shmall to a value larger than is supported by the kernel:
Sysctl[kernel.shmall]/value: changed live value from '18446744073692774399' to '999999999999999999999999'

This reports success, but in checking the kernel value, it was not changed:
# sysctl -A | grep kernel.shmall kernel.shmall = 18446744073692774399

When attempting to change the setting directly, the kernel reports an error message as expected:
# sysctl -w kernel.shmall=999999999999999999999999
sysctl: setting key "kernel.shmall": Invalid argument
kernel.shmall = 999999999999999999999999
It would be helpful for the module to report an error rather than continually reporting that it changed the live value on each puppet run (becoming non-idempotent).

@raphink raphink added the enhancement New feature or request label Aug 16, 2019
@raphink
Copy link
Member

raphink commented Aug 16, 2019

Are you maybe using the silent => true option? Otherwise, it is supposed to fail.

@rybal06
Copy link
Author

rybal06 commented Sep 2, 2020

It is being called from inside a define using these parameters, silent is not being passed:

  sysctl { $title:
    ensure => present,
    value  => $value,
    target => $_sysctl_file,
  }

@raphink
Copy link
Member

raphink commented Jan 18, 2021

And you're not setting silent => true by default somewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants