prashant kumar mishra created CLOUDSTACK-6706: -------------------------------------------------
Summary: Not able to update network offering because :Invalid network domain. Total length shouldn't exceed 190 chars. Each domain label must be between 1 and 63 characters... Key: CLOUDSTACK-6706 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-6706 Project: CloudStack Issue Type: Bug Security Level: Public (Anyone can view this level - this is the default.) Components: Network Controller Affects Versions: 4.4.0 Reporter: prashant kumar mishra Priority: Critical Fix For: 4.4.0 steps to reproduce =============== 1-prepare a CS setup and create a network offering and create a network(without any network domain) 2-deploy a vm using network created in step 1 3-try to update network to new new network offering Exception: ======== 2014-05-19 05:41:19,915 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (catalina-exec-21:ctx-2ea42397 ctx-c0d5d6b7) submit async job-175, details: AsyncJobVO {id:175, userId: 2, accountId: 2, instanceType: None, instanceId: null, cmd: org.apache.cloudstack.api.command.admin.network.UpdateNetworkCmdByAdmin, cmdInfo: {"changecidr":"false","sessionkey":"hQuvq/8XCHOm2Yt5N5gPNmpB4HQ\u003d","cmdEventType":"NETWORK.UPDATE","ctxUserId":"2","networkdomain":"","networkofferingid":"a8e65b9d-de21-46a3-9976-8fed23a4369e","httpmethod":"GET","id":"9a303408-5c88-4879-8fdd-8205eb540d2b","response":"json","ctxDetails":"{\"Network\":\"9a303408-5c88-4879-8fdd-8205eb540d2b\",\"com.cloud.offering.NetworkOffering\":19,\"com.cloud.network.Network\":213}","name":"newtest2","displaytext":"newtest2","_":"1400492460588","uuid":"9a303408-5c88-4879-8fdd-8205eb540d2b","ctxAccountId":"2","ctxStartEventId":"387"}, cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid: 7672522866886, completeMsid: null, lastUpdated: null, lastPolled: null, created: null} 2014-05-19 05:41:19,916 DEBUG [c.c.a.ApiServlet] (catalina-exec-21:ctx-2ea42397 ctx-c0d5d6b7) ===END=== 10.252.192.60 -- GET command=updateNetwork&response=json&sessionkey=hQuvq%2F8XCHOm2Yt5N5gPNmpB4HQ%3D&id=9a303408-5c88-4879-8fdd-8205eb540d2b&name=newtest2&displaytext=newtest2&networkdomain=&networkofferingid=a8e65b9d-de21-46a3-9976-8fed23a4369e&changecidr=false&_=1400492460588 2014-05-19 05:41:19,917 INFO [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-13:job-175) Add job-175 into job monitoring 2014-05-19 05:41:19,917 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-13:job-175) Executing AsyncJobVO {id:175, userId: 2, accountId: 2, instanceType: None, instanceId: null, cmd: org.apache.cloudstack.api.command.admin.network.UpdateNetworkCmdByAdmin, cmdInfo: {"changecidr":"false","sessionkey":"hQuvq/8XCHOm2Yt5N5gPNmpB4HQ\u003d","cmdEventType":"NETWORK.UPDATE","ctxUserId":"2","networkdomain":"","networkofferingid":"a8e65b9d-de21-46a3-9976-8fed23a4369e","httpmethod":"GET","id":"9a303408-5c88-4879-8fdd-8205eb540d2b","response":"json","ctxDetails":"{\"Network\":\"9a303408-5c88-4879-8fdd-8205eb540d2b\",\"com.cloud.offering.NetworkOffering\":19,\"com.cloud.network.Network\":213}","name":"newtest2","displaytext":"newtest2","_":"1400492460588","uuid":"9a303408-5c88-4879-8fdd-8205eb540d2b","ctxAccountId":"2","ctxStartEventId":"387"}, cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid: 7672522866886, completeMsid: null, lastUpdated: null, lastPolled: null, created: null} 2014-05-19 05:41:19,925 DEBUG [o.a.c.i.RoleBasedEntityAccessChecker] (API-Job-Executor-13:job-175 ctx-7943d027) IAM access check for 2-null-null-SystemCapability from cache: true 2014-05-19 05:41:19,925 DEBUG [c.c.u.AccountManagerImpl] (API-Job-Executor-13:job-175 ctx-7943d027) Root Access granted to Acct[66c18f4a-da84-11e3-a5a0-06fa660000c6-admin] by RoleBasedEntityAccessChecker 2014-05-19 05:41:19,926 DEBUG [o.a.c.i.RoleBasedEntityAccessChecker] (API-Job-Executor-13:job-175 ctx-7943d027) IAM access check for 2-null-null-DomainCapability from cache: false 2014-05-19 05:41:19,927 DEBUG [o.a.c.i.RoleBasedEntityAccessChecker] (API-Job-Executor-13:job-175 ctx-7943d027) IAM access check for 2-null-null-DomainResourceCapability from cache: false 2014-05-19 05:41:19,927 DEBUG [o.a.c.i.RoleBasedEntityAccessChecker] (API-Job-Executor-13:job-175 ctx-7943d027) IAM access check for 2-Network213-OperateEntry-updateNetwork from cache: true 2014-05-19 05:41:19,927 DEBUG [c.c.u.AccountManagerImpl] (API-Job-Executor-13:job-175 ctx-7943d027) Access to {Ntwk[9a303408-5c88-4879-8fdd-8205eb540d2b|Guest|18]} granted to Acct[66c18f4a-da84-11e3-a5a0-06fa660000c6-admin] by RoleBasedEntityAccessChecker 2014-05-19 05:41:19,927 WARN [c.c.a.d.ParamGenericValidationWorker] (API-Job-Executor-13:job-175 ctx-7943d027) Received unknown parameters for command updateNetwork. Unknown parameters : ctxdetails 2014-05-19 05:41:19,940 DEBUG [o.a.c.i.RoleBasedEntityAccessChecker] (API-Job-Executor-13:job-175 ctx-7943d027) IAM access check for 2-null-null-SystemCapability from cache: true 2014-05-19 05:41:19,940 DEBUG [c.c.u.AccountManagerImpl] (API-Job-Executor-13:job-175 ctx-7943d027) Root Access granted to Acct[66c18f4a-da84-11e3-a5a0-06fa660000c6-admin] by RoleBasedEntityAccessChecker 2014-05-19 05:41:19,941 DEBUG [o.a.c.i.RoleBasedEntityAccessChecker] (API-Job-Executor-13:job-175 ctx-7943d027) IAM access check for 2-null-null-DomainCapability from cache: false 2014-05-19 05:41:19,942 DEBUG [o.a.c.i.RoleBasedEntityAccessChecker] (API-Job-Executor-13:job-175 ctx-7943d027) IAM access check for 2-null-null-DomainResourceCapability from cache: false 2014-05-19 05:41:19,982 ERROR [c.c.a.ApiAsyncJobDispatcher] (API-Job-Executor-13:job-175) Unexpected exception while executing org.apache.cloudstack.api.command.admin.network.UpdateNetworkCmdByAdmin com.cloud.exception.InvalidParameterValueException: Invalid network domain. Total length shouldn't exceed 190 chars. Each domain label must be between 1 and 63 characters long, can contain ASCII letters 'a' through 'z', the digits '0' through '9', and the hyphen ('-'); can't start or end with "-" at com.cloud.network.NetworkServiceImpl.updateGuestNetwork(NetworkServiceImpl.java:2087) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) at com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:51) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy154.updateGuestNetwork(Unknown Source) at org.apache.cloudstack.api.command.admin.network.UpdateNetworkCmdByAdmin.execute(UpdateNetworkCmdByAdmin.java:50) at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:119) at com.cloud.api.ApiAsyncJobDispatcher.runJob(ApiAsyncJobDispatcher.java:108) at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:496) at org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49) at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56) at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103) at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53) at org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46) at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:453) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) 2014-05-19 05:41:19,984 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-13:job-175) Complete async job-175, jobStatus: FAILED, resultCode: 530, result: org.apache.cloudstack.api.response.ExceptionResponse/null/{"uuidList":[],"errorcode":530,"errortext":"Invalid network domain. Total length shouldn\u0027t exceed 190 chars. Each domain label must be between 1 and 63 characters long, can contain ASCII letters \u0027a\u0027 through \u0027z\u0027, the digits \u00270\u0027 through \u00279\u0027, and the hyphen (\u0027-\u0027); can\u0027t start or end with \"-\""} 2014-05-19 05:41:19,991 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-13:job-175) Done executing org.apache.cloudstack.api.command.admin.network.UpdateNetworkCmdByAdmin for job-175 2014-05-19 05:41:19,995 INFO [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-13:job-175) Remove job-175 from job monitoring 2014-05-19 05: -- This message was sent by Atlassian JIRA (v6.2#6252)