Giter Site home page Giter Site logo

Comments (7)

johlju avatar johlju commented on June 5, 2024

The resource does not take a string array for email adress, just a string (one e-mail address). If you only use one e-mail address do you get the same result?

from sqlserverdsc.

quillypowers avatar quillypowers commented on June 5, 2024

The resource does not take a string array for email adress, just a string (one e-mail address). If you only use one e-mail address do you get the same result?

I've used it from the beginning passing in multiple email addresses. One address serves no purpose for how I'm using it. I don't have a test implementation I can mess with at the moment to toggle to one address though but will circle back. Thanks.

from sqlserverdsc.

quillypowers avatar quillypowers commented on June 5, 2024

The resource does not take a string array for email adress, just a string (one e-mail address). If you only use one e-mail address do you get the same result?

I've used it from the beginning passing in multiple email addresses. One address serves no purpose for how I'm using it. I don't have a test implementation I can mess with at the moment to toggle to one address though but will circle back. Thanks.

Ah but I am doing it as a single string with multiple addresses embedded. I botched that in my example and will update, thanks.

from sqlserverdsc.

johlju avatar johlju commented on June 5, 2024

If this worked before, what are you doing differently now? What is the length of the string of the e-mail addresses you try to add? There is probably a limit of the length set by SQL Server.

I can't reproduce. The integration tests passes.

 Context When using configuration DSC_SqlAgentOperator_Change_MultipleEmailAddresses_Config
VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = 
SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = 
root/Microsoft/Windows/DesiredStateConfiguration'.
VERBOSE: An LCM method call arrived from computer fv-az688-456 with user sid 
S-1-5-21-1597464496-2812813532-1165135672-500.
VERBOSE: [fv-az688-456]: LCM:  [ Start  Set      ]
VERBOSE: [fv-az688-456]: LCM:  [ Start  Resource ]  [[SqlAgentOperator]Integration_Test]
VERBOSE: [fv-az688-456]: LCM:  [ Start  Test     ]  [[SqlAgentOperator]Integration_Test]
VERBOSE: [fv-az688-456]:                            [[SqlAgentOperator]Integration_Test] Checking if SQL Agent Operator
 'MyOperator' is present or absent.
VERBOSE: [fv-az688-456]:                            [[SqlAgentOperator]Integration_Test] Connecting as current user 
'fv-az688-456\SqlInstall' using integrated security. (SQLCOMMON0054)
VERBOSE: [fv-az688-456]:                            [[SqlAgentOperator]Integration_Test] Connected to SQL instance 
'fv-az688-456\DSCSQLTEST'. (SQLCOMMON0018)
VERBOSE: [fv-az688-456]:                            [[SqlAgentOperator]Integration_Test] Getting SQL Agent Operators.
VERBOSE: [fv-az688-456]:                            [[SqlAgentOperator]Integration_Test] SQL Agent Operator 
'MyOperator' is present.
VERBOSE: [fv-az688-456]:                            [[SqlAgentOperator]Integration_Test] SQL Agent Operator 
'MyOperator' exists but has the wrong email address. Email address is currently '[email protected]' and should be
 updated to '[email protected];[email protected]'.
VERBOSE: [fv-az688-456]: LCM:  [ End    Test     ]  [[SqlAgentOperator]Integration_Test]  in 3.4840 seconds.
VERBOSE: [fv-az688-456]: LCM:  [ Start  Set      ]  [[SqlAgentOperator]Integration_Test]
VERBOSE: [fv-az688-456]:                            [[SqlAgentOperator]Integration_Test] Connecting as current user 
'fv-az688-456\SqlInstall' using integrated security. (SQLCOMMON0054)
VERBOSE: [fv-az688-456]:                            [[SqlAgentOperator]Integration_Test] Connected to SQL instance 
'fv-az688-456\DSCSQLTEST'. (SQLCOMMON0018)
VERBOSE: [fv-az688-456]:                            [[SqlAgentOperator]Integration_Test] Updating email address to 
'[email protected];[email protected]' for SQL Agent Operator 'MyOperator'.
VERBOSE: [fv-az688-456]: LCM:  [ End    Set      ]  [[SqlAgentOperator]Integration_Test]  in 0.2810 seconds.
VERBOSE: [fv-az688-456]: LCM:  [ End    Resource ]  [[SqlAgentOperator]Integration_Test]
VERBOSE: [fv-az688-456]: LCM:  [ End    Set      ]
VERBOSE: [fv-az688-456]: LCM:  [ End    Set      ]    in  3.9580 seconds.
VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 3.988 seconds

from sqlserverdsc.

quillypowers avatar quillypowers commented on June 5, 2024

It works to initially setup an operator with a list of email addresses, it does not update the operator if a changed list of email addresses (again, just a string with semicolons separating) is applied, which the documentation indicates it does. All I did differently was change the list of email addresses and rerun my code then check sql server. No updates and per my verbose output, I never see "updating email address" like you have. Since updating wasn't working, when I had to modify them I just blew out the entire operator by toggling ensure to absent and recreating with the updated email address string.

from sqlserverdsc.

johlju avatar johlju commented on June 5, 2024

Since it not possible to reproduce you have to debug it at your end to see why the Test-TargetResource function does not return $false. When it return $false then LCM should run Set-TargetResource which seem never happens in your case.

from sqlserverdsc.

quillypowers avatar quillypowers commented on June 5, 2024

Ok, I guess closing/ignoring.

from sqlserverdsc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.