[
https://issues.apache.org/jira/browse/CLOUDSTACK-9365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15266567#comment-15266567
]
ASF GitHub Bot commented on CLOUDSTACK-9365:
--------------------------------------------
Github user singalrahul commented on the pull request:
https://github.com/apache/cloudstack/pull/1523#issuecomment-216230102
test_deploy_vm_userdata_MultiNic.py script is added for the verification of
this Bug. It will verify that a user can deploy MultiNic VM when non-default
nic does not have userdata service and can also update vm userdata.
Before Fix, below was the result:-
Test userdata update when non default nic is without userdata ... ===
TestName: test_deployvm_multiNic | Status : FAILED ===
FAIL
======================================================================
FAIL: Test userdata update when non default nic is without userdata
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/pmanthen/test_deploy_vm_userdata_MultiNic.py", line 183, in
test_deployvm_multiNic
self.fail("Failed to update userdata: %s" % e)
AssertionError: Failed to update userdata: Execute cmd:
updatevirtualmachine failed, due to: errorCode: 530, errorText:Service UserData
is not supported in the network id=237
-------------------- >> begin captured stdout << ---------------------
=== TestName: test_deployvm_multiNic | Status : FAILED ===
[failed_plus_exceptions.txt](https://github.com/apache/cloudstack/files/245103/failed_plus_exceptions.txt)
[results.txt](https://github.com/apache/cloudstack/files/245104/results.txt)
[runinfo.txt](https://github.com/apache/cloudstack/files/245105/runinfo.txt)
After the Fix:-
Test userdata update when non default nic is without userdata for deploy
and update ... === TestName: test_deployvm_multinic | Status : SUCCESS ===
ok
----------------------------------------------------------------------
Ran 1 test in 40.583s
OK
[results.txt](https://github.com/apache/cloudstack/files/245106/results.txt)
[runinfo.txt](https://github.com/apache/cloudstack/files/245107/runinfo.txt)
> updateVirtualMachine with userdata should not error when a VM is attached to
> multiple networks from which one or more doesn't support userdata
> ----------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-9365
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9365
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Reporter: Nick Livens
> Assignee: Nick Livens
>
> Steps to reproduce :
> 1. Create 2 networks in ACS, one with userdata service enabled, one without
> 2. Deploy virtual machine, use the network which supports userdata as default
> 3. Update the userdata of the virtualmachine
> The following exception is thrown :
> {noformat:title=Exception for network which doesn't support userdata}
> 2016-04-22 00:42:14,864 DEBUG [c.c.n.NetworkModelImpl]
> (catalina-exec-25:ctx-b6778596 ctx-707ee023 ctx-a7e4c59b) (logid:a93c19d7)
> Service SecurityGroup is not supported in the network id=263
> 2016-04-22 00:42:14,865 DEBUG [o.s.b.f.s.DefaultListableBeanFactory]
> (catalina-exec-25:ctx-b6778596 ctx-707ee023 ctx-a7e4c59b) (logid:a93c19d7)
> Returning cached instance of singleton bean 'messageBus'
> 2016-04-22 00:42:14,885 ERROR [c.c.a.ApiServer]
> (catalina-exec-25:ctx-b6778596 ctx-707ee023 ctx-a7e4c59b) (logid:a93c19d7)
> unhandled exception executing api command: [Ljava.lang.String;@2babc2e4
> com.cloud.exception.UnsupportedServiceException: Service UserData is not
> supported in the network id=263
> at
> com.cloud.network.dao.NetworkServiceMapDaoImpl.getProviderForServiceInNetwork(NetworkServiceMapDaoImpl.java:126)
> at sun.reflect.GeneratedMethodAccessor622.invoke(Unknown Source)
> 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
> com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
> 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.$Proxy40.getProviderForServiceInNetwork(Unknown
> Source)
> at
> com.cloud.network.NetworkModelImpl.getUserDataUpdateProvider(NetworkModelImpl.java:888)
> at
> com.cloud.vm.UserVmManagerImpl.updateUserDataInternal(UserVmManagerImpl.java:2501)
> at
> com.cloud.vm.UserVmManagerImpl.updateVirtualMachine(UserVmManagerImpl.java:2474)
> at
> com.cloud.vm.UserVmManagerImpl.updateVirtualMachine(UserVmManagerImpl.java:2340)
> 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)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)