Stefan Pommerening
2013-Nov-13 15:58 UTC
[Puppet Users] Puppet 2.7.19: Create exported resources (using custom type / provider) from Linux on Windows
Hi there, I''m totally stuck with the following (cross-platform) problem: - I use a custom type as exported resource which is being ''filled-in'' on Linux servers and this type should be realized / created by some ruby provider on a Windows server. Puppet on Linux and Windows is always 2.7.19. My first test environment is completely on Linux which works fine. I have written two providers in ruby - one for Linux, one for Windows (testing was done by using the architecture fact for the confine statement and because I have amd64 and i386 Linux servers I was able to test that this works flawlessly) The second test environment is using the Windows server for a Puppet agent. My problem now is that the ruby provider on Windows is not working as expected. I do not get any error and I do not get any notification from a single resource. Now I wonder what could be the reason. What are the main differences between Puppet on Linux and Puppet on Windows? Anyone who can prove that custom types and providers are working on Windows? For me it seems that the resources which are stored in PuppetDB aren''t transferred to the puppet agent on Windows. But I do not know how to check this. Even the puppet.log file does not show anything helpful. How do I get all notification message written to the logfile on Windows? Are there different locations for the logfile? This seems to be a quite specific case, I did not find very much using Google and the documentation from PuppetLabs is not very comprehensive for this (special) case. Any hints? Every idea is very appreciated ;-) -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/8715e845-7a26-45b7-9840-b1f5c11888dc%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Rob Reynolds
2013-Nov-13 21:39 UTC
Re: [Puppet Users] Puppet 2.7.19: Create exported resources (using custom type / provider) from Linux on Windows
What version of Windows? Why such an older version of Puppet? On Wed, Nov 13, 2013 at 9:58 AM, Stefan Pommerening <pom@dmsp.de> wrote:> Hi there, > > I''m totally stuck with the following (cross-platform) problem: > > - I use a custom type as exported resource which is being ''filled-in'' on > Linux servers > and this type should be realized / created by some ruby provider on a > Windows server. > > Puppet on Linux and Windows is always 2.7.19. > > My first test environment is completely on Linux which works fine. > > I have written two providers in ruby - one for Linux, one for Windows > (testing was done by using the architecture fact for the confine statement > and because > I have amd64 and i386 Linux servers I was able to test that this works > flawlessly) > > The second test environment is using the Windows server for a Puppet agent. > > My problem now is that the ruby provider on Windows is not working as > expected. > I do not get any error and I do not get any notification from a single > resource. > > Now I wonder what could be the reason. > > What are the main differences between Puppet on Linux and Puppet on > Windows? > Anyone who can prove that custom types and providers are working on > Windows? > > For me it seems that the resources which are stored in PuppetDB aren''t > transferred > to the puppet agent on Windows. But I do not know how to check this. > Even the puppet.log file does not show anything helpful. How do I get all > notification > message written to the logfile on Windows? Are there different locations > for the logfile? > > This seems to be a quite specific case, I did not find very much using > Google and > the documentation from PuppetLabs is not very comprehensive for this > (special) case. > > Any hints? > > Every idea is very appreciated ;-) > > > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/8715e845-7a26-45b7-9840-b1f5c11888dc%40googlegroups.com > . > For more options, visit https://groups.google.com/groups/opt_out. >-- Rob Reynolds Developer, Puppet Labs Join us at PuppetConf 2014, September 23-24 in San Francisco -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAMJiBK5mkVH%2B06NCcHDeunsJ3Kjf%2Bm3%2B8bkbywrvn5ZtUxmJvw%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
jcbollinger
2013-Nov-13 23:14 UTC
[Puppet Users] Re: Puppet 2.7.19: Create exported resources (using custom type / provider) from Linux on Windows
On Wednesday, November 13, 2013 9:58:53 AM UTC-6, Stefan Pommerening wrote:> > Hi there, > > I''m totally stuck with the following (cross-platform) problem: > > - I use a custom type as exported resource which is being ''filled-in'' on > Linux servers > and this type should be realized / created by some ruby provider on a > Windows server. > >I don''t see any inherent problem with that.> Puppet on Linux and Windows is always 2.7.19. > > My first test environment is completely on Linux which works fine. > > I have written two providers in ruby - one for Linux, one for Windows > (testing was done by using the architecture fact for the confine statement > and because > I have amd64 and i386 Linux servers I was able to test that this works > flawlessly) > >Good.> The second test environment is using the Windows server for a Puppet agent. > > My problem now is that the ruby provider on Windows is not working as > expected. > I do not get any error and I do not get any notification from a single > resource. > > Now I wonder what could be the reason. > > What are the main differences between Puppet on Linux and Puppet on > Windows? > Anyone who can prove that custom types and providers are working on > Windows? > >I can''t necessarily speak to the particular version of Puppet you are using or to your particular custom components, but in a general sense, custom types and providers do work on Windows under current Puppet. As I recall, however, Windows support was still kinda raw back in the 2.7.x series. But that doesn''t mean it should completely flop.> For me it seems that the resources which are stored in PuppetDB aren''t > transferred > to the puppet agent on Windows. But I do not know how to check this. >Well, generally the *agent* doesn''t talk to PuppetDB at all. It certainly doesn''t obtain exported resources from there (or even recognize exported resources as such). Exporting and collecting resources are activities performed by the master. Also, providers are not involved at the export / collect level; they are chosen much later, after the compiled catalog is delivered to the agent.> Even the puppet.log file does not show anything helpful. How do I get all > notification > message written to the logfile on Windows? Are there different locations > for the logfile? > > This seems to be a quite specific case, I did not find very much using > Google and > the documentation from PuppetLabs is not very comprehensive for this > (special) case. > > Any hints? > >Although you may be running into problems related to the Windows support provided by your oldish version of Puppet, I don''t think your case is as special as you suppose. Resource collection specifically and catalog compilation generally really oughtn''t to be any different when the client is Windows than when it is Linux. All that happens on the same master, anyway. Of course your manifests can distinguish based on node facts, but that''s a whole different kettle of fish. I would focus first on verifying that your custom type and its Windows provider in fact work on Windows. That''s anyway where your problem is likely to lie. Check that the custom components are in fact synced to the Windows agent, and test them via ordinary resources rather than exported / collected ones. I''m afraid I have to leave it at generalities, however. Others can give you better advice about specifics of Puppet on Windows. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/705655fe-4d17-4ae3-a521-bcb742084827%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Stefan Pommerening
2013-Nov-14 09:05 UTC
Re: [Puppet Users] Puppet 2.7.19: Create exported resources (using custom type / provider) from Linux on Windows
1. Windows Server 2008 R2 Enterprise 2. because this is the requirement given by my client (installation of about 1,500 - 2,000 virtual machines, they won''t switch that easy...) Am Mittwoch, 13. November 2013 22:39:02 UTC+1 schrieb Rob Reynolds:> > What version of Windows? Why such an older version of Puppet? > > > > On Wed, Nov 13, 2013 at 9:58 AM, Stefan Pommerening <p...@dmsp.de<javascript:> > > wrote: > >> Hi there, >> >> I''m totally stuck with the following (cross-platform) problem: >> >> - I use a custom type as exported resource which is being ''filled-in'' on >> Linux servers >> and this type should be realized / created by some ruby provider on a >> Windows server. >> >> Puppet on Linux and Windows is always 2.7.19. >> >> My first test environment is completely on Linux which works fine. >> >> I have written two providers in ruby - one for Linux, one for Windows >> (testing was done by using the architecture fact for the confine >> statement and because >> I have amd64 and i386 Linux servers I was able to test that this works >> flawlessly) >> >> The second test environment is using the Windows server for a Puppet >> agent. >> >> My problem now is that the ruby provider on Windows is not working as >> expected. >> I do not get any error and I do not get any notification from a single >> resource. >> >> Now I wonder what could be the reason. >> >> What are the main differences between Puppet on Linux and Puppet on >> Windows? >> Anyone who can prove that custom types and providers are working on >> Windows? >> >> For me it seems that the resources which are stored in PuppetDB aren''t >> transferred >> to the puppet agent on Windows. But I do not know how to check this. >> Even the puppet.log file does not show anything helpful. How do I get all >> notification >> message written to the logfile on Windows? Are there different locations >> for the logfile? >> >> This seems to be a quite specific case, I did not find very much using >> Google and >> the documentation from PuppetLabs is not very comprehensive for this >> (special) case. >> >> Any hints? >> >> Every idea is very appreciated ;-) >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to puppet-users...@googlegroups.com <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/puppet-users/8715e845-7a26-45b7-9840-b1f5c11888dc%40googlegroups.com >> . >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > > -- > Rob Reynolds > Developer, Puppet Labs > > Join us at PuppetConf 2014, September 23-24 in San Francisco >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/c778f779-2675-483b-adcd-b786e81c8a5f%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Stefan Pommerening
2013-Nov-14 09:25 UTC
[Puppet Users] Re: Puppet 2.7.19: Create exported resources (using custom type / provider) from Linux on Windows
Hi John, thanks for posting. After having a look inside the puppet code I used the ''--evaltrace true'' option for another puppet agent run on the Windows vm and I got a lot of messages regarding my custom type (evalutation). Finally I have a proof that the communication regarding custom type content between puppetmaster on Linux and puppet agent on Windows is working correctly. Am Donnerstag, 14. November 2013 00:14:06 UTC+1 schrieb jcbollinger:> > > > On Wednesday, November 13, 2013 9:58:53 AM UTC-6, Stefan Pommerening wrote: >> >> Hi there, >> >> I''m totally stuck with the following (cross-platform) problem: >> >> - I use a custom type as exported resource which is being ''filled-in'' on >> Linux servers >> and this type should be realized / created by some ruby provider on a >> Windows server. >> >> > > I don''t see any inherent problem with that. > > > >> Puppet on Linux and Windows is always 2.7.19. >> >> My first test environment is completely on Linux which works fine. >> >> I have written two providers in ruby - one for Linux, one for Windows >> (testing was done by using the architecture fact for the confine >> statement and because >> I have amd64 and i386 Linux servers I was able to test that this works >> flawlessly) >> >> > > Good. > > > >> The second test environment is using the Windows server for a Puppet >> agent. >> >> My problem now is that the ruby provider on Windows is not working as >> expected. >> I do not get any error and I do not get any notification from a single >> resource. >> >> Now I wonder what could be the reason. >> >> What are the main differences between Puppet on Linux and Puppet on >> Windows? >> Anyone who can prove that custom types and providers are working on >> Windows? >> >> > > I can''t necessarily speak to the particular version of Puppet you are > using or to your particular custom components, but in a general sense, > custom types and providers do work on Windows under current Puppet. As I > recall, however, Windows support was still kinda raw back in the 2.7.x > series. But that doesn''t mean it should completely flop. >At least now I can proof that the custom type content is transferred with Puppet 2.7.19 as I mentionned above. ;-)> For me it seems that the resources which are stored in PuppetDB aren''t >> transferred >> to the puppet agent on Windows. But I do not know how to check this. >> > > > Well, generally the *agent* doesn''t talk to PuppetDB at all. It > certainly doesn''t obtain exported resources from there (or even recognize > exported resources as such). Exporting and collecting resources are > activities performed by the master. Also, providers are not involved at > the export / collect level; they are chosen much later, after the compiled > catalog is delivered to the agent. >Yes, correct. My faulty explaination. Puppet agent talks to puppetmaster, puppetmaster talks to PuppetDB, then Puppetmaster transfers the type content (as read from puppetdb) to the puppet agent.> >> Even the puppet.log file does not show anything helpful. How do I get all >> notification >> message written to the logfile on Windows? Are there different locations >> for the logfile? >> >> This seems to be a quite specific case, I did not find very much using >> Google and >> the documentation from PuppetLabs is not very comprehensive for this >> (special) case. >> >> Any hints? >> >> > > Although you may be running into problems related to the Windows support > provided by your oldish version of Puppet, I don''t think your case is as > special as you suppose. Resource collection specifically and catalog > compilation generally really oughtn''t to be any different when the client > is Windows than when it is Linux. All that happens on the same master, > anyway. Of course your manifests can distinguish based on node facts, but > that''s a whole different kettle of fish. > > I would focus first on verifying that your custom type and its Windows > provider in fact work on Windows. That''s anyway where your problem is > likely to lie. Check that the custom components are in fact synced to the > Windows agent, and test them via ordinary resources rather than exported / > collected ones. I''m afraid I have to leave it at generalities, however. > Others can give you better advice about specifics of Puppet on Windows. >Exactly this is where I am stuck now. Now I know that the custom type and content is transferred. Unfortunately I do not get any error message from the puppet agent on Windows. I guess my problem is somewhere in the ruby code because this is the first time I am using this language. For understanding the meaning of ''defaultfor'' and ''confine'' I did some testing in a pure Linux environment and when I did not use a suitable fact in the ''confine'' statement I got the error message from the agent that there is no suitable type provider available. If used correctly I could see my debug messages. But I do not see any messages on Windows, neither an error message nor any debug message is written to my logfile (usually written by the provider ruby code itself). Currently I am using: confine :osfamily => :windows (and no ''defaultfor'') Could this be the problem somehow? John> >Thanks and kind regards Stefan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/d50c294f-a6e0-40bc-a081-4f0b22dec0a3%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Stefan Pommerening
2013-Nov-14 14:33 UTC
[Puppet Users] Re: Puppet 2.7.19: Create exported resources (using custom type / provider) from Linux on Windows
SOLVED! My (dumb) problem was that I did not start the command window (on Windows server) using the right-click ''Administrator'', but I used my own account which generally IS an account with full privileges but Windows seems to need the "real thing"... Unfortunately there is absolute NO error message when you start a puppet run using the wrong permissions - it simply executes the job only partial, displaying only part of the messages. I would have expected an error message or something but nothing. Custom type and provider ruby code is working flawlessly now with Puppet 2.7.19 and Windows Server 2008 R2 Enterprise. Thanks for the support though. Stefan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/99972424-da98-447b-a46f-47c4c4fc79ef%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Rob Reynolds
2013-Nov-14 22:08 UTC
Re: [Puppet Users] Re: Puppet 2.7.19: Create exported resources (using custom type / provider) from Linux on Windows
Glad to see you have it solved. As John had previously mentioned, Windows support was early in that version so that could be why you were not seeing error messages. On Thu, Nov 14, 2013 at 8:33 AM, Stefan Pommerening <pom@dmsp.de> wrote:> SOLVED! > > My (dumb) problem was that I did not start the command window (on Windows > server) using the right-click ''Administrator'', but I used my own account > which generally IS an account with full privileges but Windows seems to > need the "real thing"... > > Unfortunately there is absolute NO error message when you start a puppet > run using the wrong permissions - it simply executes the job only partial, > displaying only part of the messages. I would have expected an error > message or something but nothing. > > Custom type and provider ruby code is working flawlessly now with Puppet > 2.7.19 and Windows Server 2008 R2 Enterprise. > > Thanks for the support though. > > Stefan > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/99972424-da98-447b-a46f-47c4c4fc79ef%40googlegroups.com > . > > For more options, visit https://groups.google.com/groups/opt_out. >-- Rob Reynolds Developer, Puppet Labs Join us at PuppetConf 2014, September 23-24 in San Francisco -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAMJiBK7XLa3ntCudqn_FeWz4Am5fdSo9eT4wzeK6TygUPKgvHA%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.