Navigation

    Inedo Community Forums

    Forums

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. jimbobmcgee
    3. Topics
    J
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Topics created by jimbobmcgee

    • J

      Suggestion: allow Execute-Powershell to return output stream and/or capture output variables
      Support • • jimbobmcgee  

      5
      0
      Votes
      5
      Posts
      17
      Views

      dean-houston

      @jimbobmcgee thanks; we'll definitely investigate this later, but it will likely not be for a few months until we can do some "heads down" time with this stuff Honestly I don't remember how any of this works, so I could be wrong and you need to do something else. It's clearly not something we document. Our primary use case is more like this, uploading basic scripts: https://docs.inedo.com/docs/otter/scripting-in-otter/otter-scripting-powershell
    • J

      PSEval can be called as $PSEval, @PSEval or %PSEval, but null/empty returns only make sense for $PSEval
      Support • • jimbobmcgee  

      3
      0
      Votes
      3
      Posts
      8
      Views

      J

      @dean-houston said in PSEval can be called as $PSEval, @PSEval or %PSEval, but null/empty returns only make sense for $PSEval: a variable prefix ($, @, %) is more of a convenience/convention, and the prefix isn't really available in any useful context. I'm almost certain you can do stuff like $MyVar = @(1,2,3) for example. For what it is worth, if this is the intent, then it does not match what actually occurs. The execution engine throws exceptions when you mismatch the variable types: # mixed sigils { set $ok = ""; set $no = ""; try { set $a = "blah"; set $ok = $ok: scalar; } catch { set $no = $no: scalar; force normal; } try { set $b = @(1,2,3); set $ok = $ok: vector-as-scalar; } catch { set $no = $no: vector-as-scalar; force normal; } try { set $c = %(a: 1, b: 2); set $ok = $ok: map-as-scalar; } catch { set $no = $no: map-as-scalar; force normal; } try { set @d = "blah"; set $ok = $ok: scalar-as-vector; } catch { set $no = $no: scalar-as-vector; force normal; } try { set @e = @(1,2,3); set $ok = $ok: vector; } catch { set $no = $no: vector; force normal; } try { set @f = %(a: 1, b: 2); set $ok = $ok: map-as-vector; } catch { set $no = $no: map-as-vector; force normal; } try { set %g = "blah"; set $ok = $ok: scalar-as-map; } catch { set $no = $no: scalar-as-map; force normal; } try { set %h = @(1,2,3); set $ok = $ok: vector-as-map; } catch { set $no = $no: vector-as-map; force normal; } try { set %i = %(a: 1, b: 2); set $ok = $ok: map; } catch { set $no = $no: map; force normal; } Log-Information Mixed sigils: success${ok}, fail${no}; } DEBUG: Beginning execution run... ERROR: Unhandled exception: System.ArgumentException: Cannot assign a Vector value to a Scalar variable. at Inedo.ExecutionEngine.Executer.ExecuterThread.InitializeVariable(RuntimeVariableName name, RuntimeValue value, VariableAssignmentMode mode) at Inedo.ExecutionEngine.Executer.ExecuterThread.ExecuteAsync(AssignVariableStatement assignVariableStatement) at Inedo.ExecutionEngine.Executer.ExecuterThread.ExecuteNextAsync() ERROR: Unhandled exception: System.ArgumentException: Cannot assign a Map value to a Scalar variable. at Inedo.ExecutionEngine.Executer.ExecuterThread.InitializeVariable(RuntimeVariableName name, RuntimeValue value, VariableAssignmentMode mode) at Inedo.ExecutionEngine.Executer.ExecuterThread.ExecuteAsync(AssignVariableStatement assignVariableStatement) at Inedo.ExecutionEngine.Executer.ExecuterThread.ExecuteNextAsync() ERROR: Unhandled exception: System.ArgumentException: Cannot assign a Scalar value to a Vector variable. at Inedo.ExecutionEngine.Executer.ExecuterThread.InitializeVariable(RuntimeVariableName name, RuntimeValue value, VariableAssignmentMode mode) at Inedo.ExecutionEngine.Executer.ExecuterThread.ExecuteAsync(AssignVariableStatement assignVariableStatement) at Inedo.ExecutionEngine.Executer.ExecuterThread.ExecuteNextAsync() ERROR: Unhandled exception: System.ArgumentException: Cannot assign a Map value to a Vector variable. at Inedo.ExecutionEngine.Executer.ExecuterThread.InitializeVariable(RuntimeVariableName name, RuntimeValue value, VariableAssignmentMode mode) at Inedo.ExecutionEngine.Executer.ExecuterThread.ExecuteAsync(AssignVariableStatement assignVariableStatement) at Inedo.ExecutionEngine.Executer.ExecuterThread.ExecuteNextAsync() ERROR: Unhandled exception: System.ArgumentException: Cannot assign a Scalar value to a Map variable. at Inedo.ExecutionEngine.Executer.ExecuterThread.InitializeVariable(RuntimeVariableName name, RuntimeValue value, VariableAssignmentMode mode) at Inedo.ExecutionEngine.Executer.ExecuterThread.ExecuteAsync(AssignVariableStatement assignVariableStatement) at Inedo.ExecutionEngine.Executer.ExecuterThread.ExecuteNextAsync() ERROR: Unhandled exception: System.ArgumentException: Cannot assign a Vector value to a Map variable. at Inedo.ExecutionEngine.Executer.ExecuterThread.InitializeVariable(RuntimeVariableName name, RuntimeValue value, VariableAssignmentMode mode) at Inedo.ExecutionEngine.Executer.ExecuterThread.ExecuteAsync(AssignVariableStatement assignVariableStatement) at Inedo.ExecutionEngine.Executer.ExecuterThread.ExecuteNextAsync() INFO : Mixed sigils: success: scalar: vector: map, fail: vector-as-scalar: map-as-scalar: scalar-as-vector: map-as-vector: scalar-as-map: vector-as-map There are also syntax elements which require specific context, such as foreach requiring a @vec (Iteration source must be a vector value). I can certainly understand why you would not want to update the base classes so they provide the context (scalar, vector, map) to implementations but I expect it is probably the safest solution for maintaining backwards compatibility with existing authored scripts (if that information is available to you at parse-time). The alternative is to let the script author pass it along as an optional property to $PSEval() (similar to $GetVariableValue()), but this introduces another character which would then need to be escaped within the embedded Powershell (i.e. ,), and that probably would break authored scripts.
    • J

      Suggestion: allow for setting list or map elements by dynamic index or key (@ListSet, %MapSet)
      Support • • jimbobmcgee  

      6
      0
      Votes
      6
      Posts
      16
      Views

      dean-houston

      @jimbobmcgee fantastic, we'll review/merge soon! thanks much :)
    • J

      "Log scope Execution has already been completed" exception after OSCall
      Support • otter otterscript • • jimbobmcgee  

      2
      0
      Votes
      2
      Posts
      12
      Views

      dean-houston

      Hi @jimbobmcgee , Thanks for all the details; we plan to review/investigate this via OT-518 in an upcoming maintenance release, likely in the next few two-week cycles. -- Dean
    • J

      Changing server context in the middle of a script
      Support • • jimbobmcgee  

      6
      0
      Votes
      6
      Posts
      25
      Views

      atripp

      @jimbobmcgee that's too bad it didn't work :( That's probably why we didn't update the page in Otter 2024 to work with those types from BuildMaster... and as you saw from the code, it's probably not trivial. I know that some of the other platform modernization efforts (especially with HTTP/S support) took a lot longer. I guess the only option for now is to just add a list of server names. This is still on our roadmap, but rewriting the page is more than we can do in a scope of a fix like this.
    • J

      Otter server receives thousands of connections from agent after reboot
      Support • otter agents bug • • jimbobmcgee  

      5
      0
      Votes
      5
      Posts
      21
      Views

      J

      @stevedennis I understand not wanting to go in blind on something so low-level. For what it is worth, the monkey-patch I applied has been stable, so far, in my lab environment. Let me know if you need me to test a build, prior to Otter 2025.
    • J

      Improper output encoding in Execution Details page
      Support • bug • • jimbobmcgee  

      2
      0
      Votes
      2
      Posts
      10
      Views

      atripp

      @jimbobmcgee thank you again for the very detailed analysis; we will get this fixed via OT-515, it's most an easy encoding to add
    • J

      HTTP/500 error when re-running a job from History which has a blank/empty template variables
      Support • otter • • jimbobmcgee  

      6
      0
      Votes
      6
      Posts
      20
      Views

      atripp

      @jimbobmcgee excellent thanks!! Release has been published then :)
    • J

      "Bad handshake" when listening for agent
      Support • otter inedo-agent • • jimbobmcgee  

      2
      0
      Votes
      2
      Posts
      11
      Views

      atripp

      Hi @jimbobmcgee , The "Bad handshake" error is occurring (as you probably guessed) while trying to establish SSL tunnel. This basically occurs at the operating system level, and is usually a total mystery. The underlying error seems to be coming from SSPIWrapper.AcquireCredentialsHandle, and is just this: (0x8009030D): The credentials supplied to the package were not recognized I have absolutely no idea what that means, but... there's a ton of things I found via searching. A few articles are suggesting that it means lack of access to read the private key Maybe it's in the wrong folder (on the Otter server)? I think it needs to be in "Personal" folder of "Machine" certificates, but it sounds like it's definitely something wrong with Otter reading the certificate.... Let us now if you find out more! Hope that helps, Alana
    • J

      API method to get a specific object by name
      Support • otter api feature-request • • jimbobmcgee  

      3
      0
      Votes
      3
      Posts
      14
      Views

      rhessinger

      Hi @jimbobmcgee, I just wanted to let you know that we just released Otter 2023 and it includes the name filter on the List action type on the Infrastructure API. Thanks, Rich
    • J

      Apply-Template adding unexpected CR newline chars
      Support • otter templates • • jimbobmcgee  

      8
      0
      Votes
      8
      Posts
      20
      Views

      dean-houston

      @jimbobmcgee said in Apply-Template adding unexpected CR newline chars: Without wanting to hold you to a particular date, what is the typical release timeframe? We're targeting BuildMaster 2023 for Q3/Q4 and Otter for Q4. We don't have any dates beyond that at this point. And it sounds like you understand quite well why we're not so keen to jump on making relatively easy changes - definitely a lot to consider. We have a lot of "product debt" like this and have learned to be a lot more cautious. That said, I think as long as it's documented it's probably okay. That's the hard part of course (writing docs) - but there's a Note attributes that can be added to explain things as well. cheers!
    • J

      Basic arithmetic in OtterScript
      Support • otterscript • • jimbobmcgee  

      8
      0
      Votes
      8
      Posts
      22
      Views

      atripp

      Hi @jimbobmcgee, I fixed this via OT-493 FIX; Custom Server Targeting should be selectable if the script type is OtterScript. It was a regression in the job template editor. Am I right in saying that for server is only expected to work for Custom server targeting, though? Correct; as of Otter v3 it's no longer supported in other scenarios. And for server can take a scalar variable argument, such as... Also correct, so the code you shared should work!
    • J

      SSH password authentication vs keyboard-interactive
      Support • • jimbobmcgee  

      5
      0
      Votes
      5
      Posts
      13
      Views

      J

      @apxltd; apologies for the delay; I did not get a notification. Essentially, it is a chicken-and-egg problem. Enabling key-based, non-interactive login was one of the things I was hoping to automate/remediate with Otter; instead it is currently a prerequisite to using Otter. The device is not a 'server' per se, but a third-party 'appliance' built on top of Linux. The device image itself comes prebuilt with keyboard-interactive auth (not password) enabled. Having Otter support keyboard-interactive seemed more beneficial to a wider audience, than trying to alter the appliance software.
    • J

      Onboarding duplicated template VMs to Otter
      Support • otter • • jimbobmcgee  

      2
      0
      Votes
      2
      Posts
      13
      Views

      atripp

      Hi @jimbobmcgee , The "Secret key" field is just an arbitrary string that needs to match on both the Agent and the Otter Server; it needs to be unique across your servers, as its used to uniquely identify an incoming agent connection. The UI generates a random string, but you can enter whatever you'd like. There needs to be a Server record on the Otter server (i.e. on the "Servers" page) before an agent can connect to Otter. This is true for either Incoming or Outgoing communication modes. This is often called "server registration". One option is to servers self-register in Incoming mode; you can have the the following script on first boot: Generate a random string ("secret key"); you could use a GUID use the Infrastructure API from the server to "register" the server using that key edit the agent configuration file to have that key start the Inedo agent service Hope that helps, Alana
    • 1 / 1