Skip to content

Commit 4ecfc29

Browse files
committed
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
2 parents 20dcc25 + cb50eb8 commit 4ecfc29

14 files changed

Lines changed: 64 additions & 16 deletions

File tree

client/WEB-INF/classes/resources/messages_ar.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ label.configure=\u0642\u0645 \u0628\u062a\u0643\u0648\u064a\u0646
5454
label.configure.vpc=\u062a\u0643\u0648\u064a\u0646 VPC
5555
label.corrections.saved=\u062a\u0645 \u062d\u0641\u0638 \u0627\u0644\u062a\u0635\u062d\u064a\u062d\u0627\u062a
5656
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)
57-
label.cpu=\u00d9\u0088\u00d8\u00ad\u00d8\u00af\u00d8\u00a9 \u00d8\u00a7\u00d9\u0084\u00d9
57+
label.cpu=\u0648 \u0645 \u0645
5858
label.create.project=\u0623\u0646\u0634\u0626 \u0645\u0634\u0631\u0648\u0639
5959
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
6060
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
8686
label.failed=\u062e\u0637\u0623
8787
label.filterBy=\u062a\u0635\u0641\u064a\u0629 \u062d\u0633\u0628
8888
label.full.path=\u0645\u0633\u0627\u0631 \u0643\u0627\u0645\u0644
89-
label.gpu=\u00d9\u0088\u00d8\u00ad\u00d8\u00af\u00d8\u00a9 \u00d8\u00a7\u00d9\u0084\u00d9
89+
label.gpu=\u0648\u0639\u0631
9090
label.guest.type=\u0646\u0648\u0639 \u0627\u0644\u0636\u064a\u0641
9191
label.IKE.lifetime=\u0639\u0645\u0631 IKE (\u062b\u0627\u0646\u064a\u0629)
9292
label.IKE.policy=\u0633\u064a\u0627\u0633\u0629 IKE

client/WEB-INF/classes/resources/messages_de_DE.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,6 +1127,7 @@ label.override.guest.traffic=Gast-Datenverkehr \u00fcberschreiben
11271127
label.override.public.traffic=\u00d6ffentlichen Datenverkehr \u00fcberschreiben
11281128
label.ovm3.cluster=Natives Clustering
11291129
label.ovm3.pool=Natives Pooling
1130+
label.ovm3.traffic.label=OVM3 Datenverkehrs-Bezeichnung
11301131
label.ovm3.vip=Master Vip IP
11311132
label.ovm.traffic.label=OVM Datenverkehrs-Bezeichnung
11321133
label.ovs=OVS

client/WEB-INF/classes/resources/messages_fr_FR.properties

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ label.loading=Chargement en cours
929929
label.local.file=Fichier local
930930
label.local=Local
931931
label.local.storage.enabled=Activer le stockage local pour les VMs Utilisateurs
932-
label.local.storage.enabled.system.vms=Active le stockage local pour les VMs Syst\u00e8mes
932+
label.local.storage.enabled.system.vms=Activer le stockage local pour les VMs Syst\u00e8mes
933933
label.local.storage=Stockage local
934934
label.login=Connexion
935935
label.logout=D\u00e9connexion
@@ -1127,6 +1127,7 @@ label.override.guest.traffic=Remplacer Trafic-invit\u00e9
11271127
label.override.public.traffic=Remplacer Trafic-public
11281128
label.ovm3.cluster=Cluster natif
11291129
label.ovm3.pool=Pool natif
1130+
label.ovm3.traffic.label=Libell\u00e9 trafic OVM3
11301131
label.ovm3.vip=IP Ma\u00eetre Vip
11311132
label.ovm.traffic.label=Libell\u00e9 trafic OVM
11321133
label.ovs=OVS
@@ -1739,7 +1740,7 @@ message.action.enable.nexusVswitch=Confirmer l\\'activation de ce Nexus 1000v
17391740
message.action.enable.physical.network=Confirmer l\\'activation de ce r\u00e9seau physique.
17401741
message.action.enable.pod=Activer ce pod ?
17411742
message.action.enable.zone=Activer cette zone ?
1742-
message.action.expunge.instance=Confirmez que vous souhaitez oruger cette instance.
1743+
message.action.expunge.instance=Confirmez que vous souhaitez effacer cette instance.
17431744
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.
17441745
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.
17451746
message.action.instance.reset.password=Confirmer le changement du mot de passe ROOT pour cette machine virtuelle.

client/WEB-INF/classes/resources/messages_nb_NO.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,6 +1127,7 @@ label.override.guest.traffic=Overstyr Gjeste Trafikk
11271127
label.override.public.traffic=Overstyr Offentlig Trafikk
11281128
label.ovm3.cluster=Innebygd Klynge Funksjon
11291129
label.ovm3.pool=Innebygd Pooling
1130+
label.ovm3.traffic.label=OVM3 trafikketikett
11301131
label.ovm3.vip=Hoved VIP IP
11311132
label.ovm.traffic.label=OVM trafikk etikett
11321133
label.ovs=OVS

client/WEB-INF/classes/resources/messages_nl_NL.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,6 +1127,7 @@ label.override.guest.traffic=Overschrijf Gast Verkeer
11271127
label.override.public.traffic=Overschrijf Publiek Verkeer
11281128
label.ovm3.cluster=inheems clustering
11291129
label.ovm3.pool=inheemse pooling
1130+
label.ovm3.traffic.label=OVM3 verkeer etiket
11301131
label.ovm3.vip=Master VIP IP ip
11311132
label.ovm.traffic.label=OVM verkeerslabel
11321133
label.ovs=OVS

client/WEB-INF/classes/resources/messages_pt_BR.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,6 +1127,7 @@ label.override.guest.traffic=Anula Tr\u00e1fego Convidado
11271127
label.override.public.traffic=Sobrep\u00f5e Tr\u00e1fego P\u00fablico
11281128
label.ovm3.cluster=Native Clustering
11291129
label.ovm3.pool=Native Pooling
1130+
label.ovm3.traffic.label=Label de trafego OVM3
11301131
label.ovm3.vip=IP principal do Vip
11311132
label.ovm.traffic.label=R\u00f3tulo de tr\u00e1fego OVM
11321133
label.ovs=OVS

client/WEB-INF/classes/resources/messages_ru_RU.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1535,6 +1535,7 @@ message.number.hosts=<h2><span> \# of </span> \u0423\u0437\u043b\u044b</h2>
15351535
message.number.pods=<h2><span> \# of </span> \u0421\u0442\u0435\u043d\u0434\u044b</h2>
15361536
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>
15371537
message.number.zones=<h2><span> \# of </span> \u0417\u043e\u043d\u044b</h2>
1538+
message.password.has.been.reset.to=\u041f\u0430\u0440\u043e\u043b\u044c \u0431\u044b\u043b \u0441\u0431\u0440\u043e\u0448\u0435\u043d \u0432
15381539
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\:
15391540
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.
15401541
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

plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2141,6 +2141,7 @@ public int compare(final DiskTO arg0, final DiskTO arg1) {
21412141

21422142
if (data instanceof VolumeObjectTO) {
21432143
final VolumeObjectTO volumeObjectTO = (VolumeObjectTO)data;
2144+
disk.setSerial(diskUuidToSerial(volumeObjectTO.getUuid()));
21442145
if (volumeObjectTO.getBytesReadRate() != null && volumeObjectTO.getBytesReadRate() > 0) {
21452146
disk.setBytesReadRate(volumeObjectTO.getBytesReadRate());
21462147
}
@@ -2420,6 +2421,11 @@ public StartupCommand[] initialize() {
24202421
}
24212422
}
24222423

2424+
public String diskUuidToSerial(String uuid) {
2425+
String uuidWithoutHyphen = uuid.replace("-","");
2426+
return uuidWithoutHyphen.substring(0, Math.min(uuidWithoutHyphen.length(), 20));
2427+
}
2428+
24232429
private String getIqn() {
24242430
try {
24252431
final String textToFind = "InitiatorName=";

plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ public List<InterfaceDef> getInterfaces() {
419419

420420
public static class DiskDef {
421421
public enum DeviceType {
422-
FLOPPY("floppy"), DISK("disk"), CDROM("cdrom");
422+
FLOPPY("floppy"), DISK("disk"), CDROM("cdrom"), LUN("lun");
423423
String _type;
424424

425425
DeviceType(String type) {
@@ -524,6 +524,7 @@ public String toString() {
524524
private Long _iopsReadRate;
525525
private Long _iopsWriteRate;
526526
private DiskCacheMode _diskCacheMode;
527+
private String _serial;
527528
private boolean qemuDriver = true;
528529

529530
public void setDeviceType(DeviceType deviceType) {
@@ -708,6 +709,10 @@ public void setQemuDriver(boolean qemuDriver){
708709
this.qemuDriver = qemuDriver;
709710
}
710711

712+
public void setSerial(String serial) {
713+
this._serial = serial;
714+
}
715+
711716
@Override
712717
public String toString() {
713718
StringBuilder diskBuilder = new StringBuilder();
@@ -761,6 +766,10 @@ public String toString() {
761766
}
762767
diskBuilder.append("/>\n");
763768

769+
if (_serial != null && !_serial.isEmpty() && _deviceType != DeviceType.LUN) {
770+
diskBuilder.append("<serial>" + _serial + "</serial>");
771+
}
772+
764773
if ((_deviceType != DeviceType.CDROM) &&
765774
(s_libvirtVersion >= 9008) &&
766775
(s_qemuVersion >= 1001000) &&

plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ protected synchronized String attachOrDetachDevice(final Connect conn, final boo
944944
return null;
945945
}
946946

947-
protected synchronized String attachOrDetachDisk(final Connect conn, final boolean attach, final String vmName, final KVMPhysicalDisk attachingDisk, final int devId) throws LibvirtException,
947+
protected synchronized String attachOrDetachDisk(final Connect conn, final boolean attach, final String vmName, final KVMPhysicalDisk attachingDisk, final int devId, final String serial) throws LibvirtException,
948948
InternalErrorException {
949949
List<DiskDef> disks = null;
950950
Domain dm = null;
@@ -980,6 +980,7 @@ protected synchronized String attachOrDetachDisk(final Connect conn, final boole
980980
}
981981
} else {
982982
diskdef = new DiskDef();
983+
diskdef.setSerial(serial);
983984
if (attachingPool.getType() == StoragePoolType.RBD) {
984985
if(resource.getHypervisorType() == Hypervisor.HypervisorType.LXC){
985986
// For LXC, map image to host and then attach to Vm
@@ -1022,14 +1023,15 @@ public Answer attachVolume(final AttachCommand cmd) {
10221023
final VolumeObjectTO vol = (VolumeObjectTO)disk.getData();
10231024
final PrimaryDataStoreTO primaryStore = (PrimaryDataStoreTO)vol.getDataStore();
10241025
final String vmName = cmd.getVmName();
1026+
final String serial = resource.diskUuidToSerial(vol.getUuid());
10251027
try {
10261028
final Connect conn = LibvirtConnection.getConnectionByVmName(vmName);
10271029

10281030
storagePoolMgr.connectPhysicalDisk(primaryStore.getPoolType(), primaryStore.getUuid(), vol.getPath(), disk.getDetails());
10291031

10301032
final KVMPhysicalDisk phyDisk = storagePoolMgr.getPhysicalDisk(primaryStore.getPoolType(), primaryStore.getUuid(), vol.getPath());
10311033

1032-
attachOrDetachDisk(conn, true, vmName, phyDisk, disk.getDiskSeq().intValue());
1034+
attachOrDetachDisk(conn, true, vmName, phyDisk, disk.getDiskSeq().intValue(), serial);
10331035

10341036
return new AttachAnswer(disk);
10351037
} catch (final LibvirtException e) {
@@ -1048,12 +1050,13 @@ public Answer dettachVolume(final DettachCommand cmd) {
10481050
final VolumeObjectTO vol = (VolumeObjectTO)disk.getData();
10491051
final PrimaryDataStoreTO primaryStore = (PrimaryDataStoreTO)vol.getDataStore();
10501052
final String vmName = cmd.getVmName();
1053+
final String serial = resource.diskUuidToSerial(vol.getUuid());
10511054
try {
10521055
final Connect conn = LibvirtConnection.getConnectionByVmName(vmName);
10531056

10541057
final KVMPhysicalDisk phyDisk = storagePoolMgr.getPhysicalDisk(primaryStore.getPoolType(), primaryStore.getUuid(), vol.getPath());
10551058

1056-
attachOrDetachDisk(conn, false, vmName, phyDisk, disk.getDiskSeq().intValue());
1059+
attachOrDetachDisk(conn, false, vmName, phyDisk, disk.getDiskSeq().intValue(), serial);
10571060

10581061
storagePoolMgr.disconnectPhysicalDisk(primaryStore.getPoolType(), primaryStore.getUuid(), vol.getPath());
10591062

0 commit comments

Comments
 (0)