Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
  • Nov 26 2018 18:09
    @ferventcoder banned @Mikewazovsk1
Gene Liverman
Looks like it got reported first in https://tickets.puppetlabs.com/browse/PA-663
awesome, good to know!
i see that chocolatey/chocolatey puppet module have not been touch since july 2016? is it dead?
Rob Reynolds
Not dead, just on hold for a bit @ricou84 - did you miss the boat to switch over to puppetlabs/chocolatey? It's supported and a drop in replacement to chocolatey/chocolatey
Plus it has chocolateysource, chocolateyconfig, and chocolateyfeature
And switching from chocolatey/chocolatey is painless
Gerold Katzinger
are there any good workaround options while waiting on https://tickets.puppetlabs.com/browse/MODULES-4418
Rob Reynolds
Maybe comment on the issue - the more voices on those, the higher the priority
@kkzinger ^^
Gerold Katzinger
Louis Mayorga
if I try to install a chocolatey package of a software that is already installed. Does chocolatey puppet will check and skip the re-installation?
Rob Reynolds
@lmayorga1980 depends on some factors (facters ;))
@lmayorga1980 first is the Chocolatey package itself. Is the package already installed or just the software?
Louis Mayorga
just software
Rob Reynolds
So Chocolatey (and by extension the Puppet provider) are going to look at what Chocolatey has installed and go off of that.
So if the package is not also there, it will be sure to install that
now this is where it gets interesting
Louis Mayorga
Rob Reynolds
If the installation script checks to see if the software is already installed and doesn't do anything, then nothing
so it would be a noop and it would be recognizing the software.
That is not built into Chocolatey itself yet, so it would have to be implemented explicitly
Louis Mayorga
I think serverspec has a very good powershell script that checks for package on windows and if its already installed
Rob Reynolds
Louis Mayorga
maybe something like that can be used as the base of chocolateyInstall.ps1?
Rob Reynolds
note that it checks to see if the software is already installed
Louis Mayorga
and if you want you can force it?
Rob Reynolds
also take a look at https://chocolatey.org/packages/KB2919355#files (or any KB package for that matter) - there are two scenarios for Noop
if the software is already installed, it doesn't do anything but recognize the package installation itself (no additional software install)
and if it doesn't apply to that version of Windows it moves on (due to non-grouped dependencies per Windows version)
the other aspect you should consider is - choco sync
if you run choco sync and the package names are the same, well the package will be installed and recognized by the time you run Puppet
and note that you can make them match - https://chocolatey.org/docs/commands-sync#options-and-switches
Gerold Katzinger
anyone experienced failures when updating to 0.10.9 via puppet?
currently puppet runs on my nodes keep being active with updating from 0.10.8 to 0.10.9. If I trigger a puppet run per hand via powershell the update is done without problems.
Gary Ewan Park
@kkzinger is this when you are installing Chocolatey?
If so then yes, I believe this is a known issue that will be fixed with 0.10.0.
Basically, on initial installation we run Chocolatey once to ensure setup of config file etc, however, that initial call is exiting with a code of 1, which is being picked up with as an error.
Gerold Katzinger
@gep13 Thanks for your reply. I tracked down a problem with proxy settings in my environment which could be the cause of the described behavior.
I havent tested new installations, will test this next Tuesday. Some machines are already waiting ...
Gary Ewan Park
Gotcha! Keep us posted on how you get on.
Rob Reynolds
@kkzinger our recommendation for organizational use of Chocolatey is to shield yourself from issues that could occur like this by having Chocolatey on your INTERNAL repository and installing from there. Then subscribe to our announcements list so you'll know when we have new releases. Then you can choose when to test that and pull those things into your environment. Here is a full guide on how to get all set up properly that we've written recently (and it has scripts!): https://chocolatey.org/docs/how-to-setup-offline-installation
I'm running puppet module acceptance tests and seems like i'm getting errors at puppet runs when installing choco packs

this is the choco logs:
2018-02-22 20:46:55,758 1836 [DEBUG] - XmlConfiguration is now operational
2018-02-22 20:46:55,836 1836 [INFO ] - ============================================================
2018-02-22 20:46:55,914 1836 [DEBUG] - Attempting to create directory "C:\ProgramData\chocolatey\config".
2018-02-22 20:46:56,226 1836 [DEBUG] - Attempting to replace "C:\ProgramData\chocolatey\config\chocolatey.config"
with "C:\ProgramData\chocolatey\config\chocolatey.config.1836.update".
Backup placed at "C:\ProgramData\chocolatey\config\chocolatey.config.backup".
2018-02-22 20:46:56,226 1836 [DEBUG] - Attempting to copy "C:\ProgramData\chocolatey\config\chocolatey.config.1836.update"
to "C:\ProgramData\chocolatey\config\chocolatey.config".
2018-02-22 20:46:56,226 1836 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\config\chocolatey.config.1836.update".
2018-02-22 20:46:56,242 1836 [INFO ] - Chocolatey v0.10.8
2018-02-22 20:46:56,258 1836 [DEBUG] - Chocolatey is running on Windows v 6.3.9600.0
2018-02-22 20:46:56,258 1836 [DEBUG] - Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old".
2018-02-22 20:46:56,258 1836 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old".
2018-02-22 20:46:56,273 1836 [DEBUG] - Command line: "C:\ProgramData\chocolatey\choco.exe" source add -n *chocolatey -s http://*****.*****.org/chocopacks/***** --priority 1
2018-02-22 20:46:56,273 1836 [DEBUG] - Received arguments: source add -n *chocolatey -s http://*****.*****.org/chocopacks/***** --priority 1
2018-02-22 20:46:56,320 1836 [DEBUG] - RemovePendingPackagesTask is now ready and waiting for PreRunMessage.
2018-02-22 20:46:56,336 1836 [DEBUG] - Sending message 'PreRunMessage' out if there are subscribers...
2018-02-22 20:46:56,336 1836 [DEBUG] - [Pending] Removing all pending packages that should not be considered installed...
2018-02-22 20:46:56,398 1836 [DEBUG] - The source 'http://*****.*****.org/chocopacks/*****' evaluated to a 'normal' source type
2018-02-22 20:46:56,398 1836 [DEBUG] -
NOTE: Hiding sensitive configuration data! Please double and triple
check to be sure no sensitive data is shown, especially if copying
output to a gist for review.
2018-02-22 20:46:56,414 1836 [DEBUG] - Configuration: CommandName='source'|
Information.PlatformName='Windows Server 2012 R2'|
Information.FullName='choco, Version=, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'|


this is the logs from the puppet run:
manually installing the package works
i'm not sure how to share the logs here seems like theres a no attachments
Rob Reynolds
@ssok1 full output of the logs in a gist - it seems you are missing the entire log output
@ferventcoder i have the full logs here: https://gist.github.com/ssok1/6e2376b51066c4de760e5aba2da34a61
Rob Reynolds
Nothing looks crazy there, but there are quite a few commands in there that are run
If you could get it down to just the one with an issue and one that works
That would be most helpful