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

SPTimerJobState - 2 Service Applications throws errors #791

Closed
NikCharlebois opened this issue Mar 28, 2018 · 3 comments
Closed

SPTimerJobState - 2 Service Applications throws errors #791

NikCharlebois opened this issue Mar 28, 2018 · 3 comments
Labels
bug The issue is a bug.

Comments

@NikCharlebois
Copy link
Contributor

Details of the scenario you try and problem that is occurring:
The changes we made in 2.0.0.0 for the SPTimerJobState resource has logic to throw an error the moment a timer Job, with a Web Application Url of "N/A" (no specific Web App) has more than one instance. A customer of mine has two User Profile Service Application, which actually generates two instances of the "Service principal de profil utilisateur_SweepSync" (or whatever the English translation would be for that User_SweepSync timer job is).

The code then throws an error because the count # is not equal to 1. We should look at removing that check for exactly 1 instance. Brian Lalancette, who I'll add to this thread got an even weirder error complaining about '0' instances found (which off course is also not equal to 1....but very weird). Will continue to investigate: microsoft/SharePointDSC.Reverse#48

The DSC configuration that is using the resource:
N/A

Version of the Operating System and PowerShell the DSC Target Node is running:
Win 2012 R2/WMF 5.1

Version of SharePoint that is used (e.g. SharePoint 2016):
2013

Version of the DSC module you're using:
2.2.0.0

@NikCharlebois
Copy link
Contributor Author

FWIW - I can replicate the issue. Deploying the Word Automation Service App does create a new timer job with name Word Automation Services Timer Job, I do see it in the list when I do Get-SPTimerJob, but can't get to it by doing Get-SPTimerJob -Type "Word Automation Services Timer Job"

@NikCharlebois
Copy link
Contributor Author

There are two issues here:
1 - We should be using the TypeName property instead of the Type property when the TimerJob is not at a Web Application level;

2 - If the timer job is not associated with an actual Web Application, then it is most likely associated with a Service Application somehow and it seems like the only way to figure out which Service Application it is associated with is by its name, which will contain the Title of the associated Service Application. Looks like the ONLY way we will ever be able to get the Get-TargetResource to return a unique instance of a timer job in this case is if we add name as a parameter. In order not to make this a breaking change, it would be an optional parameter. If the method detects that only based on the TypeName, that there is more than one instance returned, then it should use the Job's name to retrieve the unique instance. If name if not provided, then it should throw an error.

Comments?

@ykuijs
Copy link
Member

ykuijs commented Jun 19, 2018

Closed via PR #800

@ykuijs ykuijs closed this as completed Jun 19, 2018
@johlju johlju removed the help wanted The issue is up for grabs for anyone in the community. label Jun 19, 2018
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.
Projects
None yet
Development

No branches or pull requests

3 participants