Error 404 OK when clicking day 2 task "Add disk " to Cloud_Machine with Service Broker User role in Resources
search cancel

Error 404 OK when clicking day 2 task "Add disk " to Cloud_Machine with Service Broker User role in Resources

book

Article ID: 375337

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

Error 404 OK when executing day 2 actions with Service Broker User role in Resources whereas the same user can perform the same actions from within Deployments

Steps to reproduce the issue : - 

  • Login with user with Service Broker user role and from the Resources select the VM and click on actions for Virtual machines. This throws error 404 OK.

Environment

Aria Automation 8.17.x, 8.18.0

Cause

DeploymentId is missing in the requests with the 404 response

2024-08-20T16:25:55.516Z ERROR form-service [host='form-service-app-5cfd684bfb-rs6mh' thread='reactor-http-epoll-1' user='<User_name>' org='<Org ID>' trace='<Trace ID>' parent='<Parent ID>' span='<ID>'] c.v.form.server.util.FormWebClientUtil - Received error response from remote due to: ServiceClientResponseError(message=No static resource deployment/api/deployments/resources/UUID., statusCode=404, errorCode=0)

2024-08-20T16:25:55.517Z DEBUG form-service [host='form-service-app-5cfd684bfb-rs6mh' thread='reactor-http-epoll-1' user='' org='' trace='' parent='' span=''] o.s.b.a.w.r.e.AbstractErrorWebExceptionHandler - [1932425c-113866] Resolved [ResponseStatusException: 404 NOT_FOUND "Failed to validate form source due to: "] for HTTP POST /form-service/api/forms/renderer/model

2024-08-20T16:25:55.518Z INFO form-service [host='form-service-app-5cfd684bfb-rs6mh' thread='reactor-http-epoll-2' user='' org='' trace='' parent='' span=''] reactor.netty.http.server.AccessLog - 10.6.0.239 - - [20/Aug/2024:16:25:55 +0000] "POST /form-service/api/forms/renderer/model?formType=requestForm&isUpdateAction=false&formId=&projectId=<ID>&resourceId=<ID>d&deploymentId=&sourceType=resource.action&sourceId=Cloud.vSphere.Machine.Add.Disk HTTP/1.1" 404 489 8383 32 ms 

Additional causation info:

  • An example of a call that causes the issue:

https://{{host}}/form-service/api/forms/renderer/model?formType=requestForm&isUpdateAction=false&formId=&projectId={{projectID}}&resourceId={{resourceID}}&deploymentId=&sourceType=resource.action&sourceId=Cloud.vSphere.Machine.Compute.Disk.Resize

  • When a call is made from the machines datagrid, the parameter deploymentId is provided empty. When it is done from the deployment, the parameter deploymentId is not empty but the actual deployment ID is provided.

    From the har file provided it can clearly be seen that this request is the problem:
    https://host/form-service/api/forms/renderer/model?formType=requestForm&isUpdateAction=false&formId=&projectId=<ID>&resourceId=<ID>&deploymentId=&sourceType=resource.action&sourceId=Cloud.vSphere.Machine.Compute.Disk.Resize
    {
        "timestamp": "2024-06-14T21:54:13.461+0000",
        "path": "/form-service/api/forms/renderer/model",
        "status": 404,
        "error": "Not Found",
        "message": "404 NOT_FOUND \"Failed to validate form source due to: \"; nested exception is org.springframework.web.server.ResponseStatusException: 404 NOT_FOUND",
        "requestId": "<ID>",
        "@type": "org.springframework.web.server.ResponseStatusException",
        "cause": {
            "message": "404 NOT_FOUND",
            "@type": "org.springframework.web.server.ResponseStatusException"
        }
    }

Resolution

This is a known issue and has been fixed in Aria Automation 8.18.1.

Release Notes: https://docs.vmware.com/en/VMware-Aria-Automation/services/rn/vmware-aria-automation-release-notes/index.html

 

Workaround for this issue:

  1. Instead of going through the Virtual machines selection in service broker>resources, going through deployments by selecting the deployment and performing the action on the server resource.
  2. When an action is performed from deployment it opens successfully.
  3. Login with user with service Broker Administrator role Add disk works for both Resources and Deployment.