Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using xiismodule, test does not recognize that the module is already present. #323

Open
tbearok opened this issue Dec 12, 2017 · 4 comments
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.

Comments

@tbearok
Copy link

tbearok commented Dec 12, 2017

The following config works the first time, but subsequent times, always returns an error because it doesn't recognize that the setting is already there. It's a non-terminating error, but does cause the overall config to report a failure.

xIisModule phpHandler
{
Name = "phpFastCgi"
Path = "c:\tools\php72\php-cgi.exe"
RequestPath = ".php"
Verb = "
"
Ensure = "Present"
ModuleType = 'FastCgiModule'
DependsOn = @("[Package]vcRedist","[File]PhpIni")
}

@tbearok
Copy link
Author

tbearok commented Dec 13, 2017

Example of the output:
phpmodulelog.txt

@andikrueger
Copy link

I'm facing the very same error with this configuration:

xIisModule PhpHandler { 
            Name        = "phpFastCgi" 
            Path        = "$($phpDirectory)\php-cgi.exe" 
            RequestPath = "*.php" 
            Verb        = "*" 
            Ensure      = "Present" 
            DependsOn   = @("[Package]vcRedist","[Archive]PHP")
}

@andikrueger
Copy link

I tried to debug the resource. Even though the module configuration is fine, the function Test-TargetResourceImpl will return $false.

Eventually line 393 is causing this issue:

if($moduleConfigured -and ($ModuleType -ne 'FastCgiModule' -or $resourceStatus.EndPointSetup))
Variable Value
$moduleConfigured $true
$ModuleType FastCgiModule
resourceStatus.EndPointSetup $false

@johlju
Copy link
Member

johlju commented Apr 27, 2018

Thanks for reporting this! A test should be added to test this scenario. I label this as help wanted so that someone in the community can run with it. There are an open PR #350 that has been abandoned that someone is more than welcome to take over an run with.

@johlju johlju added bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community. labels Apr 27, 2018
scottmckenzie added a commit to scottmckenzie/xWebAdministration that referenced this issue May 14, 2018
scottmckenzie added a commit to scottmckenzie/xWebAdministration that referenced this issue May 14, 2018
- Add handler to specified site (dsccommunity#305).
- Parse verbs correctly (dsccommunity#323).
@SteveL-MSFT SteveL-MSFT added this to Help Wanted in powershell/dscresources May 14, 2019
@SteveL-MSFT SteveL-MSFT removed this from Help Wanted in powershell/dscresources Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

No branches or pull requests

3 participants