Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d081efc
CLOUDSTACK-7727 Skip various BVT tests on LXC
alexbrett Oct 15, 2014
e225065
CLOUDSTACK-7731: UI > Infrastructure > Virtual Routers > group by zon…
Oct 16, 2014
c49a09f
CLOUDSTACK-7731: UI > Infrastructure > Virtual Routers > group by acc…
Oct 15, 2014
f8cbd6a
CLOUDSTACK-7736: UI - listView widget - select view dropdown on top o…
Oct 16, 2014
5e165d4
CLOUDSTACK-7731: UI > Infrastructure > Virtual Routers > group by XXX…
Oct 16, 2014
be60e46
CLOUDSTACK-7731: UI > Infrastructure > Virtual Routers > group by XXX…
Oct 16, 2014
c9dcae5
fix kvm issue, for windows sever 2008, it will crash without hyperv e…
sudison Oct 16, 2014
13decd4
CLOUDSTACK-7744: UI > Instances > detailView > Change Service Offerin…
Oct 16, 2014
f3e91bf
There are few cases that mgt server won't reponse agent's pingcommand…
sudison Oct 16, 2014
892b11e
Added /cloudstack/tools/appliance/packer/ directory and various packe…
Oct 17, 2014
7f55a1e
Replaced cloud-early-config.sh with test version
Oct 17, 2014
dbf12d5
CLOUDSTACK-7749: AsyncJob GC thread cannot purge queue items that hav…
minchen07 Oct 17, 2014
e796d41
CLOUDSTACK-5576: UI > IP Address > EnableVPN, DisableVPN: change label.
Oct 17, 2014
1fe8be7
Changes to cssysvm_template.json to try to correct problems with pres…
Oct 19, 2014
10f87af
Merge remote-tracking branch 'origin/master' into FEATURE-CENIK123-v1.1
Oct 19, 2014
287ff83
CLOUDSTACK-7754: Templates source_template_id is null when it is crea…
nitinmeh Oct 20, 2014
0cc5ee7
Update from pulls
Oct 21, 2014
cb76456
Fixed typo in preseed configuration file spec in the cssysvm.json fil…
Oct 23, 2014
b85b45f
Pull Commit
Oct 23, 2014
c9ca0b8
Vagrant validation changes
Oct 23, 2014
fdae4f4
Merge remote-tracking branch 'origin/master' into FEATURE-CENIK123-v1.1
Oct 23, 2014
eb74a6c
Merge remote-tracking branch 'origin/4.5' into FEATURE-CENIK123-v1.1
Oct 23, 2014
01c8ad8
Merge remote-tracking branch 'origin/master' into FEATURE-CENIK123-v1.1
Oct 23, 2014
3b6cdc4
Merge remote-tracking branch 'origin/master' into FEATURE-CENIK123-v1…
Oct 23, 2014
b281c52
Added new build script with automatic timestamps for vagrantfile. Vag…
Oct 23, 2014
5ffa6cb
Fixed build.sh errors and added separate folder for customized packer…
Oct 24, 2014
6a408d1
Updated build.sh to place Vagrantfile inside Vagrant Box file. Consol…
Oct 24, 2014
47d5838
Moved all output of build.sh to a folder: cloudstackroot/tools/applia…
Oct 27, 2014
9c85063
Build overlay changes and changes to Vagrantfile to add cdrom mount a…
Oct 31, 2014
53a9ac2
Add ignores for overlays and added CD mount to packer build.sh
Oct 31, 2014
2218308
Work in process for getting guest additions to work with systemvm ove…
Nov 7, 2014
750ae43
This commit is an archive commit/work in process commit to allow virt…
Nov 7, 2014
4cdd010
Working build systemvm with VirtualBox guest additions. Boots single …
Nov 10, 2014
947a066
Changed file references from relative to rooted in script variables
Nov 11, 2014
33724a1
Changed build.sh to use vagrant username when making Vagranfile, clea…
Nov 17, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'origin/master' into FEATURE-CENIK123-v1…
….1 (reverted from commit 01c8ad8)
  • Loading branch information
Karl Harris
Karl Harris committed Oct 23, 2014
commit 3b6cdc46e3f1df4e143507b1168a79dc28906314
1 change: 0 additions & 1 deletion api/src/com/cloud/agent/api/to/DiskTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public class DiskTO {
public static final String VOLUME_SIZE = "volumeSize";
public static final String MOUNT_POINT = "mountpoint";
public static final String PROTOCOL_TYPE = "protocoltype";
public static final String PATH = "path";

private DataTO data;
private Long diskSeq;
Expand Down
2 changes: 1 addition & 1 deletion api/src/com/cloud/host/Status.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public static String[] toStrings(Status... states) {
s_fsm.addTransition(Status.Connecting, Event.Ready, Status.Up);
s_fsm.addTransition(Status.Connecting, Event.PingTimeout, Status.Alert);
s_fsm.addTransition(Status.Connecting, Event.ShutdownRequested, Status.Disconnected);
s_fsm.addTransition(Status.Connecting, Event.HostDown, Status.Down);
s_fsm.addTransition(Status.Connecting, Event.HostDown, Status.Alert);
s_fsm.addTransition(Status.Connecting, Event.Ping, Status.Connecting);
s_fsm.addTransition(Status.Connecting, Event.ManagementServerDown, Status.Disconnected);
s_fsm.addTransition(Status.Connecting, Event.AgentDisconnected, Status.Alert);
Expand Down
5 changes: 5 additions & 0 deletions api/src/com/cloud/storage/Volume.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ enum State {
Ready("The volume is ready to be used."),
Migrating("The volume is migrating to other storage pool"),
Snapshotting("There is a snapshot created on this volume, not backed up to secondary storage yet"),
Reverting("Replace the existing volume on a storage system with a snapshot of it"),
Resizing("The volume is being resized"),
Expunging("The volume is being expunging"),
Expunged("The volume is being expunging"),
Expand Down Expand Up @@ -85,8 +86,11 @@ public String getDescription() {
s_fsm.addTransition(Expunging, Event.OperationSucceeded, Expunged);
s_fsm.addTransition(Expunging, Event.OperationFailed, Destroy);
s_fsm.addTransition(Ready, Event.SnapshotRequested, Snapshotting);
s_fsm.addTransition(Ready, Event.RevertRequested, Reverting);
s_fsm.addTransition(Snapshotting, Event.OperationSucceeded, Ready);
s_fsm.addTransition(Snapshotting, Event.OperationFailed, Ready);
s_fsm.addTransition(Reverting, Event.OperationSucceeded, Ready);
s_fsm.addTransition(Reverting, Event.OperationFailed, Ready);
s_fsm.addTransition(Ready, Event.MigrationRequested, Migrating);
s_fsm.addTransition(Migrating, Event.OperationSucceeded, Ready);
s_fsm.addTransition(Migrating, Event.OperationFailed, Ready);
Expand All @@ -111,6 +115,7 @@ enum Event {
UploadRequested,
MigrationRequested,
SnapshotRequested,
RevertRequested,
DestroyRequested,
ExpungingRequested,
ResizeRequested;
Expand Down
7 changes: 2 additions & 5 deletions core/src/com/cloud/storage/resource/StorageProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import org.apache.cloudstack.storage.command.DettachCommand;
import org.apache.cloudstack.storage.command.ForgetObjectCmd;
import org.apache.cloudstack.storage.command.IntroduceObjectCmd;
import org.apache.cloudstack.storage.command.SnapshotAndCopyCommand;

import com.cloud.agent.api.Answer;

Expand Down Expand Up @@ -63,9 +62,7 @@ public interface StorageProcessor {

public Answer deleteSnapshot(DeleteCommand cmd);

public Answer introduceObject(IntroduceObjectCmd cmd);
Answer introduceObject(IntroduceObjectCmd cmd);

public Answer forgetObject(ForgetObjectCmd cmd);

public Answer snapshotAndCopy(SnapshotAndCopyCommand cmd);
Answer forgetObject(ForgetObjectCmd cmd);
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import org.apache.cloudstack.storage.command.DeleteCommand;
import org.apache.cloudstack.storage.command.DettachCommand;
import org.apache.cloudstack.storage.command.IntroduceObjectCmd;
import org.apache.cloudstack.storage.command.SnapshotAndCopyCommand;
import org.apache.cloudstack.storage.command.StorageSubSystemCommand;

import com.cloud.agent.api.Answer;
Expand Down Expand Up @@ -62,10 +61,7 @@ public Answer handleStorageCommands(StorageSubSystemCommand command) {
return execute((DettachCommand)command);
} else if (command instanceof IntroduceObjectCmd) {
return processor.introduceObject((IntroduceObjectCmd)command);
} else if (command instanceof SnapshotAndCopyCommand) {
return processor.snapshotAndCopy((SnapshotAndCopyCommand)command);
}

return new Answer((Command)command, false, "not implemented yet");
}

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import java.util.Map;
import java.util.Set;

import org.apache.cloudstack.engine.subsystem.api.storage.DataObject;
import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo;

Expand Down Expand Up @@ -96,9 +95,9 @@ VolumeInfo moveVolume(VolumeInfo volume, long destPoolDcId, Long destPoolPodId,

void cleanupVolumes(long vmId) throws ConcurrentOperationException;

void revokeAccess(DataObject dataObject, Host host, DataStore dataStore);
void disconnectVolumeFromHost(VolumeInfo volumeInfo, Host host, DataStore dataStore);

void revokeAccess(long vmId, long hostId);
void disconnectVolumesFromHost(long vmId, long hostId);

void migrateVolumes(VirtualMachine vm, VirtualMachineTO vmTo, Host srcHost, Host destHost, Map<Volume, StoragePool> volumeToPool);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
public interface PrimaryDataStoreDriver extends DataStoreDriver {
public ChapInfo getChapInfo(VolumeInfo volumeInfo);

public boolean grantAccess(DataObject dataObject, Host host, DataStore dataStore);
public boolean connectVolumeToHost(VolumeInfo volumeInfo, Host host, DataStore dataStore);

public void revokeAccess(DataObject dataObject, Host host, DataStore dataStore);
public void disconnectVolumeFromHost(VolumeInfo volumeInfo, Host host, DataStore dataStore);

// intended for managed storage (cloud.storage_pool.managed = true)
// if not managed, return volume.getSize()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ public VolumeInfo getVolume() {

ChapInfo getChapInfo(VolumeInfo volumeInfo, DataStore dataStore);

boolean grantAccess(DataObject dataObject, Host host, DataStore dataStore);
boolean connectVolumeToHost(VolumeInfo volumeInfo, Host host, DataStore dataStore);

void revokeAccess(DataObject dataObject, Host host, DataStore dataStore);
void disconnectVolumeFromHost(VolumeInfo volumeInfo, Host host, DataStore dataStore);

/**
* Creates the volume based on the given criteria
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ protected boolean handleDisconnectWithoutInvestigation(AgentAttache attache, Sta
}

if (s_logger.isDebugEnabled()) {
s_logger.debug("The next status of agent " + hostId + "is " + nextStatus + ", current status is " + currentStatus);
s_logger.debug("The next status of agent " + hostId + " is " + nextStatus + ", current status is " + currentStatus);
}
}
}
Expand Down Expand Up @@ -825,10 +825,6 @@ protected boolean handleDisconnectWithInvestigation(AgentAttache attache, Status

if (determinedState == Status.Down) {
s_logger.error("Host is down: " + host.getId() + "-" + host.getName() + ". Starting HA on the VMs");
if ((host.getType() != Host.Type.SecondaryStorage) && (host.getType() != Host.Type.ConsoleProxy)) {
_alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_HOST, host.getDataCenterId(), host.getPodId(), "Host disconnected, " + host.getId(),
"Host is down: " + host.getId() + "-" + host.getName() + ". Starting HA on the VMs");
}
event = Status.Event.HostDown;
} else if (determinedState == Status.Up) {
/* Got ping response from host, bring it back*/
Expand Down Expand Up @@ -861,18 +857,20 @@ protected boolean handleDisconnectWithInvestigation(AgentAttache attache, Status
HostPodVO podVO = _podDao.findById(host.getPodId());
String hostDesc = "name: " + host.getName() + " (id:" + host.getId() + "), availability zone: " + dcVO.getName() + ", pod: " + podVO.getName();
_alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_HOST, host.getDataCenterId(), host.getPodId(), "Host in ALERT state, " + hostDesc,
"In availability zone " + host.getDataCenterId() + ", " + host.getId() + "-" + host.getName()
+ " disconnect due to event " + event + ", ms can't determine the host status" );
"In availability zone " + host.getDataCenterId()
+ ", host is in alert state: " + host.getId() + "-" + host.getName());
}
} else {
s_logger.debug("The next status of Agent " + host.getId() + " is not Alert, no need to investigate what happened");
}
}

handleDisconnectWithoutInvestigation(attache, event, true, true);
host = _hostDao.findById(hostId); // Maybe the host magically reappeared?
if (host != null && host.getStatus() == Status.Down) {
if (host != null && (host.getStatus() == Status.Alert || host.getStatus() == Status.Down)) {
_haMgr.scheduleRestartForVmsOnHost(host, true);
}

return true;
}

Expand Down Expand Up @@ -1515,7 +1513,7 @@ protected void runInContext() {
|| host.getType() == Host.Type.SecondaryStorageCmdExecutor)) {

s_logger.warn("Disconnect agent for CPVM/SSVM due to physical connection close. host: " + host.getId());
disconnectWithoutInvestigation(agentId, Event.ShutdownRequested);
disconnectWithoutInvestigation(agentId, Event.PingTimeout);
} else {
status_logger.debug("Ping timeout for host " + agentId + ", do invstigation");
disconnectWithInvestigation(agentId, Event.PingTimeout);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ protected void advanceExpunge(VMInstanceVO vm) throws ResourceUnavailableExcepti
}

if (hostId != null) {
volumeMgr.revokeAccess(vm.getId(), hostId);
volumeMgr.disconnectVolumesFromHost(vm.getId(), hostId);
}

// Clean up volumes based on the vm's instance id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

import org.apache.cloudstack.engine.orchestration.service.VolumeOrchestrationService;
import org.apache.cloudstack.engine.subsystem.api.storage.ChapInfo;
import org.apache.cloudstack.engine.subsystem.api.storage.DataObject;
import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreDriver;
import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
Expand Down Expand Up @@ -872,29 +871,27 @@ public void doInTransactionWithoutResult(TransactionStatus status) {
}

@Override
public void revokeAccess(DataObject dataObject, Host host, DataStore dataStore) {
public void disconnectVolumeFromHost(VolumeInfo volumeInfo, Host host, DataStore dataStore) {
DataStoreDriver dataStoreDriver = dataStore != null ? dataStore.getDriver() : null;

if (dataStoreDriver instanceof PrimaryDataStoreDriver) {
((PrimaryDataStoreDriver)dataStoreDriver).revokeAccess(dataObject, host, dataStore);
((PrimaryDataStoreDriver)dataStoreDriver).disconnectVolumeFromHost(volumeInfo, host, dataStore);
}
}

@Override
public void revokeAccess(long vmId, long hostId) {
public void disconnectVolumesFromHost(long vmId, long hostId) {
HostVO host = _hostDao.findById(hostId);

List<VolumeVO> volumesForVm = _volsDao.findByInstance(vmId);

if (volumesForVm != null) {
for (VolumeVO volumeForVm : volumesForVm) {
VolumeInfo volumeInfo = volFactory.getVolume(volumeForVm.getId());

// pool id can be null for the VM's volumes in Allocated state
if (volumeForVm.getPoolId() != null) {
DataStore dataStore = dataStoreMgr.getDataStore(volumeForVm.getPoolId(), DataStoreRole.Primary);

volService.revokeAccess(volumeInfo, host, dataStore);
volService.disconnectVolumeFromHost(volumeInfo, host, dataStore);
}
}
}
Expand Down Expand Up @@ -1249,7 +1246,7 @@ private Pair<VolumeVO, DataStore> recreateVolume(VolumeVO vol, VirtualMachinePro
long hostId = vm.getVirtualMachine().getHostId();
Host host = _hostDao.findById(hostId);

volService.grantAccess(volFactory.getVolume(newVol.getId()), host, destPool);
volService.connectVolumeToHost(volFactory.getVolume(newVol.getId()), host, destPool);
}

newVol = _volsDao.findById(newVol.getId());
Expand Down
Loading