nvazquez opened a new pull request, #7455:
URL: https://github.com/apache/cloudstack/pull/7455
### Description
This PR fixes an issue occured when trying to add a second zone with
Tungsten Fabric. After completing all the values in the zone wizard creation,
then it fails with:
````
2023-04-21 15:25:12,123 DEBUG [c.c.a.ApiServlet]
(qtp1146825051-429:ctx-9e5afd56) (logid:feb8c33a) ===START=== 10.0.3.53 --
POST command=configTungstenFabr
icService&response=json
2023-04-21 15:25:12,123 DEBUG [c.c.a.ApiServlet]
(qtp1146825051-429:ctx-9e5afd56) (logid:feb8c33a) Two factor authentication is
already verified for the user
2, so skipping
2023-04-21 15:25:12,126 DEBUG [c.c.a.ApiServer]
(qtp1146825051-429:ctx-9e5afd56 ctx-505a264c) (logid:feb8c33a) CIDRs from which
account 'Account [{"accountNa
me":"admin","id":2,"uuid":"edd62913-df00-11ed-b02e-1e0005000194"}]' is
allowed to perform API calls: 0.0.0.0/0,::/0
2023-04-21 15:25:12,127 INFO [o.a.c.a.DynamicRoleBasedAPIAccessChecker]
(qtp1146825051-429:ctx-9e5afd56 ctx-505a264c) (logid:feb8c33a) Account [Account
[{"a
ccountName":"admin","id":2,"uuid":"edd62913-df00-11ed-b02e-1e0005000194"}]]
is Root Admin or Domain Admin, all APIs are allowed.
2023-04-21 15:25:12,128 WARN [o.a.c.a.ProjectRoleBasedApiAccessChecker]
(qtp1146825051-429:ctx-9e5afd56 ctx-505a264c) (logid:feb8c33a) Project is null,
Proj
ectRoleBasedApiAccessChecker only applies to projects, returning API
[configTungstenFabricService] for user [User
{"username":"admin","uuid":"edd73715-df00-1
1ed-b02e-1e0005000194"}.] as allowed.
2023-04-21 15:25:12,129 DEBUG [o.a.c.a.StaticRoleBasedAPIAccessChecker]
(qtp1146825051-429:ctx-9e5afd56 ctx-505a264c) (logid:feb8c33a) RoleService is
enabled
. We will use it instead of StaticRoleBasedAPIAccessChecker.
2023-04-21 15:25:12,129 DEBUG [o.a.c.r.ApiRateLimitServiceImpl]
(qtp1146825051-429:ctx-9e5afd56 ctx-505a264c) (logid:feb8c33a) API rate
limiting is disabled.
We will not use ApiRateLimitService.
2023-04-21 15:25:12,137 DEBUG [c.c.u.d.T.Transaction]
(qtp1146825051-429:ctx-9e5afd56 ctx-505a264c) (logid:feb8c33a) Rolling back the
transaction: Time = 4 N
ame = qtp1146825051-429; called by
-TransactionLegacy.rollback:888-TransactionLegacy.removeUpTo:831-TransactionLegacy.close:655-TransactionContextIntercepto
r.invoke:36-ReflectiveMethodInvocation.proceed:175-ExposeInvocationInterceptor.invoke:97-ReflectiveMethodInvocation.proceed:186-JdkDynamicAopProxy.invoke:215
-$Proxy65.persist:-1-ConfigTungstenFabricServiceCmd$2.doInTransactionWithoutResult:172-TransactionCallbackNoReturn.doInTransaction:25-Transaction$2.doInTrans
action:50
2023-04-21 15:25:12,138 ERROR [c.c.a.ApiServer]
(qtp1146825051-429:ctx-9e5afd56 ctx-505a264c) (logid:feb8c33a) unhandled
exception executing api command: [Lj
ava.lang.String;@1619e0a3
javax.persistence.EntityExistsException: Entity already exists
at
com.cloud.utils.db.GenericDaoBase.handleEntityExistsException(GenericDaoBase.java:859)
at
com.cloud.utils.db.GenericDaoBase.persist(GenericDaoBase.java:1487)
at jdk.internal.reflect.GeneratedMethodAccessor32.invoke(Unknown
Source)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at
com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
....
Caused by: java.sql.SQLIntegrityConstraintViolationException: Duplicate
entry '209-Connectivity-Tungsten' for key 'network_id'
at
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:117)
at
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at
com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
... 74 more
2023-04-21 15:25:12,157 DEBUG [c.c.a.ApiServlet]
(qtp1146825051-429:ctx-9e5afd56 ctx-505a264c) (logid:feb8c33a) ===END===
10.0.3.53 -- POST command=configTungstenFabricService&response=json
````
### Types of changes
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
### Feature/Enhancement Scale or Bug Severity
#### Feature/Enhancement Scale
- [ ] Major
- [ ] Minor
#### Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [ ] Minor
- [ ] Trivial
### Screenshots (if appropriate):
### How Has This Been Tested?
- Configure Tungsten Fabric in a zone
- Try to create a new zone with Tungsten Fabric isolation, complete all the
fields -> The process fails on the Tungsten provider configuration (after the
fix, it succeeds)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]