FAQ
Hi ,

This my puppet class, working nicely. But after i upgarde augeas into
augeas-0.10.0-3

class modprobe {
modprobe::disableModule{"Disable cramfs, 2.2.2.5": module =>
"cramfs" }
modprobe::disableModule{"Disable freevxfs, 2.2.2.5": module =>
"freevxfs" }
modprobe::disableModule{"Disable jffs2, 2.2.2.5": module =>
"jffs2" }
modprobe::disableModule{"Disable hfs, 2.2.2.5": module =>
"hfs" }
modprobe::disableModule{"Disable hfsplus, 2.2.2.5": module =>
"hfsplus" }
modprobe::disableModule{"Disable squashfs, 2.2.2.5":
module => "squashfs" }
modprobe::disableModule{"Disable udf, 2.2.2.5": module =>
"udf" }
modprobe::disableModule{"Disable usb-storage, 2.2.2.1": module
=> "usb-storage" }
modprobe::disableModule{"Disable ipv6, 2.5.3.1.1": module =>
"ipv6" }
modprobe::turnOffModule{"Disable bluetooth, 3.3.14.3": module =>
"bluetooth" }
modprobe::turnOffModule{"Disable net-pf-31, 3.3.14.3": module =>
"net-pf-31" }

}
modprobe::disableModule{"Disable DCCP, 2.5.7.1": module =>
"dccp" }
modprobe::disableModule{"Disable SCTP, 2.5.7.2": module =>
"sctp" }
modprobe::disableModule{"Disable RDS, 2.5.7.3": module => "rds" }
modprobe::disableModule{"Disable TIPC, 2.5.7.4": module =>
"tipc" }

define modprobe::disableModule ( $module = '' )
{
augeas::basic-change {"$name":
file => "/etc/modprobe.conf",
lens => "modprobe.lns",
changes => "set install[0] '$module /bin/true'",
onlyif => "match *[/files/etc/modprobe.conf[install =
'$module /bin/true']] size == 0",
}
}

define modprobe::turnOffModule ( $module ='' )
{
augeas::basic-change { "$name" :
file => "/etc/modprobe.conf",
lens => "modprobe.lns",
changes => [
"set alias[last()+1] $module",
"set alias[last()]/modulename off",
],
onlyif => "match *[/files/etc/modprobe.conf[alias =
'$module']] size == 0",
}

}

The error message:
info: Retrieving plugin
info: Loading facts in unlabeled_device_files
info: Loading facts in unlabeled_device_files
info: Caching catalog for id41-nd016.asyx.com
info: Applying configuration version '1335867684'
err: /Stage[main]/Modprobe/Modprobe::Modprobe::Disablemodule[Disable
squashfs, 2.2.2.5]/Augeas::Basic-change[Disable squashfs,
2.2.2.5]/Augeas[Disable squashfs, 2.2.2.5]/returns: change from
need_to_run to 0 failed: Save failed with return code false
err: /Stage[main]/Modprobe/Modprobe::Modprobe::Disablemodule[Disable
SCTP, 2.5.7.2]/Augeas::Basic-change[Disable SCTP,
2.5.7.2]/Augeas[Disable SCTP, 2.5.7.2]/returns: change from need_to_run
to 0 failed: Save failed with return code false
err: /Stage[main]/Modprobe/Modprobe::Modprobe::Disablemodule[Disable
TIPC, 2.5.7.4]/Augeas::Basic-change[Disable TIPC,
2.5.7.4]/Augeas[Disable TIPC, 2.5.7.4]/returns: change from need_to_run
to 0 failed: Save failed with return code false
err: /Stage[main]/Modprobe/Modprobe::Modprobe::Disablemodule[Disable
cramfs, 2.2.2.5]/Augeas::Basic-change[Disable cramfs,
2.2.2.5]/Augeas[Disable cramfs, 2.2.2.5]/returns: change from
need_to_run to 0 failed: Save failed with return code false
err: /Stage[main]/Modprobe/Modprobe::Modprobe::Disablemodule[Disable
udf, 2.2.2.5]/Augeas::Basic-change[Disable udf, 2.2.2.5]/Augeas[Disable
udf, 2.2.2.5]/returns: change from need_to_run to 0 failed: Save failed
with return code false
err: /Stage[main]/Modprobe/Modprobe::Modprobe::Disablemodule[Disable
DCCP, 2.5.7.1]/Augeas::Basic-change[Disable DCCP,
2.5.7.1]/Augeas[Disable DCCP, 2.5.7.1]/returns: change from need_to_run
to 0 failed: Save failed with return code false
err: /Stage[main]/Modprobe/Modprobe::Modprobe::Disablemodule[Disable
jffs2, 2.2.2.5]/Augeas::Basic-change[Disable jffs2,
2.2.2.5]/Augeas[Disable jffs2, 2.2.2.5]/returns: change from need_to_run
to 0 failed: Save failed with return code false
err: /Stage[main]/Modprobe/Modprobe::Modprobe::Disablemodule[Disable
RDS, 2.5.7.3]/Augeas::Basic-change[Disable RDS, 2.5.7.3]/Augeas[Disable
RDS, 2.5.7.3]/returns: change from need_to_run to 0 failed: Save failed
with return code false
err: /Stage[main]/Modprobe/Modprobe::Modprobe::Disablemodule[Disable
hfsplus, 2.2.2.5]/Augeas::Basic-change[Disable hfsplus,
2.2.2.5]/Augeas[Disable hfsplus, 2.2.2.5]/returns: change from
need_to_run to 0 failed: Save failed with return code false
err: /Stage[main]/Modprobe/Modprobe::Modprobe::Disablemodule[Disable
freevxfs, 2.2.2.5]/Augeas::Basic-change[Disable freevxfs,
2.2.2.5]/Augeas[Disable freevxfs, 2.2.2.5]/returns: change from
need_to_run to 0 failed: Save failed with return code false
err: /Stage[main]/Modprobe/Modprobe::Modprobe::Disablemodule[Disable
hfs, 2.2.2.5]/Augeas::Basic-change[Disable hfs, 2.2.2.5]/Augeas[Disable
hfs, 2.2.2.5]/returns: change from need_to_run to 0 failed: Save failed
with return code false
notice: Finished catalog run in 98.48 seconds

Thank you very much for every comment.
Best regards,

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Dominic Cleal at May 1, 2012 at 1:07 pm

    On 01/05/12 13:00, heriyanto wrote:
    Hi ,

    This my puppet class, working nicely. But after i upgarde augeas into
    augeas-0.10.0-3
    There was an incompatible change to the modprobe lens in Augeas 0.10.0:

    "Modprobe: Parse commands in install/remove stanzas (this introduces a
    backwards incompatibility)"

    from http://augeas.net/news.html
    define modprobe::disableModule ( $module = '' )
    {
    augeas::basic-change {"$name":
    file => "/etc/modprobe.conf",
    lens => "modprobe.lns",
    changes => "set install[0] '$module /bin/true'",
    onlyif => "match *[/files/etc/modprobe.conf[install =
    '$module /bin/true']] size == 0",
    }
    }
    The value of the node is no longer a concatenation of the module name
    and the command, the two were split up. Try this:

    define modprobe::disableModule ( $module = '' )
    {
    augeas::basic-change {"$name":
    file => "/etc/modprobe.conf",
    lens => "modprobe.lns",
    changes => [
    "set install[.='$module'] '$module'",
    "set install[.='$module']/command /bin/true",
    ],
    }
    }

    This creates two nodes instead of just the one, e.g.

    /files/etc/modprobe.conf/install = "foo"
    /files/etc/modprobe.conf/install/command = "/bin/true"

    I've also changed the install[0] so it doesn't always overwrite the
    first install line and instead creates an install line per module.

    Cheers,

    --
    Dominic Cleal
    Red Hat Consulting
    m: +44 (0)7817 878113

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Heriyanto at May 4, 2012 at 3:57 am
    Yes nice.. its work thank you Dominic, but its still execute even its
    already changed its normal for new augeas? because for old augeas not
    trying to change if already change. "returns: executed successfully"

    my onlyif doesn't work. onlyif => "match
    *[/files/etc/modprobe.conf[install = '$module /bin/true']] size == 0",

    and this script doesn't work anymore:

    if $ssh_port != '' {
    augeas { "ssh_port" :
    context => "/files/etc/ssh/sshd_config",
    changes => [
    "set Port $ssh_port",
    ],
    notify => Service[
    "sshd"
    ],
    }
    }


    Thank you for any help.

    Regards,

    On 05/01/2012 08:06 PM, Dominic Cleal wrote:
    On 01/05/12 13:00, heriyanto wrote:
    Hi ,

    This my puppet class, working nicely. But after i upgarde augeas into
    augeas-0.10.0-3
    There was an incompatible change to the modprobe lens in Augeas 0.10.0:

    "Modprobe: Parse commands in install/remove stanzas (this introduces a
    backwards incompatibility)"

    from http://augeas.net/news.html
    define modprobe::disableModule ( $module = '' )
    {
    augeas::basic-change {"$name":
    file => "/etc/modprobe.conf",
    lens => "modprobe.lns",
    changes => "set install[0] '$module /bin/true'",
    onlyif => "match *[/files/etc/modprobe.conf[install =
    '$module /bin/true']] size == 0",
    }
    }
    The value of the node is no longer a concatenation of the module name
    and the command, the two were split up. Try this:

    define modprobe::disableModule ( $module = '' )
    {
    augeas::basic-change {"$name":
    file => "/etc/modprobe.conf",
    lens => "modprobe.lns",
    changes => [
    "set install[.='$module'] '$module'",
    "set install[.='$module']/command /bin/true",
    ],
    }
    }

    This creates two nodes instead of just the one, e.g.

    /files/etc/modprobe.conf/install = "foo"
    /files/etc/modprobe.conf/install/command = "/bin/true"

    I've also changed the install[0] so it doesn't always overwrite the
    first install line and instead creates an install line per module.

    Cheers,
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Dominic Cleal at May 4, 2012 at 8:31 am

    On 04/05/12 04:57, heriyanto wrote:
    Yes nice.. its work thank you Dominic, but its still execute even its
    already changed its normal for new augeas? because for old augeas not
    trying to change if already change. "returns: executed successfully"
    Which version of Puppet are you using? Bug #11414 affected all Puppet
    when used with Augeas 0.10.0, which made the resources "run" on every
    single run, but never change things.

    http://projects.puppetlabs.com/issues/11414

    This was fixed in Puppet 2.7.10, though I'd strongly recommend using
    2.7.14 if you can (due to other bugs). It wasn't fixed in 2.6, though
    if you're using EPEL then there's a patch in that 2.6 RPM.

    --
    Dominic Cleal
    Red Hat Consulting
    m: +44 (0)7817 878113

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Heriyanto at May 10, 2012 at 5:20 am
    Thank you, Dom, now its working good, epel already release new puppet
    and resolved my issue.
    On 05/04/2012 03:31 PM, Dominic Cleal wrote:
    On 04/05/12 04:57, heriyanto wrote:
    Yes nice.. its work thank you Dominic, but its still execute even its
    already changed its normal for new augeas? because for old augeas not
    trying to change if already change. "returns: executed successfully"
    Which version of Puppet are you using? Bug #11414 affected all Puppet
    when used with Augeas 0.10.0, which made the resources "run" on every
    single run, but never change things.

    http://projects.puppetlabs.com/issues/11414

    This was fixed in Puppet 2.7.10, though I'd strongly recommend using
    2.7.14 if you can (due to other bugs). It wasn't fixed in 2.6, though
    if you're using EPEL then there's a patch in that 2.6 RPM.
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedMay 1, '12 at 12:00p
activeMay 10, '12 at 5:20a
posts5
users2
websitepuppetlabs.com

2 users in discussion

Heriyanto: 3 posts Dominic Cleal: 2 posts

People

Translate

site design / logo © 2022 Grokbase