Merge release branch 4.6 to master

* 4.6:
  Use version for RC branch name instead of branch
  make sure all files are updates with new version
  Update L10N resource files with 4.6 strings from Transifex (20151129)
  Fix secondary storage not working with swift
  CLOUDSTACK-9083: Add disk serial to kvm virt xml
This commit is contained in:
Remi Bergsma 2015-11-30 22:30:52 +01:00
commit 4ecfc29267
14 changed files with 64 additions and 16 deletions

View File

@ -54,7 +54,7 @@ label.configure=\u0642\u0645 \u0628\u062a\u0643\u0648\u064a\u0646
label.configure.vpc=\u062a\u0643\u0648\u064a\u0646 VPC
label.corrections.saved=\u062a\u0645 \u062d\u0641\u0638 \u0627\u0644\u062a\u0635\u062d\u064a\u062d\u0627\u062a
label.cpu.mhz=\u0648\u062d\u062f\u0629 \u0627\u0644\u0645\u0639\u0627\u0644\u062c\u0629 \u0627\u0644\u0645\u0631\u0643\u0632\u064a\u0629 (\u0628\u0627\u0644\u0645\u064a\u063a\u0627\u0647\u064a\u0631\u062a\u0632)
label.cpu=\u00d9\u0088\u00d8\u00ad\u00d8\u00af\u00d8\u00a9 \u00d8\u00a7\u00d9\u0084\u00d9
label.cpu=\u0648 \u0645 \u0645
label.create.project=\u0623\u0646\u0634\u0626 \u0645\u0634\u0631\u0648\u0639
label.create.VPN.connection=\u0625\u0646\u0634\u0627\u0621 \u0627\u062a\u0635\u0627\u0644 \u0628\u0648\u0627\u0628\u0629 \u0627\u0644\u0634\u0628\u0643\u0629 \u0627\u0644\u0627\u0641\u062a\u0631\u0627\u0636\u064a\u0629 \u0627\u0644\u0634\u062e\u0635\u064a\u0629
label.dead.peer.detection=\u0643\u0634\u0641 \u0627\u0644\u0642\u0631\u064a\u0646 \u0627\u0644\u0645\u0641\u0642\u0648\u062f
@ -86,7 +86,7 @@ label.ESP.policy=\u0633\u064a\u0627\u0633\u0629 ESP
label.failed=\u062e\u0637\u0623
label.filterBy=\u062a\u0635\u0641\u064a\u0629 \u062d\u0633\u0628
label.full.path=\u0645\u0633\u0627\u0631 \u0643\u0627\u0645\u0644
label.gpu=\u00d9\u0088\u00d8\u00ad\u00d8\u00af\u00d8\u00a9 \u00d8\u00a7\u00d9\u0084\u00d9
label.gpu=\u0648\u0639\u0631
label.guest.type=\u0646\u0648\u0639 \u0627\u0644\u0636\u064a\u0641
label.IKE.lifetime=\u0639\u0645\u0631 IKE (\u062b\u0627\u0646\u064a\u0629)
label.IKE.policy=\u0633\u064a\u0627\u0633\u0629 IKE

View File

@ -1127,6 +1127,7 @@ label.override.guest.traffic=Gast-Datenverkehr \u00fcberschreiben
label.override.public.traffic=\u00d6ffentlichen Datenverkehr \u00fcberschreiben
label.ovm3.cluster=Natives Clustering
label.ovm3.pool=Natives Pooling
label.ovm3.traffic.label=OVM3 Datenverkehrs-Bezeichnung
label.ovm3.vip=Master Vip IP
label.ovm.traffic.label=OVM Datenverkehrs-Bezeichnung
label.ovs=OVS

View File

@ -929,7 +929,7 @@ label.loading=Chargement en cours
label.local.file=Fichier local
label.local=Local
label.local.storage.enabled=Activer le stockage local pour les VMs Utilisateurs
label.local.storage.enabled.system.vms=Active le stockage local pour les VMs Syst\u00e8mes
label.local.storage.enabled.system.vms=Activer le stockage local pour les VMs Syst\u00e8mes
label.local.storage=Stockage local
label.login=Connexion
label.logout=D\u00e9connexion
@ -1127,6 +1127,7 @@ label.override.guest.traffic=Remplacer Trafic-invit\u00e9
label.override.public.traffic=Remplacer Trafic-public
label.ovm3.cluster=Cluster natif
label.ovm3.pool=Pool natif
label.ovm3.traffic.label=Libell\u00e9 trafic OVM3
label.ovm3.vip=IP Ma\u00eetre Vip
label.ovm.traffic.label=Libell\u00e9 trafic OVM
label.ovs=OVS
@ -1739,7 +1740,7 @@ message.action.enable.nexusVswitch=Confirmer l\\'activation de ce Nexus 1000v
message.action.enable.physical.network=Confirmer l\\'activation de ce r\u00e9seau physique.
message.action.enable.pod=Activer ce pod ?
message.action.enable.zone=Activer cette zone ?
message.action.expunge.instance=Confirmez que vous souhaitez oruger cette instance.
message.action.expunge.instance=Confirmez que vous souhaitez effacer cette instance.
message.action.force.reconnect=Votre h\u00f4te a \u00e9t\u00e9 forc\u00e9e \u00e0 se reconnecter avec succ\u00e8s. Ce processus peut prendre jusqu\\'\u00e0 plusieurs minutes.
message.action.host.enable.maintenance.mode=Activer le mode maintenance va causer la migration \u00e0 chaud de l\\'ensemble des instances de cet h\u00f4te sur les autres h\u00f4tes disponibles.
message.action.instance.reset.password=Confirmer le changement du mot de passe ROOT pour cette machine virtuelle.

View File

@ -1127,6 +1127,7 @@ label.override.guest.traffic=Overstyr Gjeste Trafikk
label.override.public.traffic=Overstyr Offentlig Trafikk
label.ovm3.cluster=Innebygd Klynge Funksjon
label.ovm3.pool=Innebygd Pooling
label.ovm3.traffic.label=OVM3 trafikketikett
label.ovm3.vip=Hoved VIP IP
label.ovm.traffic.label=OVM trafikk etikett
label.ovs=OVS

View File

@ -1127,6 +1127,7 @@ label.override.guest.traffic=Overschrijf Gast Verkeer
label.override.public.traffic=Overschrijf Publiek Verkeer
label.ovm3.cluster=inheems clustering
label.ovm3.pool=inheemse pooling
label.ovm3.traffic.label=OVM3 verkeer etiket
label.ovm3.vip=Master VIP IP ip
label.ovm.traffic.label=OVM verkeerslabel
label.ovs=OVS

View File

@ -1127,6 +1127,7 @@ label.override.guest.traffic=Anula Tr\u00e1fego Convidado
label.override.public.traffic=Sobrep\u00f5e Tr\u00e1fego P\u00fablico
label.ovm3.cluster=Native Clustering
label.ovm3.pool=Native Pooling
label.ovm3.traffic.label=Label de trafego OVM3
label.ovm3.vip=IP principal do Vip
label.ovm.traffic.label=R\u00f3tulo de tr\u00e1fego OVM
label.ovs=OVS

View File

@ -1535,6 +1535,7 @@ message.number.hosts=<h2><span> \# of </span> \u0423\u0437\u043b\u044b</h2>
message.number.pods=<h2><span> \# of </span> \u0421\u0442\u0435\u043d\u0434\u044b</h2>
message.number.storage=<h2><span> \# of </span> \u0422\u043e\u043c\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430</h2>
message.number.zones=<h2><span> \# of </span> \u0417\u043e\u043d\u044b</h2>
message.password.has.been.reset.to=\u041f\u0430\u0440\u043e\u043b\u044c \u0431\u044b\u043b \u0441\u0431\u0440\u043e\u0448\u0435\u043d \u0432
message.pending.projects.1=\u0412 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f\:
message.pending.projects.2=\u0414\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043a \u0440\u0430\u0437\u0434\u0435\u043b \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u0434\u0430\u043b\u0435\u0435 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f \u0438\u0437 \u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u0433\u043e \u043c\u0435\u043d\u044e.
message.please.add.at.lease.one.traffic.range=\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043e\u0434\u0438\u043d \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0434\u043b\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u0430

View File

@ -2141,6 +2141,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
if (data instanceof VolumeObjectTO) {
final VolumeObjectTO volumeObjectTO = (VolumeObjectTO)data;
disk.setSerial(diskUuidToSerial(volumeObjectTO.getUuid()));
if (volumeObjectTO.getBytesReadRate() != null && volumeObjectTO.getBytesReadRate() > 0) {
disk.setBytesReadRate(volumeObjectTO.getBytesReadRate());
}
@ -2420,6 +2421,11 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
}
}
public String diskUuidToSerial(String uuid) {
String uuidWithoutHyphen = uuid.replace("-","");
return uuidWithoutHyphen.substring(0, Math.min(uuidWithoutHyphen.length(), 20));
}
private String getIqn() {
try {
final String textToFind = "InitiatorName=";

View File

@ -419,7 +419,7 @@ public class LibvirtVMDef {
public static class DiskDef {
public enum DeviceType {
FLOPPY("floppy"), DISK("disk"), CDROM("cdrom");
FLOPPY("floppy"), DISK("disk"), CDROM("cdrom"), LUN("lun");
String _type;
DeviceType(String type) {
@ -524,6 +524,7 @@ public class LibvirtVMDef {
private Long _iopsReadRate;
private Long _iopsWriteRate;
private DiskCacheMode _diskCacheMode;
private String _serial;
private boolean qemuDriver = true;
public void setDeviceType(DeviceType deviceType) {
@ -708,6 +709,10 @@ public class LibvirtVMDef {
this.qemuDriver = qemuDriver;
}
public void setSerial(String serial) {
this._serial = serial;
}
@Override
public String toString() {
StringBuilder diskBuilder = new StringBuilder();
@ -761,6 +766,10 @@ public class LibvirtVMDef {
}
diskBuilder.append("/>\n");
if (_serial != null && !_serial.isEmpty() && _deviceType != DeviceType.LUN) {
diskBuilder.append("<serial>" + _serial + "</serial>");
}
if ((_deviceType != DeviceType.CDROM) &&
(s_libvirtVersion >= 9008) &&
(s_qemuVersion >= 1001000) &&

View File

@ -944,7 +944,7 @@ public class KVMStorageProcessor implements StorageProcessor {
return null;
}
protected synchronized String attachOrDetachDisk(final Connect conn, final boolean attach, final String vmName, final KVMPhysicalDisk attachingDisk, final int devId) throws LibvirtException,
protected synchronized String attachOrDetachDisk(final Connect conn, final boolean attach, final String vmName, final KVMPhysicalDisk attachingDisk, final int devId, final String serial) throws LibvirtException,
InternalErrorException {
List<DiskDef> disks = null;
Domain dm = null;
@ -980,6 +980,7 @@ public class KVMStorageProcessor implements StorageProcessor {
}
} else {
diskdef = new DiskDef();
diskdef.setSerial(serial);
if (attachingPool.getType() == StoragePoolType.RBD) {
if(resource.getHypervisorType() == Hypervisor.HypervisorType.LXC){
// For LXC, map image to host and then attach to Vm
@ -1022,6 +1023,7 @@ public class KVMStorageProcessor implements StorageProcessor {
final VolumeObjectTO vol = (VolumeObjectTO)disk.getData();
final PrimaryDataStoreTO primaryStore = (PrimaryDataStoreTO)vol.getDataStore();
final String vmName = cmd.getVmName();
final String serial = resource.diskUuidToSerial(vol.getUuid());
try {
final Connect conn = LibvirtConnection.getConnectionByVmName(vmName);
@ -1029,7 +1031,7 @@ public class KVMStorageProcessor implements StorageProcessor {
final KVMPhysicalDisk phyDisk = storagePoolMgr.getPhysicalDisk(primaryStore.getPoolType(), primaryStore.getUuid(), vol.getPath());
attachOrDetachDisk(conn, true, vmName, phyDisk, disk.getDiskSeq().intValue());
attachOrDetachDisk(conn, true, vmName, phyDisk, disk.getDiskSeq().intValue(), serial);
return new AttachAnswer(disk);
} catch (final LibvirtException e) {
@ -1048,12 +1050,13 @@ public class KVMStorageProcessor implements StorageProcessor {
final VolumeObjectTO vol = (VolumeObjectTO)disk.getData();
final PrimaryDataStoreTO primaryStore = (PrimaryDataStoreTO)vol.getDataStore();
final String vmName = cmd.getVmName();
final String serial = resource.diskUuidToSerial(vol.getUuid());
try {
final Connect conn = LibvirtConnection.getConnectionByVmName(vmName);
final KVMPhysicalDisk phyDisk = storagePoolMgr.getPhysicalDisk(primaryStore.getPoolType(), primaryStore.getUuid(), vol.getPath());
attachOrDetachDisk(conn, false, vmName, phyDisk, disk.getDiskSeq().intValue());
attachOrDetachDisk(conn, false, vmName, phyDisk, disk.getDiskSeq().intValue(), serial);
storagePoolMgr.disconnectPhysicalDisk(primaryStore.getPoolType(), primaryStore.getUuid(), vol.getPath());

View File

@ -389,6 +389,14 @@ public class LibvirtComputingResourceTest {
assertNotNull(stats);
}
@Test
public void diskUuidToSerialTest() {
String uuid = "38400000-8cf0-11bd-b24e-10b96e4ef00d";
String expected = "384000008cf011bdb24e";
LibvirtComputingResource lcr = new LibvirtComputingResource();
Assert.assertEquals(expected, lcr.diskUuidToSerial(uuid));
}
@Test
public void testUUID() {
String uuid = "1";

View File

@ -354,9 +354,17 @@ public class NfsSecondaryStorageResource extends ServerResourceBase implements S
try {
String downloadPath = determineStorageTemplatePath(storagePath, destPath);
final File downloadDirectory = _storage.getFile(downloadPath);
if (!downloadDirectory.mkdirs()) {
return new CopyCmdAnswer("Failed to create download directory " + downloadPath);
if (downloadDirectory.exists()) {
s_logger.debug("Directory " + downloadPath + " already exists");
} else {
if (!downloadDirectory.mkdirs()) {
final String errMsg = "Unable to create directory " + downloadPath + " to copy from Swift to cache.";
s_logger.error(errMsg);
return new CopyCmdAnswer(errMsg);
}
}
File destFile = SwiftUtil.getObject(swiftTO, downloadDirectory, srcData.getPath());
return postProcessing(destFile, downloadPath, destPath, srcData, destData);
} catch (Exception e) {

View File

@ -101,6 +101,11 @@ perl -pi -e "s/-SNAPSHOT//" build/replace.properties
perl -pi -e "s/-SNAPSHOT//" services/console-proxy/plugin/pom.xml
perl -pi -e "s/-SNAPSHOT//" tools/marvin/setup.py
perl -pi -e "s/-SNAPSHOT//" tools/marvin/marvin/deployAndRun.py
perl -pi -e "s/-SNAPSHOT//" debian/changelog
perl -pi -e "s/-SNAPSHOT//" services/iam/plugin/pom.xml
perl -pi -e "s/-SNAPSHOT//" services/iam/pom.xm
perl -pi -e "s/-SNAPSHOT//" services/iam/server/pom.xml
case "$currentversion" in
*-SNAPSHOT*)
perl -pi -e 's/-SNAPSHOT//' debian/rules
@ -122,12 +127,8 @@ mv $tmpfilenm debian/changelog
git clean -f
#create a RC branch
RELEASE_BRANCH="RC"`date +%Y%m%dT%H%M`
if [ "$branch" = "master" ]; then
BRANCHNAME=$version-$RELEASE_BRANCH
else
BRANCHNAME=$branch-$RELEASE_BRANCH
fi
RC_BRANCH_SUFFIX="RC"`date +%Y%m%dT%H%M`
BRANCHNAME=$version-$RC_BRANCH_SUFFIX
git branch $BRANCHNAME
git checkout $BRANCHNAME

View File

@ -66,6 +66,13 @@ mvn versions:set -DnewVersion=$version -P vmware -P developer -P systemvm -P sim
mv deps/XenServerJava/pom.xml.versionsBackup deps/XenServerJava/pom.xml
perl -pi -e "s/$currentversion/$version/" deps/XenServerJava/pom.xml
perl -pi -e "s/$currentversion/$version/" tools/apidoc/pom.xml
perl -pi -e "s/$currentversion/$version/" debian/changelog
perl -pi -e "s/$currentversion/$version/" tools/marvin/setup.py
perl -pi -e "s/$currentversion/$version/" services/iam/plugin/pom.xml
perl -pi -e "s/$currentversion/$version/" services/iam/pom.xm
perl -pi -e "s/$currentversion/$version/" services/iam/server/pom.xml
perl -pi -e "s/$currentversion/$version/" tools/checkstyle/pom.xml
perl -pi -e "s/$currentversion/$version/" services/console-proxy/plugin/pom.xml
git clean -f
echo 'commit changes'