Symptoms:
Public API to upload certificate bundle fails in VCF 4.3.x
Example:
The running the below API call can fail with 500 error:
curl '
https://<sddc-manager-fqdn>/v1/domains/<domain-name>/certificates/uploads' -i -X PUT \
-H 'Content-Type: multipart/form-data' \
-H 'Authorization: Bearer etHJRta....' \
-F '
[email protected];
/var/log/vmware/vcf/operationsmanager/operationsmanager.log
2022-02-17T20:00:53.666+0000 DEBUG [vcf_om,9c4dfb4634f44c14,1feb] [c.v.v.f.t.a.FunctionalityToggleAdapterImpl,http-nio-127.0.0.1-7300-exec-5] Calling functionality toggle api to check if UPLOAD_CERTIFICATES is supported with clusterId: null , domainId 6b11cde6-31f5-4a4c-86ff-b3e157c74b49
2022-02-17T20:00:53.671+0000 DEBUG [vcf_om,9c4dfb4634f44c14,1feb] [c.v.v.f.t.a.FunctionalityToggleAdapterImpl,http-nio-127.0.0.1-7300-exec-5] isFunctionalitySupported: {"supported":true}
2022-02-17T20:00:53.722+0000 WARN [vcf_om,9c4dfb4634f44c14,1feb] [o.s.w.s.m.s.DefaultHandlerExceptionResolver,http-nio-127.0.0.1-7300-exec-5] Resolved [org.springframework.web.multipart.support.MissingServletRequestPartException: Required request part 'file' is not present]
2022-02-17T20:00:53.740+0000 ERROR [vcf_om,9c4dfb4634f44c14,1feb] [c.v.e.s.e.h.VcfFallbackErrorController,http-nio-127.0.0.1-7300-exec-5] [T1K6PE] - Error attributes: {timestamp=Thu Feb 17 20:00:53 UTC 2022, status=400, error=Bad Request, exception=org.springframework.web.multipart.support.MissingServletRequestPartException, trace=org.springframework.web.multipart.support.MissingServletRequestPartException: Required request part 'file' is not present
at org.springframework.web.method.annotation.RequestParamMethodArgumentResolver.handleMissingValue(RequestParamMethodArgumentResolver.java:199)
at org.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver.resolveArgument(AbstractNamedValueMethodArgumentResolver.java:114)
at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:121)
at org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:167)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:134)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:878)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:792)