[
https://issues.apache.org/jira/browse/CLOUDSTACK-5873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13871664#comment-13871664
]
Mike Tutkowski commented on CLOUDSTACK-5873:
--------------------------------------------
I have a fix in place that would put the functionality here back the way it was.
HOWEVER: My testing has uncovered a problem with starting a VM after you attach
a disk to the VM (when the VM has never been started before). I have observed
this on XenServer.
These steps fail (likely this is nothing new in 4.3):
1) Deploy a VM in the stopped state.
2) Attach a disk to the VM.
3) Start the VM
Step 3 fails with an InsufficientServerCapacityException.
If you detach the disk, then start the VM, it works. You may then attach the
disk either while the VM is running or stopped and it works. The problem
appears to be only when you attach a disk to a VM that has never been started
before, then start the VM.
I plan to test this on VMware and KVM soon.
> [Automation] Failed to attach volume to VM, if the vm is created with option
> startvm=false
> ------------------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-5873
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5873
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Management Server, Volumes
> Affects Versions: 4.3.0
> Environment: KVM
> Build RHEL 6.3
> Reporter: Rayees Namathponnan
> Assignee: Mike Tutkowski
> Priority: Critical
> Fix For: 4.3.0
>
> Attachments: Regression_basic_KVM.rar
>
>
> Regression automation failure
> test_stopped_vm.py:test_04_deploy_startvm_false_attach_volume
> Steps to reproduce
> Validate the following:
> 1. deploy Vm with the startvm=false. Attach volume to the instance
> 2. listVM command should return the deployed VM.State of this VM should be
> "Stopped".
> 3. Attach volume should be successful
> Attach volume failed with NPE
> 2014-01-08 18:58:19,204 INFO [c.c.s.VolumeApiServiceImpl]
> (Job-Executor-84:ctx-b175478d ctx-1c48338d) Trying to attaching volume 60 to
> vm instance:44, update async job-265 progress status
> 2014-01-08 18:58:19,204 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl]
> (Job-Executor-84:ctx-b175478d ctx-1c48338d) Update async-job attachment,
> job-265, instanceType: volume, instanceId: 60
> 2014-01-08 18:58:19,218 ERROR [c.c.a.ApiAsyncJobDispatcher]
> (Job-Executor-84:ctx-b175478d) Unexpected exception while executing
> org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd
> java.lang.NullPointerException
> at
> com.cloud.storage.VolumeApiServiceImpl.sendAttachVolumeCommand(VolumeApiServiceImpl.java:1964)
> at
> com.cloud.storage.VolumeApiServiceImpl.attachVolumeToVM(VolumeApiServiceImpl.java:1304)
> at
> com.cloud.storage.VolumeApiServiceImpl.orchestrateAttachVolumeToVM(VolumeApiServiceImpl.java:1129)
> at
> com.cloud.storage.VolumeApiServiceImpl.attachVolumeToVM(VolumeApiServiceImpl.java:1104)
> 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:616)
> 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.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 $Proxy195.attachVolumeToVM(Unknown Source)
> at
> org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd.execute(AttachVolumeCmd.java:123)
> at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:161)
> at
> com.cloud.api.ApiAsyncJobDispatcher.runJobInContext(ApiAsyncJobDispatcher.java:109)
> at com.cloud.api.ApiAsyncJobDispatcher$1.run(ApiAsyncJobDispatcher.java:66)
> 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 com.cloud.api.ApiAsyncJobDispatcher.runJob(ApiAsyncJobDispatcher.java:63)
> at
> org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:524)
> 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 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:679)
> 2014-01-08 18:58:19,219 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl]
> (Job-Executor-84:ctx-b175478d) Complete async job-265, jobStatus: FAILED,
> resultCode: 530, result:
> org.apache.cloudstack.api.response.ExceptionResponse/null/
> {"uuidList":[],"errorcode":530}
> 2014-01-08 18:58:19,232 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl]
> (Job-Executor-84:ctx-b175478d) Done executing
> org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd for job-265
> 2014-01-08 18:58:19,236 INFO [o.a.c.f.j.i.AsyncJobMonitor]
> (Job-Executor-84:ctx-b175478d) Remove job-265 from job monitoring
> 2014-01-08 18:58:20,597 DEBUG [c.c.a.ApiServlet]
> (catalina-exec-9:ctx-4791b841) ===START=== 10.223.240.193 – GET
> signature=zWhYQek99v6TokECXofkjhdLMzA%3D&apiKey=7M0wBUjBvlmrtiVOBaaghqoWCWhCHc8KRxaXNoIABFtW0892eq9rU9zEd63eNeV7B5gsMblSge2HqGveZXe_hA&command=queryAsyncJobResult&response=json&jobid=66de79c1-8fc6-4b21-942c-93aa27ee2828
> :
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)