The Etag value in the HTTP header is returned in double quotes
search cancel

The Etag value in the HTTP header is returned in double quotes

book

Article ID: 327294

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

Symptoms:
  • You are using NSX for vSphere 6.4.5 or higher.
  • Performing Firewall operations via API call (PUT/POST/DELETE) fail with the following error:
<?xml version="1.0" encoding="UTF-8"?>
<error>
	<details>Precondition failed. Please update the current configuration with latest generation Number.</details>
	<errorCode>100030</errorCode>
	<moduleName>vShield App</moduleName>
</error>
  • In the NSX Manager logs (show log manager) shows messages similar to:
    
2019-05-22 04:02:10.988 GMT+00:00 ERROR http-nio-127.0.0.1-7441-exec-18 BaseRestController:521 - - [nsxv@6876 comp="nsx-manager" level="ERROR" subcomp="manager"] REST API failed : 'Precondition failed. Please update the current configuration with latest generation Number.'
com.vmware.vshield.app.firewall.exceptions.PreconditionFailedException: null
        at com.vmware.vshield.firewall.facade.impl.FirewallFacadeImpl.updateSection_aroundBody16(FirewallFacadeImpl.java:378) ~[app-1.0.jar:?]
        at com.vmware.vshield.firewall.facade.impl.FirewallFacadeImpl$AjcClosure17.run(FirewallFacadeImpl.java:1) ~[app-1.0.jar:?]
        at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96cproceed(AbstractTransactionAspect.aj:66) ~[spring-aspects-5.1.6.RELEASE.jar:5.1.6.RELEASE]
        at org.springframework.transaction.aspectj.AbstractTransactionAspect$AbstractTransactionAspect$1.proceedWithInvocation(AbstractTransactionAspect.aj:72) ~[spring-aspects-5.1.6.RELEASE.jar:5.1.6.RELEASE]
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) ~[spring-tx-5.1.6.RELEASE.jar:5.1.6.RELEASE]
        at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:70) ~[spring-aspects-5.1.6.RELEASE.jar:5.1.6.RELEASE]
[...]
Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.


Environment

VMware NSX for vSphere 6.4.x

Cause

Prior to NSX 6.4.5, the Etag header value was returned without being enclosed in double quotes.
Starting with NSX 6.4.5, the value of the Etag header is enclosed in double quotes.

Resolution

Currently, there is no resolution.

Workaround:
Remove the double quotes when using the Etag value in PUT/POST/DELETE API calls.