Open jason-azze opened 7 years ago
I've confirmed that dependency resolution for this module works fine with Puppet 3.x.
@jason-azze-cdna Thanks for confirming it works with powershell module 2.x We should be able to get a fix and new release out within the next day or so.
This issue is almost identical to https://github.com/voxpupuli/puppet-msoffice/pull/34 that was merged earlier today.
@alexjfisher Sorry for the confusion. It actually doesn't work with puppetlabs-powershell 2.0.3. When I do a puppet module install puppet-dotnet
using puppet 3.x, it downloads puppelabs-powershell 1.0.6 and that works.
The behavior I observe when trying to use dotnet with the newer powershell module is that it manages to download the .NET installers and place them in c:\Windows\Temp, but the installation never happens.
@jason-azze Sorry, I misread your post. Do you have any idea why it doesn't work?
@jason-azze Could you confirm what version of windows you're using, which version of dotnet and post a debug log if possible?
I am testing on Windows 7 SP1 stock, with no updates. (We use piles of these as test systems, and they make me cry a lot.)
puppet-dotnet version is 1.0.2
.NET versions I tried to install were 4.0 and 4.5.
I spent hours during troubleshooting examining Sysinternals procmon traces to try to figure out why installation of .NET wouldn't proceed after the installer had been downloaded. From what I could gather, the installation was never attempted (as opposed to being tried and failing for some reason).
Could you advise me on how to capture or find a debug log to share?
I might be found on #voxpupuli as jasonium.
I "re-broke" my master so I could generate a debug log. Here's the scenario: Puppet agent on Windows 7 SP1 client, win7-automation02:
C:\Windows\system32>puppet --version
3.7.4
Powershell version native to Windows 7 SP1:
PS C:\Windows\System32\WindowsPowerShell\v1.0> .\powershell.exe $PSVersionTable.PSVersion
2
Puppet master, puppet-ma02:
[root@puppet-ma02 windows]# puppetserver --version
puppetserver version: 2.4.0
puppetlabs-powershell module version in environment on master:
[root@puppet-ma02 windows]# cat modules/powershell/metadata.json
{
"name": "puppetlabs-powershell",
"version": "2.0.3",
Command issued from elevated cmd on client:
C:\Windows\system32>puppet agent -t --debug --trace > c:\Windows\Temp\debug.log
Complete sanitized output attached here (or, at least I tried). But this may be the interesting part:
Debug: /Stage[main]/Dotnet4five/Dotnet[dotnet45]/Dotnet::Install::Package[dotnet-package-4.5]/Exec[install-dotnet-4.5]/unless: You cannot call a method on a null-valued expression.
Debug: /Stage[main]/Dotnet4five/Dotnet[dotnet45]/Dotnet::Install::Package[dotnet-package-4.5]/Exec[install-dotnet-4.5]/unless: At line:1 char:166
Debug: /Stage[main]/Dotnet4five/Dotnet[dotnet45]/Dotnet::Install::Package[dotnet-package-4.5]/Exec[install-dotnet-4.5]/unless: + if ((Get-Item -LiteralPath 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1AD147D0-BE0E-3D6C-AC11-64F6DC
Debug: /Stage[main]/Dotnet4five/Dotnet[dotnet45]/Dotnet::Install::Package[dotnet-package-4.5]/Exec[install-dotnet-4.5]/unless: 4163F1}' -ErrorAction SilentlyContinue).GetValue <<<< ('DisplayVersion')) { exit 0 }
Debug: /Stage[main]/Dotnet4five/Dotnet[dotnet45]/Dotnet::Install::Package[dotnet-package-4.5]/Exec[install-dotnet-4.5]/unless: + CategoryInfo : InvalidOperation: (GetValue:String) [], RuntimeException
Debug: /Stage[main]/Dotnet4five/Dotnet[dotnet45]/Dotnet::Install::Package[dotnet-package-4.5]/Exec[install-dotnet-4.5]/unless: + FullyQualifiedErrorId : InvokeMethodOnNull
Here's a gist of the log because the file upload might be busted. https://gist.github.com/jason-azze/c7975d0158a9581793aa803dd311e674 https://gist.github.com/jason-azze/c7975d0158a9581793aa803dd311e674 I hate you, github.
Negligent discharge on the close button.
@jason-azze Would you be able to test https://github.com/voxpupuli/puppet-dotnet/pull/28 ?
With both puppetlabs/powershell 1.x and 2.x...
ensure => absent
) work?Thanks
I tried a bunch of runs testing various combinations and permutations of installing and uninstalling using both puppetlabs-powershell 1.0.6 and 2.0.3. As the afternoon wore on, the rigor of my scientific method, umm, degraded. The bottom line for me is that puppet-dotnet with the #28 PR change to package.pp partially works. I'll try to clarify:
With puppetlabs-powershell 1.0.6 Does the package now install? Yes Is it idempotent? Kinda? It took two puppet runs for a parallel .NET 4.0 + .NET 4.5 install to complete. I believe the 4.0 install succeeds and then the 4.5 install succeeds and might overwrite 4.0. I'm not sure how to test that. Does uninstall (ensure => absent) work? Yes for uninstalling 4.0, inconclusive for 4.5 due to my poor testing methodology. Idempotently? Did not test.
With puppetlabs-powershell 2.0.3
Does the package now install? Yes
Is it idempotent? Takes two Puppet runs, and possibly a reboot before anything will install. So, technically no.
Does uninstall (ensure => absent) work? I think it's working for .NET 4.0 but not for 4.5. I believe the uninstall deletes the dotnetfx45_full_x86_x64.exe from c:\Windows\Temp and then tries to invoke it to do the uninstall.
Notice: /Stage[main]/Dotnet4five/Dotnet[dotnet45]/Dotnet::Install::Package[dotnet-package-4.5]/Exec[uninstall-dotnet-4.5]/returns: The term 'C:\Windows\Temp\dotnetfx45_full_x86_x64.exe' is not recognized as the name of a cmdlet, function, script file
Idempotently? No
My debug logs are a big mess. I can try to provide detail from them upon request, but I need to move on. :-) I'm three or four shaved yaks in at this point. I just want to get Chocolatey to run!
@jason-azze-cdna Thanks for the feedback. I've fixed the uninstall issue in https://github.com/voxpupuli/puppet-dotnet/pull/28/commits/16fa54e47cb62c3609424fa90cd0666e3d1861bc
It looks like there are still multiple issues with the module, but I don't think these are new. I'll try to find some time in the next few days to fix up the spec tests and see about getting the PR merged.
How is it going. Isn't it time for a new release with this problem fixed and support for windows 2016?
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
puppet module install puppet-dotnet
What are you seeing
Error: Could not install module 'puppet-dotnet' (???)
No version of 'puppet-dotnet' can satisfy all dependencies
Use
puppet module install --ignore-dependenciesto install only this module
What behaviour did you expect instead
Module installation to complete
Output log
As above.
Any additional information you'd like to impart
I think dependencies on puppetlabs-powershell and puppet-download_file < 2.0.0 can no longer be met. Both of those modules are >2 on the forge.