5 Replies Latest reply on Aug 4, 2020 7:51 AM by YordiDeRijcke

    Custom Resource not deploying Error 500

    DionRow Novice
    vExpert

      I was trying to make a simple custom resource in vra8.1 that does nothing except run a workflow and continue (just learning).

       

      I keep getting this error:

      Failed to get request status: 500 Internal Server Error from POST http://tango-vro-gateway.prelude.svc.cluster.local:8080/vro/blueprint/blueprint-provider-request?operation=status (InternalServerError)

      I see the vro workflow run and complete but still get the error.  The workflow takes in one string var and returns a string

       

      Am I misunderstanding this?

       

      IdeaS?

        • 1. Re: Custom Resource not deploying Error 500
          lnairn Expert
          VMware Employees

          Hi,

          Can you post the custom resource config in vRA?

           

          Did you see https://www.funkycloudmedina.com/2020/05/vra-8.1-custom-resource-error-http-500-when-creating-ad-user-custom-resource/ ? In that case the issue was related to a variable input.

           

          Regards,

           

          Leandro.

          • 2. Re: Custom Resource not deploying Error 500
            DionRow Novice
            vExpert

            formatVersion: 1

            inputs:

              hostname:

                type: string

                title: sourceFQDN

              domain:

                type: string

                title: domain

                enum:

                  - example.com

                  - example2.com

                default: example.com

              puppetRole:

                type: string

                title: Puppet Role

              NorthSouthRules:

                type: array

                title: North South Firewall Fules

                description: North South Firewall Fules to add for this machine

                items:

                  type: object

                  properties:

                    key:

                      type: string

                      title: sourceFQDN

                    value:

                      type: string

                      title: Protocol

                    value2:

                      type: string

                      title: Port

            resources:

              Custom_DionsTest_1:

                type: Custom.DionsTest

                properties:

                  thevar: '${input.hostname}.${input.domain}'

             

             

            the custom resource screen:

             

             

            and the DionsTestCustomWorkflow in VRO:

             

            I see the data come into the workflow and appear in the logs but after 4-5 minutes or so of the deployment just hanging like its still waiting for the workflow to return it fails with the 500 error:

             

            Failed to get request status: 500 Internal Server Error from POST http://tango-vro-gateway.prelude.svc.cluster.local:8080/vro/blueprint/blueprint-provider-request?operation=status (InternalServerError)

             

            • 3. Re: Custom Resource not deploying Error 500
              DionRow Novice
              vExpert

              I found out that you need to pass back a more complex plugin type that is understood by vro and is part of the Inventory tab.  This would include things like VC:VirtualMachine or VC:Folder etc.  Once I set this as the type it was on to the next problem.

               

              Apparently you can use Dynamic Types as well and send and return those as well which I ultimately am wanting but have yet to get this successfully working.

               

              dion

              • 4. Re: Custom Resource not deploying Error 500
                YordiDeRijcke Lurker

                Hello

                I am facing the same issue. If i understand correctly you cannot use a "simple" type like a string, etc. as External Type in the custom resource, it has to be a "complex" type like VC:VirtualMachine, etc?

                I've been looking into the Dynamic Types as well but I'm continuing to search for a simpler way for what I'm trying to do. The stupid part is that I don't need a complex type. A string as external object is all I need...

                 

                Have you gotten any success with the Dynamic Types?

                Regards, Yordi

                 

                EDIT: I assume the issue lies within the output of the create workflow of the custom resource, this should be the same as the external type if I understand correctly.

                Therefore you cannot use a "simple" type as output of the create workflow if what I'm stating above is correct.

                • 5. Re: Custom Resource not deploying Error 500
                  YordiDeRijcke Lurker

                  In my case, i only needed to keep a string as object. Because it is not possible to use "simple" objects as external type in custom resources, i created a Dynamic Type.

                  It is necesairry to create the "get <dynamic type name> by ID" workflow, in my case it creates a dynamic type filling the id and name with the string i actually care about. It basically converts a string into a Dynamic Type. This dynamic type can then be used in vRA/vRO.