I noticed that is if I uninstall an MSI that was installed by Puppet, Puppet does not notice. Looking at the source I see it might be checking for a state file to know whether a package is installed or not: C:\ProgramData\PuppetLabs\puppet\var\db\package\msi\SplunkForwarder.yml So one has to rememebr to delete that too.... Is this design not a problem? Thanks, Mohamed. -- 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.
Jacob Helwig
2011-Nov-22 19:25 UTC
Re: [Puppet Users] Puppet Windows: msi packages removal
On 2011-11-22 07:10 , Mohamed Lrhazi wrote:> I noticed that is if I uninstall an MSI that was installed by Puppet, > Puppet does not notice. > > Looking at the source I see it might be checking for a state file to > know whether a package is installed or not: > C:\ProgramData\PuppetLabs\puppet\var\db\package\msi\SplunkForwarder.yml > > So one has to rememebr to delete that too.... Is this design not a problem? > > Thanks, > Mohamed. >It''s certainly a limitation, and not ideal. This is currently how the appdmg provider behaves on OS X, so it''s not entirely unexpected behavior (for people that are used to how Puppet works on systems without centralized package management systems). An alternative would be to create a parameter along the lines of exec''s ''creates'' where you would need to specify a file that would only exist iff the ''package'' had been successfully installed. When we were investigating things initially I believe that the reason we had to rule out things like checking the registry was that there were too many ways for an installer to misbehave that would break any of the detection that we would need to do. I don''t know whether or not a ''creates'' parameter would end up being more problematic or not, but I certainly welcome discussion from people who are actually doing real systems management using Puppet on Windows. -- Jacob Helwig http://about.me/jhelwig
Mohamed Lrhazi
2011-Nov-23 00:32 UTC
Re: [Puppet Users] Puppet Windows: msi packages removal
I think the documentation about package providers should include something about this... Right now a provider has these features: holdable install_options installable purgeable uninstallable upgradeable versionable Maybe something like: detectable Meaning the provider can effectively detect whether the package is installed or not, as opposed to "can remember if it did install it or not". Thanks a lot, Mohamed. On Tue, Nov 22, 2011 at 2:25 PM, Jacob Helwig <jacob@puppetlabs.com> wrote:> On 2011-11-22 07:10 , Mohamed Lrhazi wrote: >> I noticed that is if I uninstall an MSI that was installed by Puppet, >> Puppet does not notice. >> >> Looking at the source I see it might be checking for a state file to >> know whether a package is installed or not: >> C:\ProgramData\PuppetLabs\puppet\var\db\package\msi\SplunkForwarder.yml >> >> So one has to rememebr to delete that too.... Is this design not a problem? >> >> Thanks, >> Mohamed. >> > > It''s certainly a limitation, and not ideal. This is currently how the > appdmg provider behaves on OS X, so it''s not entirely unexpected > behavior (for people that are used to how Puppet works on systems > without centralized package management systems). > > An alternative would be to create a parameter along the lines of exec''s > ''creates'' where you would need to specify a file that would only exist > iff the ''package'' had been successfully installed. > > When we were investigating things initially I believe that the reason we > had to rule out things like checking the registry was that there were > too many ways for an installer to misbehave that would break any of the > detection that we would need to do. > > I don''t know whether or not a ''creates'' parameter would end up being > more problematic or not, but I certainly welcome discussion from people > who are actually doing real systems management using Puppet on Windows. > > -- > Jacob Helwig > http://about.me/jhelwig > >-- 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.
Mohamed Lrhazi
2011-Nov-23 00:36 UTC
Re: [Puppet Users] Puppet Windows: msi packages removal
and then, indeed, maybe the provider could take a helper hint about how to go about detecting the presence of a package, kind of like Service takes hints about how to detect a service is running or not... Then maybe: detect_with_file => "C:\\Program Files\\Splunk\\bin\\splunk.exe" Thanks, Mohamed. On Tue, Nov 22, 2011 at 7:32 PM, Mohamed Lrhazi <lrhazi@gmail.com> wrote:> I think the documentation about package providers should include > something about this... > Right now a provider has these features: > > holdable install_options installable purgeable uninstallable upgradeable versionable > > Maybe something like: detectable > > Meaning the provider can effectively detect whether the package is > installed or not, as opposed to "can remember if it did install it or > not". > > Thanks a lot, > Mohamed. > > > On Tue, Nov 22, 2011 at 2:25 PM, Jacob Helwig <jacob@puppetlabs.com> wrote: >> On 2011-11-22 07:10 , Mohamed Lrhazi wrote: >>> I noticed that is if I uninstall an MSI that was installed by Puppet, >>> Puppet does not notice. >>> >>> Looking at the source I see it might be checking for a state file to >>> know whether a package is installed or not: >>> C:\ProgramData\PuppetLabs\puppet\var\db\package\msi\SplunkForwarder.yml >>> >>> So one has to rememebr to delete that too.... Is this design not a problem? >>> >>> Thanks, >>> Mohamed. >>> >> >> It''s certainly a limitation, and not ideal. This is currently how the >> appdmg provider behaves on OS X, so it''s not entirely unexpected >> behavior (for people that are used to how Puppet works on systems >> without centralized package management systems). >> >> An alternative would be to create a parameter along the lines of exec''s >> ''creates'' where you would need to specify a file that would only exist >> iff the ''package'' had been successfully installed. >> >> When we were investigating things initially I believe that the reason we >> had to rule out things like checking the registry was that there were >> too many ways for an installer to misbehave that would break any of the >> detection that we would need to do. >> >> I don''t know whether or not a ''creates'' parameter would end up being >> more problematic or not, but I certainly welcome discussion from people >> who are actually doing real systems management using Puppet on Windows. >> >> -- >> Jacob Helwig >> http://about.me/jhelwig >> >> >-- 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.