Skip to content

Commit 1acdbf8

Browse files
committed
CLOUDSTACK-5696: fix a regression caused by out-of-band sync changes
1 parent 5c77725 commit 1acdbf8

2 files changed

Lines changed: 12 additions & 9 deletions

File tree

‎api/src/com/cloud/vm/VirtualMachine.java‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
/**
3131
* VirtualMachine describes the properties held by a virtual machine
32-
*
32+
*
3333
*/
3434
public interface VirtualMachine extends RunningOn, ControlledEntity, Identity, InternalIdentity, StateObject<VirtualMachine.State> {
3535

@@ -117,7 +117,7 @@ public static StateMachine2<State, VirtualMachine.Event, VirtualMachine> getStat
117117
s_fsm.addTransition(State.Expunging, VirtualMachine.Event.ExpungeOperation, State.Expunging);
118118
s_fsm.addTransition(State.Error, VirtualMachine.Event.DestroyRequested, State.Expunging);
119119
s_fsm.addTransition(State.Error, VirtualMachine.Event.ExpungeOperation, State.Expunging);
120-
120+
121121
s_fsm.addTransition(State.Stopping, VirtualMachine.Event.FollowAgentPowerOnReport, State.Running);
122122
s_fsm.addTransition(State.Stopped, VirtualMachine.Event.FollowAgentPowerOnReport, State.Running);
123123
s_fsm.addTransition(State.Running, VirtualMachine.Event.FollowAgentPowerOnReport, State.Running);
@@ -126,8 +126,9 @@ public static StateMachine2<State, VirtualMachine.Event, VirtualMachine> getStat
126126
s_fsm.addTransition(State.Stopping, VirtualMachine.Event.FollowAgentPowerOffReport, State.Stopped);
127127
s_fsm.addTransition(State.Running, VirtualMachine.Event.FollowAgentPowerOffReport, State.Stopped);
128128
s_fsm.addTransition(State.Migrating, VirtualMachine.Event.FollowAgentPowerOffReport, State.Stopped);
129+
s_fsm.addTransition(State.Stopped, VirtualMachine.Event.FollowAgentPowerOffReport, State.Stopped);
129130
}
130-
131+
131132
public static boolean isVmStarted(State oldState, Event e, State newState) {
132133
if (oldState == State.Starting && newState == State.Running) {
133134
return true;
@@ -194,10 +195,10 @@ public enum Event {
194195
AgentReportMigrated,
195196
RevertRequested,
196197
SnapshotRequested,
197-
198+
198199
// added for new VMSync logic
199200
FollowAgentPowerOnReport,
200-
FollowAgentPowerOffReport,
201+
FollowAgentPowerOffReport,
201202
};
202203

203204
public enum Type {
@@ -214,7 +215,7 @@ public enum Type {
214215
* VM with this type. UserBareMetal should treat exactly as User.
215216
*/
216217
UserBareMetal(false),
217-
218+
218219
/*
219220
* General VM type for queuing VM orchestration work
220221
*/
@@ -274,7 +275,7 @@ public boolean isUsedBySystem() {
274275

275276
/**
276277
* returns the guest OS ID
277-
*
278+
*
278279
* @return guestOSId
279280
*/
280281
long getGuestOSId();
@@ -313,7 +314,7 @@ public boolean isUsedBySystem() {
313314
Date getCreated();
314315

315316
long getServiceOfferingId();
316-
317+
317318
Long getDiskOfferingId();
318319

319320
Type getType();

‎framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,9 @@ protected void runInContext() {
516516
if (jobDispatcher != null) {
517517
jobDispatcher.runJob(job);
518518
} else {
519-
s_logger.error("Unable to find a wakeup dispatcher from the joined job: " + job);
519+
// TODO, job wakeup is not in use yet
520+
if (s_logger.isTraceEnabled())
521+
s_logger.trace("Unable to find a wakeup dispatcher from the joined job: " + job);
520522
}
521523
} else {
522524
AsyncJobDispatcher jobDispatcher = getDispatcher(job.getDispatcher());

0 commit comments

Comments
 (0)