FAQ
Hi!

I am encountering something that I am not sure is a bug or not, so I
thought I'd post a question.

Running Puppet 2.7.18 on Windows 2003.

Basically, what I want to do is manage nsclient++ on windows. I am able to
manage the files just fine, but restarting doesn't work because of bug 13489<http://projects.puppetlabs.com/issues/13489>.
So I thought I might circumvent it thusly:


service { "NSClientpp":
ensure => running,
restart => 'c:/program files/nsclient++/scripts/restart.bat',
subscribe => File["c:/program files/nsclient++/nsc.ini"],
}

and restart.bat is very simple:

sc stop nsclientpp
perl -e "sleep 10"
sc start nsclientpp
echo ran >> c:\restart.txt

it has world read and execute permissions, so it should run, but
restart.txt doesn't get created and the service still won't start on its
own.

My question is whether I am doing something wrong or is this is a bug?

Thanks

Dan

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/N7gK-LpAp3UJ.
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

  • Josh Cooper at Jul 25, 2012 at 7:20 pm
    Hi Dan,
    On Tue, Jul 24, 2012 at 4:00 PM, Dan McManus wrote:

    Basically, what I want to do is manage nsclient++ on windows. I am able to manage the files just fine, but restarting doesn't work because of bug 13489.
    I'd recommend trying out the latest version of puppet 2.7.x, directly
    from github. You should just need to patch
    `lib/puppet/provider/service/windows.rb`. Normally, I'd point you to
    our nightly builds, but the windows jobs haven't been running lately
    due to some infrastructure reorganization. I'll sort that out next
    week.
    So I thought I might circumvent it thusly:


    service { "NSClientpp":
    ensure => running,
    restart => 'c:/program files/nsclient++/scripts/restart.bat',
    subscribe => File["c:/program files/nsclient++/nsc.ini"],
    }

    and restart.bat is very simple:

    sc stop nsclientpp
    perl -e "sleep 10"
    sc start nsclientpp
    echo ran >> c:\restart.txt

    it has world read and execute permissions, so it should run, but restart.txt doesn't get created and the service still won't start on its own.

    My question is whether I am doing something wrong or is this is a bug?
    The windows service provider doesn't currently support overriding the
    `restart` method. We should either call that out in the provider
    documentation or add the ability to override it. I've filed this as
    https://projects.puppetlabs.com/issues/15693

    Josh
    --
    Josh Cooper
    Developer, Puppet Labs

    --
    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.
  • Dan McManus at Jul 26, 2012 at 5:52 pm
    I modified the windows.rb and it seems to work well now. Many thanks!

    Dan
    On Tuesday, July 24, 2012 5:00:09 PM UTC-6, Dan McManus wrote:

    Hi!

    I am encountering something that I am not sure is a bug or not, so I
    thought I'd post a question.

    Running Puppet 2.7.18 on Windows 2003.

    Basically, what I want to do is manage nsclient++ on windows. I am able to
    manage the files just fine, but restarting doesn't work because of bug
    13489 <http://projects.puppetlabs.com/issues/13489>. So I thought I might
    circumvent it thusly:


    service { "NSClientpp":
    ensure => running,
    restart => 'c:/program files/nsclient++/scripts/restart.bat',
    subscribe => File["c:/program files/nsclient++/nsc.ini"],
    }

    and restart.bat is very simple:

    sc stop nsclientpp
    perl -e "sleep 10"
    sc start nsclientpp
    echo ran >> c:\restart.txt

    it has world read and execute permissions, so it should run, but
    restart.txt doesn't get created and the service still won't start on its
    own.

    My question is whether I am doing something wrong or is this is a bug?

    Thanks

    Dan
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/FkklIRSsF64J.
    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.
  • Josh Cooper at Jul 27, 2012 at 5:13 pm
    Hi Dan,

    Great to hear. This issue will be fixed in puppet 2.7.19, which should
    enter rc next week.

    Josh
    On Thu, Jul 26, 2012 at 10:52 AM, Dan McManus wrote:
    I modified the windows.rb and it seems to work well now. Many thanks!

    Dan

    On Tuesday, July 24, 2012 5:00:09 PM UTC-6, Dan McManus wrote:

    Hi!

    I am encountering something that I am not sure is a bug or not, so I
    thought I'd post a question.

    Running Puppet 2.7.18 on Windows 2003.

    Basically, what I want to do is manage nsclient++ on windows. I am able to
    manage the files just fine, but restarting doesn't work because of bug
    13489. So I thought I might circumvent it thusly:


    service { "NSClientpp":
    ensure => running,
    restart => 'c:/program files/nsclient++/scripts/restart.bat',
    subscribe => File["c:/program files/nsclient++/nsc.ini"],
    }

    and restart.bat is very simple:

    sc stop nsclientpp
    perl -e "sleep 10"
    sc start nsclientpp
    echo ran >> c:\restart.txt

    it has world read and execute permissions, so it should run, but
    restart.txt doesn't get created and the service still won't start on its
    own.

    My question is whether I am doing something wrong or is this is a bug?

    Thanks

    Dan
    --
    You received this message because you are subscribed to the Google Groups
    "Puppet Users" group.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/puppet-users/-/FkklIRSsF64J.

    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.


    --
    Josh Cooper
    Developer, Puppet Labs

    --
    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
postedJul 25, '12 at 4:02p
activeJul 27, '12 at 5:13p
posts4
users2
websitepuppetlabs.com

2 users in discussion

Josh Cooper: 2 posts Dan McManus: 2 posts

People

Translate

site design / logo © 2022 Grokbase