diff --git a/agent/src/com/cloud/agent/resource/computing/LibvirtComputingResource.java b/agent/src/com/cloud/agent/resource/computing/LibvirtComputingResource.java index 67a21bb198d..ca9725d50bf 100644 --- a/agent/src/com/cloud/agent/resource/computing/LibvirtComputingResource.java +++ b/agent/src/com/cloud/agent/resource/computing/LibvirtComputingResource.java @@ -235,7 +235,6 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv private String _dcId; private String _pod; private String _clusterId; - private String _premium; private long _hvVersion; private KVMHAMonitor _monitor; private final String _SSHKEYSPATH = "/root/.ssh"; @@ -735,17 +734,12 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv } - _premium = (String)params.get("premium"); - if (_premium == null) { - _premium = "false"; - } - - if (_premium.equalsIgnoreCase("true")) { - String[] info = NetUtils.getNetworkParams(_privateNic); - _monitor = new KVMHAMonitor(null, _conn, info[0], _heartBeatPath); - Thread ha = new Thread(_monitor); - ha.start(); - } + + String[] info = NetUtils.getNetworkParams(_privateNic); + _monitor = new KVMHAMonitor(null, _conn, info[0], _heartBeatPath); + Thread ha = new Thread(_monitor); + ha.start(); + try { Class clazz = Class.forName("com.cloud.storage.JavaStorageLayer"); @@ -865,8 +859,14 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv boolean isDirectAttachedNetwork(String type) { if ("untagged".equalsIgnoreCase(type)) return true; - else + else { + try { + Long vnetId = Long.valueOf(type); + } catch (NumberFormatException e) { + return true; + } return false; + } } protected synchronized String startDomainRouter(StartRouterCommand cmd) { @@ -1252,14 +1252,14 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv pool.destroy(); pool.undefine(); - if (_premium.equalsIgnoreCase("true")) { - KVMHABase.NfsStoragePool sp = new KVMHABase.NfsStoragePool(cmd.getPool().getUuid(), - cmd.getPool().getHostAddress(), - cmd.getPool().getPath(), - _mountPoint + File.separator + cmd.getPool().getUuid(), - PoolType.PrimaryStorage); - _monitor.removeStoragePool(sp); - } + + KVMHABase.NfsStoragePool sp = new KVMHABase.NfsStoragePool(cmd.getPool().getUuid(), + cmd.getPool().getHostAddress(), + cmd.getPool().getPath(), + _mountPoint + File.separator + cmd.getPool().getUuid(), + PoolType.PrimaryStorage); + _monitor.removeStoragePool(sp); + return new Answer(cmd); } catch (LibvirtException e) { @@ -1903,14 +1903,14 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv spi.capacity, spi.allocation, tInfo); - if (_premium.equalsIgnoreCase("true")) { - KVMHABase.NfsStoragePool pool = new KVMHABase.NfsStoragePool(cmd.getPool().getUuid(), - cmd.getPool().getHostAddress(), - cmd.getPool().getPath(), - _mountPoint + File.separator + cmd.getPool().getUuid(), - PoolType.PrimaryStorage); - _monitor.addStoragePool(pool); - } + + KVMHABase.NfsStoragePool pool = new KVMHABase.NfsStoragePool(cmd.getPool().getUuid(), + cmd.getPool().getHostAddress(), + cmd.getPool().getPath(), + _mountPoint + File.separator + cmd.getPool().getUuid(), + PoolType.PrimaryStorage); + _monitor.addStoragePool(pool); + try { storagePool.free(); } catch (LibvirtException e) { @@ -2237,7 +2237,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv return new MigrateAnswer(cmd, result == null, result, null); } - private Answer execute(PrepareForMigrationCommand cmd) { + private synchronized Answer execute(PrepareForMigrationCommand cmd) { final String vmName = cmd.getVmName(); String result = null; diff --git a/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java b/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java index 7903ce04f4c..72e3761c766 100644 --- a/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java +++ b/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java @@ -3718,23 +3718,7 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR return vlanNetwork; } - protected void disableVlanNetwork(Network network) throws InternalErrorException { - try { - Connection conn = getConnection(); - if (network.getVIFs(conn).isEmpty()) { - Iterator pifs = network.getPIFs(conn).iterator(); - while (pifs.hasNext()) { - PIF pif = pifs.next(); - pif.unplug(conn); - } - } - } catch (XenAPIException e) { - String msg = "Unable to disable VLAN network due to " + e.toString(); - s_logger.warn(msg, e); - } catch (Exception e) { - String msg = "Unable to disable VLAN network due to " + e.getMessage(); - s_logger.warn(msg, e); - } + protected void disableVlanNetwork(Network network) { } protected SR getLocalLVMSR() { @@ -4142,7 +4126,6 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR return null; } - destroyStoppedVm(); StartupRoutingCommand cmd = new StartupRoutingCommand(); fillHostInfo(cmd); diff --git a/patches/systemvm/debian/config/root/userdata.py b/patches/systemvm/debian/config/root/userdata.py index 553f1d4c1df..f013bef3c0b 100644 --- a/patches/systemvm/debian/config/root/userdata.py +++ b/patches/systemvm/debian/config/root/userdata.py @@ -30,7 +30,6 @@ def vm_data(args): cmd.append("-d") cmd.append(tmp_path) except: - util.SMlog(" vmdata failed to write tempfile " ) os.close(fd) os.remove(tmp_path) return '' diff --git a/scripts/vm/hypervisor/kvm/kvmheartbeat.sh b/scripts/vm/hypervisor/kvm/kvmheartbeat.sh index 02738405d76..88a25b772c8 100755 --- a/scripts/vm/hypervisor/kvm/kvmheartbeat.sh +++ b/scripts/vm/hypervisor/kvm/kvmheartbeat.sh @@ -77,6 +77,7 @@ then mount $NfsSvrIP:$NfsSvrPath $MountPoint -o sync,soft,proto=tcp,acregmin=0,acregmax=0,acdirmin=0,acdirmax=0,noac,timeo=133,retrans=10 &> /dev/null if [ $? -gt 0 ] then + printf "Failed to remount $NfsSvrIP:$NfsSvrPath under $MountPoint" exit 1 fi if [ "$rflag" == "0" ] @@ -98,6 +99,7 @@ write_hbLog() { touch $hbFile &> /dev/null if [ $? -gt 0 ] then + printf "Failed to create $hbFile" return 2 fi fi diff --git a/scripts/vm/network/vnet/modifyvlan.sh b/scripts/vm/network/vnet/modifyvlan.sh old mode 100644 new mode 100755 index 930d5218d28..9396dc60b81 --- a/scripts/vm/network/vnet/modifyvlan.sh +++ b/scripts/vm/network/vnet/modifyvlan.sh @@ -22,8 +22,12 @@ addVlan() { if [ $? -gt 0 ] then - printf "Failed to create vlan $vlanId on pif: $pif." - return 1 + # race condition that someone already creates the vlan + if [ ! -d /sys/class/net/$vlanDev ] + then + printf "Failed to create vlan $vlanId on pif: $pif." + return 1 + fi fi fi @@ -40,8 +44,11 @@ addVlan() { if [ $? -gt 0 ] then - printf "Failed to create br: $vlanBr" - return 2 + if [ ! -d /sys/class/net/$vlanBr ] + then + printf "Failed to create br: $vlanBr" + return 2 + fi fi fi @@ -52,8 +59,12 @@ addVlan() { brctl addif $vlanBr $vlanDev > /dev/null if [ $? -gt 0 ] then - printf "Failed to add vlan: $vlanDev to $vlanBr" - return 3 + ls /sys/class/net/$vlanBr/brif/ |grep -w "$vlanDev" > /dev/null + if [ $? -gt 0 ] + then + printf "Failed to add vlan: $vlanDev to $vlanBr" + return 3 + fi fi fi # is vlanBr up? diff --git a/server/src/com/cloud/api/doc/ApiXmlDocWriter.java b/server/src/com/cloud/api/doc/ApiXmlDocWriter.java index 922819f0409..626b5f3bffb 100644 --- a/server/src/com/cloud/api/doc/ApiXmlDocWriter.java +++ b/server/src/com/cloud/api/doc/ApiXmlDocWriter.java @@ -154,30 +154,30 @@ public class ApiXmlDocWriter { } } - //Get response parameters - Method getResponseMethod = clas.getMethod("getResponse"); - Class responseClas = (Class)getResponseMethod.getReturnType(); - Type returnType = getResponseMethod.getGenericReturnType(); - - if(returnType != null && returnType instanceof ParameterizedType){ - ParameterizedType type = (ParameterizedType) returnType; - Type[] typeArguments = type.getActualTypeArguments(); - responseClas = (Class)typeArguments[0]; - } - - //Get response parameters - Field[] responseFields = responseClas.getDeclaredFields(); - for (Field responseField : responseFields) { - SerializedName nameAnnotation = responseField.getAnnotation(SerializedName.class); - Param descAnnotation = responseField.getAnnotation(Param.class); - Argument respArg = new Argument(nameAnnotation.value()); - if (descAnnotation != null) - respArg.setDescription(descAnnotation.description()); - response.add(respArg); - } +// //Get response parameters +// Method getResponseMethod = clas.getMethod("getResponse"); +// Class responseClas = (Class)getResponseMethod.getReturnType(); +// Type returnType = getResponseMethod.getGenericReturnType(); +// +// if(returnType != null && returnType instanceof ParameterizedType){ +// ParameterizedType type = (ParameterizedType) returnType; +// Type[] typeArguments = type.getActualTypeArguments(); +// responseClas = (Class)typeArguments[0]; +// } +// +// //Get response parameters +// Field[] responseFields = responseClas.getDeclaredFields(); +// for (Field responseField : responseFields) { +// SerializedName nameAnnotation = responseField.getAnnotation(SerializedName.class); +// Param descAnnotation = responseField.getAnnotation(Param.class); +// Argument respArg = new Argument(nameAnnotation.value()); +// if (descAnnotation != null) +// respArg.setDescription(descAnnotation.description()); +// response.add(respArg); +// } apiCommand.setRequest(request); - apiCommand.setResponse(response); + //apiCommand.setResponse(response); commands.add(apiCommand); //Write command to xml file diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java index b2df3b1872e..5d279c58f18 100755 --- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java +++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java @@ -884,7 +884,7 @@ public class SnapshotManagerImpl implements SnapshotManager { throw new InvalidParameterValueException("maxSnaps exceeds limit: " + intervalMaxSnaps + " for interval type: " + cmd.getIntervalType()); } - SnapshotPolicyVO policy = new SnapshotPolicyVO(volumeId, cmd.getSchedule(), timezoneId, (short)type.ordinal(), intervalMaxSnaps); + SnapshotPolicyVO policy = new SnapshotPolicyVO(volumeId, cmd.getSchedule(), timezoneId, (short)type.ordinal(), cmd.getMaxSnaps()); // Create an event EventVO event = new EventVO(); try{ @@ -898,7 +898,7 @@ public class SnapshotManagerImpl implements SnapshotManager { policy.setSchedule(cmd.getSchedule()); policy.setTimezone(timezoneId); policy.setInterval((short)type.ordinal()); - policy.setMaxSnaps(intervalMaxSnaps); + policy.setMaxSnaps(cmd.getMaxSnaps()); policy.setActive(true); _snapshotPolicyDao.update(policy.getId(), policy); } finally { @@ -921,13 +921,12 @@ public class SnapshotManagerImpl implements SnapshotManager { public boolean deletePolicy(long userId, long policyId) { SnapshotPolicyVO snapshotPolicy = _snapshotPolicyDao.findById(policyId); VolumeVO volume = _volsDao.findById(snapshotPolicy.getVolumeId()); - snapshotPolicy.setActive(false); _snapSchedMgr.removeSchedule(snapshotPolicy.getVolumeId(), snapshotPolicy.getId()); EventVO event = new EventVO(); event.setAccountId(volume.getAccountId()); event.setUserId(userId); event.setType(EventTypes.EVENT_SNAPSHOT_POLICY_DELETE); - boolean success = _snapshotPolicyDao.update(policyId, snapshotPolicy); + boolean success = _snapshotPolicyDao.remove(policyId); if(success){ event.setLevel(EventVO.LEVEL_INFO); event.setDescription("Successfully deleted snapshot policy with Id: "+policyId); @@ -1092,13 +1091,16 @@ public class SnapshotManagerImpl implements SnapshotManager { Long userId = getSnapshotUserId(); if ((policyId == null) && (policyIds == null)) { - throw new ServerApiException(BaseCmd.PARAM_ERROR, "No policy id (or list off ids) specified."); + throw new ServerApiException(BaseCmd.PARAM_ERROR, "No policy id (or list of ids) specified."); } - if(policyIds.size()<=0){ + if (policyIds == null) { + policyIds = new ArrayList(); + policyIds.add(policyId); + } else if(policyIds.size()<=0){ + // Not even sure how this is even possible throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"There are no policy ids"); } - for (Long policy : policyIds) { SnapshotPolicyVO snapshotPolicyVO = _snapshotPolicyDao.findById(policy); diff --git a/ui/css/main.css b/ui/css/main.css index c7959c71311..2e816b79c2d 100644 --- a/ui/css/main.css +++ b/ui/css/main.css @@ -1868,20 +1868,20 @@ a:hover.search_button { width:auto; height:auto; color:#FFF; - font-size:11px; + font-size:10px; font-weight:normal; text-decoration:none; float:left; - margin:7px 15px 0 7px; + margin:7px 11px 0 5px; padding:0; } .actionpanel_button_icons { - width:30px; - height:20px; + width:25px; + height:18px; float:left; - margin:3px 0 0 8px; + margin:5px 0 0 7px; padding:0; } @@ -1917,18 +1917,21 @@ a:hover.search_button { width:380px; height:auto; float:left; - margin:8px 0 0 10px; - padding:0; + background:#eef2f4 repeat top left; + border:1px solid #CCC; + margin:5px 0 0 10px; + padding:4px 0; } .help_dropdown_box_titlebox h2 { width:auto; height:auto; float:left; - color:#999; + color:#333; text-align:left; font-size:14px; - margin:0; + margin:0 0 0 10px; + display:inline; padding:0; } @@ -1938,7 +1941,7 @@ a:hover.search_button { font-size:10px; font-weight:normal; text-align:left; - margin:0; + margin:0 10px 0 0; padding:0; text-decoration:none; } @@ -4710,7 +4713,7 @@ a:hover.search_button { ----------------------------------*/ .dialog_snapshotbox {width:auto; height:auto; float:left; display:block; margin:0; padding:0;} .dialog_snapshotcontainer {width:auto height:auto; display:block; float:left; margin:0; padding:0;} -.dialog_snapshotleft {width:500px; height:135px; float:left;display:block; margin:0; padding:0;} +.dialog_snapshotleft {width:400px; height:10px; float:left;display:block; margin:0; padding:0;} .dialog_snapshotleft_list {width:705px; height:auto; float:left; margin:0 0 10px 0; padding:0; color:#333; font-size:11px;} .dialog_snapshotleft_info {width:470px; height:auto; float:left; margin:0 0 10px 0; padding:0; color:#333; font-size:11px;} .dialog_snapshotleft_info p {width:auto; height:auto; float:left; color:#333; font-size:11px; font-weight:normal; margin:0; padding:0;} @@ -4723,7 +4726,7 @@ a:hover.search_button { .dialog_snapshotleft_actions a:link {width:auto; height:auto; margin:0 5px 0 0; padding:0; color:#2c8bbc; text-decoration:none; font-size:11px;} .dialog_snapshotleft_actions a:visited {width:auto; height:auto; margin:0 5px 0 0; padding:0; color:#2c8bbc; text-decoration:none; font-size:11px;} .dialog_snapshotleft_actions a:hover {width:auto; height:auto; margin:0 5px 0 0; padding:0; color:#2c8bbc; text-decoration:underline; font-size:11px;} -.dialog_snapshotright {width:705px; height:0px; float:left; display:none; margin:0; padding:15px 0 0 0; border-top:1px solid #666;} +.dialog_snapshotright {width:400px; height:150px; float:left; margin:0; padding:15px 0 0 0; } .dialog_snapshotright_infotext{width:360px; height:160px; float:left; display:none; margin:0; padding:0; font-size:15px; font-family:Arial, Helvetica, sans-serif; font-size:normal; text-align:left; margin:10px; color:#333;} .dialog_snapshots_editcontent {width:350px; height:auto; float:left; margin:0; padding:0;} .dialog_snapshots_editcontent_title {width:280px; height:auto; float:left; margin:0; padding:0;} diff --git a/ui/images/addvm_actionicon.png b/ui/images/addvm_actionicon.png index 4f49893dcb6..abd2ad1bcac 100644 Binary files a/ui/images/addvm_actionicon.png and b/ui/images/addvm_actionicon.png differ diff --git a/ui/images/destroyvm_actionicon.png b/ui/images/destroyvm_actionicon.png index d868d0931e2..cdaed12e188 100644 Binary files a/ui/images/destroyvm_actionicon.png and b/ui/images/destroyvm_actionicon.png differ diff --git a/ui/images/help_actionicon.png b/ui/images/help_actionicon.png index 77f87eff354..f6367b1a0e8 100644 Binary files a/ui/images/help_actionicon.png and b/ui/images/help_actionicon.png differ diff --git a/ui/images/rebootvm_actionicon.png b/ui/images/rebootvm_actionicon.png index d6057448a78..3d48ed238f1 100644 Binary files a/ui/images/rebootvm_actionicon.png and b/ui/images/rebootvm_actionicon.png differ diff --git a/ui/images/refresh_actionicon.png b/ui/images/refresh_actionicon.png index ccd9132c5d5..ad2c4f37465 100644 Binary files a/ui/images/refresh_actionicon.png and b/ui/images/refresh_actionicon.png differ diff --git a/ui/images/startvm_actionicon.png b/ui/images/startvm_actionicon.png index 1a585a3dc99..efd66f5a23f 100644 Binary files a/ui/images/startvm_actionicon.png and b/ui/images/startvm_actionicon.png differ diff --git a/ui/images/stopvm_actionicon.png b/ui/images/stopvm_actionicon.png index 34d0399def1..7ea70cde830 100644 Binary files a/ui/images/stopvm_actionicon.png and b/ui/images/stopvm_actionicon.png differ diff --git a/ui/index.jsp b/ui/index.jsp index bb5b86b7da4..143ac006ef9 100644 --- a/ui/index.jsp +++ b/ui/index.jsp @@ -306,15 +306,18 @@ long milliseconds = new Date().getTime(); -

Topic 1 Top

+

Topic 1

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.

+

Top

Topic 2

-

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.

It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

+

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.

It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

+

Top

Topic 3

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.

It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

+

Top

diff --git a/ui/jsp/resource.jsp b/ui/jsp/resource.jsp index ec73c0b7556..445ff487dba 100644 --- a/ui/jsp/resource.jsp +++ b/ui/jsp/resource.jsp @@ -34,7 +34,7 @@
-
+
@@ -49,7 +49,7 @@
-
+
@@ -66,7 +66,7 @@
-
+
@@ -83,7 +83,7 @@
-
+
@@ -93,8 +93,10 @@ - -