Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Otter Role Configuration - Drift Detection Gives Varied Results



  • I have a simple configuration set up in a role to detect on 12 servers whether or not a file exists. I've tried this both with a PSEnsure and the Otter Ensure File. The results of the routine drift detection from the role are always inconsistent and I almost never see the full results for all servers. Sometimes 4 servers will display as current, and then upon hitting the "Check Configuration" button for that role again then only 2 or 3 will be current. (Numbers aren't consistent)

    The only time I get the full list of results, for all 12 servers, is when I run the remediate task for the role. For whatever reason the routine checker doesn't seem to display consistent results.

    Am I missing something obvious?

    Product: Otter
    Version: 1.6.1



  • What you're doing sounds very simple and is of course a regular basic usage.

    However I can't speculate as to what could cause it without seeing details; there are some fairly complicated edgecases that you could be triggering, or it could even be caused through use of nondeterministic variables. Or it could be a bug that somehow impacted your particular configuration.

    Let's transfer this to a support ticket, so we can attach files and get a little faster response time from support team. If anything of note happens, then let's summarize our back-and-forth as another post on this Q&A forum.



  • Hi Guys,

    Did you get a result for this?

    Im doing a similar thing in terms of simple configuration plans (in some cases just ensuring the status of a folder on a drive) and while the execution log shows that it runs fine, the results in the server list do not show me the status of every server. If I run the different plans for each role independently, only the results of the last run are available.

    Thanks,

    Clint



  • Clint,

    Not yet. I have a support ticket in and I'll post here if I find anything out. For the time being I'm just running a recurring reconfiguration plan every 5 minutes to execute the plan and this appears to show results for all servers.



  • Just to close out this topic, the unpredictable results are what we would expect given the configuration. Here's why...

    Servers were given a role with the following configuration:

    PSEnsure
    (
        Key: Rebuilt,
        Value: True,
        Collect: Test-Path C:\Temp\buildfinished.txt,
        Configure: '"Needs Repair"'
    );
    

    This role does not have the ability to configure itself. That's what 'Configure' is supposed to do; i.e. contain a powershell script to bring the server in the desired state of configuration. Instead, it simply writes a value to the logs (which is ignored for configuration purposes).

    As a result, here's what's happening...

    1. Configuration run occurs; if the file doesn't exist, "False" is returned (which doesn't match the expected value of "True"); this puts the server in Drift state

    2. Remediation run occurs; the Configure script is run, which actually doesn't do anything, and then "True" is set as the current configuration

    ... basically it causes an unending loop of drift, because the role cannot remediate itself. If you have some servers set to automatically remediate drift, the results will probably be even more strange. If, however, the Configure script wrote out a file called "buildfinished.txt", then it would be fine.

    One point of confusion might be... when a remediation run occurs, only the minimal configuration components are run. So, if you had another role with another block that was supposed to actually do the remediation, then it won't run if the server is in drift (unless you provide special instructions to do so).

    Please let us know if this was the case, so we can improve docs!



  • There wasn't another role doing remediation. This particular instance was just supposed to be a simple check for a file just for display. I have orchestration plans that run and actually build servers.

    Other points of interest however:

    Why does running the configuration job for role Rebuild then return result for all servers, but the recurring job does not?

    I saw the same results with a more complete role configuration using the OtterScript "Ensure File" that would create the file as needed with remediation.


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation