Andrei Mikhailovsky created CLOUDSTACK-8210:
-----------------------------------------------

             Summary: KVM Unable to Cancel Maintenance mode after upgrade
                 Key: CLOUDSTACK-8210
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8210
             Project: CloudStack
          Issue Type: Bug
      Security Level: Public (Anyone can view this level - this is the default.)
          Components: KVM, Management Server, Upgrade
    Affects Versions: 4.4.2
         Environment: Ubuntu 14.04 management and agents. Primary storage - 
ceph rbd. Secondary storage -nfs. Advanced Networking
            Reporter: Andrei Mikhailovsky


After performing an upgrade from 4.3.2 to 4.4.2 I am no longer able to Cancel 
Maintenance mode. The GUI shows the following error a few seconds after 
pressing the button:

Command failed due to Internal Server Error

The management server shows the following error:

2015-02-03 23:42:15,621 DEBUG [c.c.a.ApiServlet] (catalina-exec-23:ctx-04ea4b6d 
ctx-35701ff3) ===END===  192.168.169.91 -- GET  
command=cancelHostMaintenance&id=c092cb59-c770-4747-8d95-75aa49de5d17&response=json&sessionkey=fI2oaYTbgijs1h6HTOTMnJ%2FkChA%3D&_=1423006935464
2015-02-03 23:42:15,622 INFO  [o.a.c.f.j.i.AsyncJobMonitor] 
(API-Job-Executor-1:ctx-1fda9d17 job-11711) Add job-11711 into job monitoring
2015-02-03 23:42:15,623 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(API-Job-Executor-1:ctx-1fda9d17 job-11711) Executing AsyncJobVO {id:11711, 
userId: 3, accountId: 2, instanceType: Host, instanceId: 1, cmd: 
org.apache.cloudstack.api.command.admin.host.CancelMaintenanceCmd, cmdInfo: 
{"id":"c092cb59-c770-4747-8d95-75aa49de5d17","response":"json","sessionkey":"fI2oaYTbgijs1h6HTOTMnJ/kChA\u003d","ctxDetails":"{\"com.cloud.host.Host\":\"c092cb59-c770-4747-8d95-75aa49de5d17\"}","cmdEventType":"MAINT.CANCEL","ctxUserId":"3","httpmethod":"GET","_":"1423006935464","uuid":"c092cb59-c770-4747-8d95-75aa49de5d17","ctxAccountId":"2","ctxStartEventId":"64857"},
 cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: 
null, initMsid: 115129173025114, completeMsid: null, lastUpdated: null, 
lastPolled: null, created: null}
2015-02-03 23:42:15,646 ERROR [c.c.a.ApiAsyncJobDispatcher] 
(API-Job-Executor-1:ctx-1fda9d17 job-11711) Unexpected exception while 
executing org.apache.cloudstack.api.command.admin.host.CancelMaintenanceCmd
java.lang.NullPointerException
        at 
com.cloud.resource.ResourceManagerImpl.doCancelMaintenance(ResourceManagerImpl.java:2083)
        at 
com.cloud.resource.ResourceManagerImpl.cancelMaintenance(ResourceManagerImpl.java:2140)
        at 
com.cloud.resource.ResourceManagerImpl.cancelMaintenance(ResourceManagerImpl.java:1127)
        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.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.$Proxy148.cancelMaintenance(Unknown Source)
        at 
org.apache.cloudstack.api.command.admin.host.CancelMaintenanceCmd.execute(CancelMaintenanceCmd.java:102)
        at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:141)
        at 
com.cloud.api.ApiAsyncJobDispatcher.runJob(ApiAsyncJobDispatcher.java:108)
        at 
org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:503)
        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:460)
        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:745)
2015-02-03 23:42:15,648 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(API-Job-Executor-1:ctx-1fda9d17 job-11711) Complete async job-11711, 
jobStatus: FAILED, resultCode: 530, result: 
org.apache.cloudstack.api.response.ExceptionResponse/null/{"uuidList":[],"errorcode":530}
2015-02-03 23:42:15,664 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(API-Job-Executor-1:ctx-1fda9d17 job-11711) Done executing 
org.apache.cloudstack.api.command.admin.host.CancelMaintenanceCmd for job-11711


There is absolutely nothing in the agent logs even if I use the DEBUG logging.

I get the same error if I use CloudMonkey to cancel the Maintenance mode.

The database shows resource_state as Maintenance. There are no running vms on 
the host.

I can manually update the db resource_state to Enable and perform agent 
restart. After that the host is once again out of Maintenance mode and usable. 
If I do the Maintenance mode once again, I am unable to Cancel Maintenance mode.

I am running Ubuntu 14.04 on both the management server and the host agents. 




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to