1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-03 01:16:10 +00:00

fix(vmbackups): second audit: a frozen guest, refused copies, stuck deletes, lists

Codex's audit of the module, each fix tested:
- a backup cancelled while its guest stayed frozen ends through recovery,
  which thaws the guest first, not as a cancel that never thaws it;
- a restore copy libvirt refuses fails and removes the copies, instead of
  waiting on an administrator as an unknown outcome;
- a deletion that did not end can be asked again from the page;
- recovery starts a restored VM the restore was asked to start;
- a manifest with a bad UUID no longer stops reading the target's others;
- an owner is not linked to a job only its submitter or a superuser opens.

From the browser audit: with a long VM name the backup list pushed the
state and the actions out of view, and on a phone only the time and VM
showed. The list folds the target under the time and the schedule under
the VM, cuts long names (whole on hover), shows the restore menu as an
icon on a phone, and fits from 390 px up. An owner without a backup quota
is told so, and quota sizes never read 0.0 GiB.
This commit is contained in:
catborise 2026-11-17 23:27:44 +03:00
parent 012eba0c80
commit df11685037
14 changed files with 313 additions and 207 deletions

Binary file not shown.

View file

@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-11-17 19:26+0000\n"
"POT-Creation-Date: 2026-11-17 20:27+0000\n"
"PO-Revision-Date: 2020-11-04 12:00+0000\n"
"Last-Translator: catborise <muhammetalisag@gmail.com>, 2020\n"
"Language-Team: Turkish (https://www.transifex.com/catborise/teams/110663/tr/)\n"
@ -3303,7 +3303,7 @@ msgstr ""
msgid "The name of the virtual machine must not contain any special characters"
msgstr "Sanal makine adı özel karakterler içeremez"
#: instances/jobs.py:73 vmbackups/jobs.py:134
#: instances/jobs.py:73 vmbackups/jobs.py:138
msgid "The VM moved to another compute after the job was queued"
msgstr "İş kuyruğa alındıktan sonra sanal makine başka bir sunucuya taşındı"
@ -3324,17 +3324,17 @@ msgstr "Klonun adını boş adlar listesinden seçin"
msgid "%(quota)s: cannot create '%(clone_name)s'."
msgstr "%(quota)s: '%(clone_name)s' oluşturulamıyor."
#: instances/jobs.py:206 instances/jobs.py:646 vmbackups/jobs.py:675
#: instances/jobs.py:206 instances/jobs.py:646 vmbackups/jobs.py:681
#, python-format
msgid "Instance '%(clone_name)s' already exists!"
msgstr "'%(clone_name)s' sanal makinesi zaten mevcut!"
#: instances/jobs.py:208 vmbackups/jobs.py:677
#: instances/jobs.py:208 vmbackups/jobs.py:683
#, python-format
msgid "Instance name '%(clone_name)s' is longer than 64 characters"
msgstr "'%(clone_name)s' sanal makine adı 64 karakterden uzun"
#: instances/jobs.py:211 vmbackups/jobs.py:679
#: instances/jobs.py:211 vmbackups/jobs.py:685
#, python-format
msgid "Instance name '%(clone_name)s' contains invalid characters!"
msgstr "Sanal makine adı '%(clone_name)s' geçersiz karakterler içermektedir!"
@ -3491,12 +3491,12 @@ msgid "Clone VM"
msgstr "Sanal makineyi klonla"
#: instances/jobs.py:656 instances/jobs.py:663 instances/jobs.py:1005
#: vmbackups/jobs.py:351 vmbackups/jobs.py:842 vmbackups/jobs.py:1012
#: vmbackups/jobs.py:1187
#: vmbackups/jobs.py:355 vmbackups/jobs.py:848 vmbackups/jobs.py:1030
#: vmbackups/jobs.py:1205
msgid "Copying disks"
msgstr "Diskler kopyalanıyor"
#: instances/jobs.py:715 vmbackups/jobs.py:431
#: instances/jobs.py:715 vmbackups/jobs.py:435
msgid "libvirt has no result of the copy"
msgstr "libvirt'te kopyanın sonucu yok"
@ -3509,7 +3509,7 @@ msgstr ""
"Kopyalama başarısız oldu: %(error)s. Konuğun dosya sistemleri çözülemedi "
"(%(thaw)s); şununla çözün: virsh domfsthaw %(vm)s"
#: instances/jobs.py:729 instances/jobs.py:821 vmbackups/jobs.py:437
#: instances/jobs.py:729 instances/jobs.py:821 vmbackups/jobs.py:443
msgid "The copy failed"
msgstr "Kopyalama başarısız oldu"
@ -3531,11 +3531,11 @@ msgstr ""
"Klonun bir birimi oluşturuluyordu; şu birimleri kontrol edin, sonra bu işi "
"çözün: %(volumes)s"
#: instances/jobs.py:801 vmbackups/jobs.py:474
#: instances/jobs.py:801 vmbackups/jobs.py:480
msgid "The job stopped before the copy started"
msgstr "İş, kopyalama başlamadan durdu"
#: instances/jobs.py:808 vmbackups/jobs.py:522
#: instances/jobs.py:808 vmbackups/jobs.py:528
msgid "libvirt is still copying the disks"
msgstr "libvirt diskleri hâlâ kopyalıyor"
@ -4000,7 +4000,7 @@ msgstr "Harf, rakam, nokta, tire ve alt çizgi."
#: instances/templates/add_instance_volume.html:44
#: instances/templates/instances/settings_tab.html:851
#: vmbackups/templates/vmbackups/index.html:48
#: vmbackups/templates/vmbackups/index.html:50
#: vmbackups/templates/vmbackups/vm_tab.html:42
msgid "Size"
msgstr "Boyut"
@ -4161,7 +4161,7 @@ msgstr "Adres"
#: instances/templates/allinstances.html:105 instances/views.py:240
#: interfaces/templates/interface.html:153 networks/templates/network.html:202
#: vmbackups/templates/vmbackups/index.html:17
#: vmbackups/templates/vmbackups/index.html:47
#: vmbackups/templates/vmbackups/index.html:48
#: vmbackups/templates/vmbackups/policy.html:29
msgid "VM"
msgstr "VM"
@ -6654,7 +6654,7 @@ msgstr "Çok fazla arama hâlâ çalışıyor; birazdan yeniden deneyin."
#: operations/templates/operations/jobs.html:62
#: storages/templates/storage.html:91
#: vmbackups/templates/vmbackups/index.html:28
#: vmbackups/templates/vmbackups/index.html:48
#: vmbackups/templates/vmbackups/index.html:50
#: vmbackups/templates/vmbackups/policies.html:18
#: vmbackups/templates/vmbackups/vm_tab.html:42
msgid "State"
@ -9838,7 +9838,7 @@ msgstr ""
msgid "Choose a compute or VMs, not both"
msgstr "Bir sunucu ya da sanal makineler seçin, ikisini birden değil"
#: vmbackups/forms.py:108 vmbackups/jobs.py:106
#: vmbackups/forms.py:108 vmbackups/jobs.py:110
#, python-format
msgid "Backup target %(target)s has no storage pool on %(compute)s"
msgstr "%(target)s yedek hedefinin %(compute)s üzerinde depolama havuzu yok"
@ -9853,20 +9853,25 @@ msgid "Backup target %(target)s is not open to VM owners"
msgstr "%(target)s yedek hedefi VM sahiplerine açık değil"
#: vmbackups/jobs.py:86
msgid ""
"You have no backup quota; an administrator sets it with your user's quota"
msgstr "Yedek kotanız yok; bir yönetici bunu kullanıcı kotanızda ayarlar"
#: vmbackups/jobs.py:90
#, python-format
msgid ""
"The backup needs %(needed).1f GiB; %(used).1f GiB of your %(limit)d GiB "
"The backup needs about %(needed)s GiB; %(used)s GiB of your %(limit)d GiB "
"backup quota is used"
msgstr ""
"Yedek %(needed).1f GiB gerektiriyor; %(limit)d GiB yedek kotanızın %(used).1f"
" GiB'ı kullanılıyor"
"Yedek yaklaşık %(needed)s GiB gerektiriyor; %(limit)d GiB yedek kotanızın "
"%(used)s GiB'ı kullanılıyor"
#: vmbackups/jobs.py:116
#: vmbackups/jobs.py:120
msgid "The VM must be running, paused or shut off to be backed up"
msgstr ""
"Yedeklenmek için sanal makine çalışıyor, duraklatılmış ya da kapalı olmalı"
#: vmbackups/jobs.py:120
#: vmbackups/jobs.py:124
msgid ""
"A running VM's backup needs libvirt 11.10 or later; shut the VM down to back "
"it up"
@ -9874,45 +9879,45 @@ msgstr ""
"Çalışan bir sanal makinenin yedeği libvirt 11.10 veya sonrasını gerektirir; "
"yedeklemek için sanal makineyi kapatın"
#: vmbackups/jobs.py:122
#: vmbackups/jobs.py:126
msgid "A paused VM's file systems cannot be frozen"
msgstr "Duraklatılmış bir sanal makinenin dosya sistemleri dondurulamaz"
#: vmbackups/jobs.py:124
#: vmbackups/jobs.py:128
msgid "The guest agent does not answer: the file systems cannot be frozen"
msgstr "Konuk ajanı yanıt vermiyor: dosya sistemleri dondurulamaz"
#: vmbackups/jobs.py:181
#: vmbackups/jobs.py:185
msgid ""
"The VM's NVRAM file changed while it was backed up; back the VM up again"
msgstr ""
"Sanal makinenin NVRAM dosyası yedeklenirken değişti; sanal makineyi yeniden "
"yedekleyin"
#: vmbackups/jobs.py:291
#: vmbackups/jobs.py:295
msgid "Back up VM"
msgstr "Sanal makineyi yedekle"
#: vmbackups/jobs.py:330
#: vmbackups/jobs.py:334
msgid "The schedule's window ended before the backup could start"
msgstr "Yedek başlayamadan zamanlamanın penceresi bitti"
#: vmbackups/jobs.py:332
#: vmbackups/jobs.py:336
#, python-format
msgid ""
"%(compute)s went into maintenance before the scheduled backup could start"
msgstr "Zamanlanmış yedek başlayamadan %(compute)s bakıma alındı"
#: vmbackups/jobs.py:367 vmbackups/jobs.py:438
#: vmbackups/jobs.py:371 vmbackups/jobs.py:444
msgid "Writing the backup's files"
msgstr "Yedeğin dosyaları yazılıyor"
#: vmbackups/jobs.py:450
#: vmbackups/jobs.py:456
msgid "The guest's file systems could not be thawed; trying again"
msgstr ""
"Konuğun dosya sistemlerinin dondurulması kaldırılamadı; yeniden deneniyor"
#: vmbackups/jobs.py:499
#: vmbackups/jobs.py:505
#, python-format
msgid ""
"The VM is no longer on the compute the job ran on; check these volumes of the"
@ -9921,7 +9926,7 @@ msgstr ""
"Sanal makine artık işin çalıştığı sunucuda değil; yedek hedefindeki şu "
"birimleri kontrol edin, sonra bu işi çözün: %(volumes)s"
#: vmbackups/jobs.py:516
#: vmbackups/jobs.py:522
#, python-format
msgid ""
"A disk was being copied when the job stopped; check these volumes of the "
@ -9930,7 +9935,7 @@ msgstr ""
"İş durduğunda bir disk kopyalanıyordu; yedek hedefindeki şu birimleri kontrol"
" edin, sonra bu işi çözün: %(volumes)s"
#: vmbackups/jobs.py:526
#: vmbackups/jobs.py:532
#, python-format
msgid ""
"Another backup runs on the VM; check these volumes of the backup target, then"
@ -9939,7 +9944,7 @@ msgstr ""
"Sanal makinede başka bir yedekleme çalışıyor; yedek hedefindeki şu birimleri "
"kontrol edin, sonra bu işi çözün: %(volumes)s"
#: vmbackups/jobs.py:532
#: vmbackups/jobs.py:538
#, python-format
msgid ""
"libvirt has no result of the copy; check these volumes of the backup target, "
@ -9948,95 +9953,95 @@ msgstr ""
"libvirt'te kopyanın sonucu yok; yedek hedefindeki şu birimleri kontrol edin, "
"sonra bu işi çözün: %(volumes)s"
#: vmbackups/jobs.py:540
#: vmbackups/jobs.py:546
msgid "The job stopped before the copy ended"
msgstr "İş, kopyalama bitmeden durdu"
#: vmbackups/jobs.py:547
#: vmbackups/jobs.py:553
#, python-format
msgid "The backup's files could not be written: %(error)s"
msgstr "Yedeğin dosyaları yazılamadı: %(error)s"
#: vmbackups/jobs.py:567
#: vmbackups/jobs.py:573
#, python-format
msgid "No compute of backup target %(target)s reaches its storage pool"
msgstr ""
"%(target)s yedek hedefinin hiçbir sunucusu depolama havuzuna erişemiyor"
#: vmbackups/jobs.py:601 vmbackups/templates/vmbackups/delete_form.html:11
#: vmbackups/jobs.py:607 vmbackups/templates/vmbackups/delete_form.html:11
msgid "Delete backup"
msgstr "Yedeği sil"
#: vmbackups/jobs.py:621
#: vmbackups/jobs.py:627
msgid "This backup is being made; cancel its job to stop it"
msgstr "Bu yedek alınıyor; durdurmak için işini iptal edin"
#: vmbackups/jobs.py:623 vmbackups/jobs.py:638
#: vmbackups/jobs.py:629 vmbackups/jobs.py:644
msgid "Later backups depend on this one; delete them first"
msgstr "Sonraki yedekler buna dayanıyor; önce onları silin"
#: vmbackups/jobs.py:636
#: vmbackups/jobs.py:642
msgid "The backup is no longer beyond what its schedule keeps; it is kept"
msgstr "Yedek artık zamanlamasının tuttuğu sayının dışında değil; tutuluyor"
#: vmbackups/jobs.py:656
#: vmbackups/jobs.py:662
msgid "The job stopped before the deletion began"
msgstr "İş, silme başlamadan durdu"
#: vmbackups/jobs.py:692
#: vmbackups/jobs.py:698
#, python-format
msgid "The backup's file %(name)s is missing from the target"
msgstr "Yedeğin %(name)s dosyası hedefte yok"
#: vmbackups/jobs.py:695 vmbackups/jobs.py:697
#: vmbackups/jobs.py:701 vmbackups/jobs.py:703
#, python-format
msgid "The backup's file %(name)s differs from the one written"
msgstr "Yedeğin %(name)s dosyası yazılandan farklı"
#: vmbackups/jobs.py:708
#: vmbackups/jobs.py:714
#, python-format
msgid "The backup taken %(time)s builds on a backup that is gone"
msgstr "%(time)s tarihli yedek artık olmayan bir yedeğe dayanıyor"
#: vmbackups/jobs.py:722
#: vmbackups/jobs.py:728
#, python-format
msgid "The backup's TPM state file %(name)s is not a plain file name"
msgstr "Yedeğin TPM durum dosyası %(name)s düz bir dosya adı değil"
#: vmbackups/jobs.py:734 vmbackups/templates/vmbackups/restore.html:7
#: vmbackups/jobs.py:740 vmbackups/templates/vmbackups/restore.html:7
msgid "Restore backup"
msgstr "Yedeği geri yükle"
#: vmbackups/jobs.py:768
#: vmbackups/jobs.py:774
#, python-format
msgid "%(quota)s: cannot restore %(name)s"
msgstr "%(quota)s: %(name)s geri yüklenemiyor"
#: vmbackups/jobs.py:775 vmbackups/jobs.py:969 vmbackups/jobs.py:1153
#: vmbackups/jobs.py:781 vmbackups/jobs.py:987 vmbackups/jobs.py:1171
msgid "Only a ready backup is restored"
msgstr "Yalnızca hazır bir yedek geri yüklenir"
#: vmbackups/jobs.py:812
#: vmbackups/jobs.py:818
#, python-format
msgid "A VM named %(name)s exists on %(compute)s"
msgstr "%(compute)s üzerinde %(name)s adlı bir sanal makine var"
#: vmbackups/jobs.py:820 vmbackups/jobs.py:1006 vmbackups/jobs.py:1183
#: vmbackups/jobs.py:826 vmbackups/jobs.py:1024 vmbackups/jobs.py:1201
#, python-format
msgid "This host has no active directory storage pool %(pool)s"
msgstr "Bu sunucuda %(pool)s adlı etkin bir dizin depolama havuzu yok"
#: vmbackups/jobs.py:838
#: vmbackups/jobs.py:844
#, python-format
msgid "The NVRAM file %(path)s exists already"
msgstr "%(path)s NVRAM dosyası zaten var"
#: vmbackups/jobs.py:874
#: vmbackups/jobs.py:884 vmbackups/jobs.py:910
#, python-format
msgid "The VM was restored; it did not start: %(error)s"
msgstr "Sanal makine geri yüklendi; başlamadı: %(error)s"
#: vmbackups/jobs.py:896 vmbackups/jobs.py:1112
#: vmbackups/jobs.py:914 vmbackups/jobs.py:1130
#, python-format
msgid ""
"A disk was being copied when the job stopped; check this volume, then resolve"
@ -10045,7 +10050,7 @@ msgstr ""
"İş durduğunda bir disk kopyalanıyordu; bu birimi kontrol edin, sonra bu işi "
"çözün: %(volumes)s"
#: vmbackups/jobs.py:901 vmbackups/jobs.py:1118
#: vmbackups/jobs.py:919 vmbackups/jobs.py:1136
#, python-format
msgid ""
"Storage pool %(pool)s is not active; the restore's copies in it are removed "
@ -10054,20 +10059,20 @@ msgstr ""
"%(pool)s depolama havuzu etkin değil; geri yüklemenin içindeki kopyaları "
"havuz etkin olunca kaldırılır"
#: vmbackups/jobs.py:915
#: vmbackups/jobs.py:933
msgid "The VM was not defined; its copies were removed"
msgstr "Sanal makine tanımlanmadı; kopyaları kaldırıldı"
#: vmbackups/jobs.py:928
#: vmbackups/jobs.py:946
msgid "Shut the VM down to restore a backup over it"
msgstr "Üzerine yedek geri yüklemek için VM'i kapatın"
#: vmbackups/jobs.py:931
#: vmbackups/jobs.py:949
msgid "The VM has snapshots; delete them to restore a backup over it"
msgstr ""
"VM'in anlık görüntüleri var; üzerine yedek geri yüklemek için onları silin"
#: vmbackups/jobs.py:936
#: vmbackups/jobs.py:954
#, python-format
msgid ""
"The VM's disks (%(now)s) are not the backup's (%(then)s); restore it as a new"
@ -10076,7 +10081,7 @@ msgstr ""
"VM'in diskleri (%(now)s) yedeğinkiler (%(then)s) değil; yeni bir VM olarak ya"
" da tek disk olarak geri yükleyin"
#: vmbackups/jobs.py:940
#: vmbackups/jobs.py:958
#, python-format
msgid ""
"The backup's disk %(dev)s is larger than the VM's now; restore it as a new VM"
@ -10084,37 +10089,37 @@ msgstr ""
"Yedeğin %(dev)s diski VM'in şimdiki diskinden büyük; yeni bir VM olarak geri "
"yükleyin"
#: vmbackups/jobs.py:943
#: vmbackups/jobs.py:961
msgid "The VM's UEFI firmware changed since the backup; restore it as a new VM"
msgstr ""
"VM'in UEFI donanım yazılımı yedekten sonra değişti; yeni bir VM olarak geri "
"yükleyin"
#: vmbackups/jobs.py:945
#: vmbackups/jobs.py:963
msgid "The VM's TPM changed since the backup; restore it as a new VM"
msgstr "VM'in TPM'i yedekten sonra değişti; yeni bir VM olarak geri yükleyin"
#: vmbackups/jobs.py:960
#: vmbackups/jobs.py:978
msgid "Restore backup over the VM"
msgstr "Yedeği VM'in üzerine geri yükle"
#: vmbackups/jobs.py:973
#: vmbackups/jobs.py:991
msgid "The backup's VM is no longer in the panel; restore it as a new VM"
msgstr "Yedeğin VM'i artık panelde yok; yeni bir VM olarak geri yükleyin"
#: vmbackups/jobs.py:997
#: vmbackups/jobs.py:1015
msgid "The VM's disks changed after the job was queued"
msgstr "İş kuyruğa alındıktan sonra VM'in diskleri değişti"
#: vmbackups/jobs.py:1029
#: vmbackups/jobs.py:1047
msgid "The VM changed while its backup was copied; it keeps its disks"
msgstr "Yedeği kopyalanırken VM değişti; VM disklerini koruyor"
#: vmbackups/jobs.py:1032
#: vmbackups/jobs.py:1050
msgid "Replacing the VM's disks"
msgstr "VM'in diskleri değiştiriliyor"
#: vmbackups/jobs.py:1092
#: vmbackups/jobs.py:1110
msgid ""
"The VM moved to another compute; check its disks and the restore's copies, "
"then resolve this job"
@ -10122,7 +10127,7 @@ msgstr ""
"VM başka bir sunucuya taşındı; disklerini ve geri yüklemenin kopyalarını "
"denetleyin, sonra bu işi çözümleyin"
#: vmbackups/jobs.py:1105
#: vmbackups/jobs.py:1123
msgid ""
"The VM was started while its disks were being replaced; check its disks, then"
" resolve this job"
@ -10130,25 +10135,25 @@ msgstr ""
"VM'in diskleri değiştirilirken VM başlatıldı; disklerini denetleyin, sonra bu"
" işi çözümleyin"
#: vmbackups/jobs.py:1123
#: vmbackups/jobs.py:1141
msgid "The VM keeps its disks; the restore's copies were removed"
msgstr "VM disklerini koruyor; geri yüklemenin kopyaları silindi"
#: vmbackups/jobs.py:1135
#: vmbackups/jobs.py:1153
msgid "Restore a disk of a backup"
msgstr "Yedeğin bir diskini geri yükle"
#: vmbackups/jobs.py:1146
#: vmbackups/jobs.py:1164
#, python-format
msgid "The backup has no disk %(dev)s"
msgstr "Yedekte %(dev)s diski yok"
#: vmbackups/jobs.py:1156
#: vmbackups/jobs.py:1174
#, python-format
msgid "%(name)s is not a volume name"
msgstr "%(name)s bir birim adı değil"
#: vmbackups/jobs.py:1215
#: vmbackups/jobs.py:1233
#, python-format
msgid ""
"The disk was being copied when the job stopped; check this volume, then "
@ -10157,15 +10162,15 @@ msgstr ""
"İş durduğunda disk kopyalanıyordu; bu birimi denetleyin, sonra bu işi "
"çözümleyin: %(volume)s"
#: vmbackups/jobs.py:1218
#: vmbackups/jobs.py:1236
msgid "The disk was not restored"
msgstr "Disk geri yüklenmedi"
#: vmbackups/jobs.py:1239 vmbackups/templates/vmbackups/target.html:23
#: vmbackups/jobs.py:1257 vmbackups/templates/vmbackups/target.html:23
msgid "Read backups from target"
msgstr "Yedekleri hedeften oku"
#: vmbackups/jobs.py:1300
#: vmbackups/jobs.py:1318
#, python-format
msgid ""
"Not read, as a file of the backup is missing, changed or unreadable: "
@ -10174,11 +10179,11 @@ msgstr ""
"Yedeğin bir dosyası eksik, değişmiş ya da okunamaz olduğu için okunmadı: "
"%(names)s"
#: vmbackups/jobs.py:1316
#: vmbackups/jobs.py:1334
msgid "Check backup target"
msgstr "Yedek hedefini denetle"
#: vmbackups/jobs.py:1347
#: vmbackups/jobs.py:1365
#, python-format
msgid "Files of these backups are missing from the target: %(backups)s"
msgstr "Şu yedeklerin dosyaları hedefte yok: %(backups)s"
@ -10265,7 +10270,7 @@ msgid "VM name"
msgstr "Sanal makine adı"
#: vmbackups/templates/vmbackups/index.html:21
#: vmbackups/templates/vmbackups/index.html:47
#: vmbackups/templates/vmbackups/index.html:57
#: vmbackups/templates/vmbackups/policies.html:17
#: vmbackups/templates/vmbackups/vm_tab.html:42
msgid "Target"
@ -10290,33 +10295,29 @@ msgstr "Oluşturuluyor"
msgid "Deleting"
msgstr "Siliniyor"
#: vmbackups/templates/vmbackups/index.html:47
#: vmbackups/templates/vmbackups/index.html:48
#: vmbackups/templates/vmbackups/vm_tab.html:42
msgid "Time"
msgstr "Zaman"
#: vmbackups/templates/vmbackups/index.html:47
#: vmbackups/templates/vmbackups/index.html:49
#: vmbackups/templates/vmbackups/vm_tab.html:42
msgid "Consistency"
msgstr "Tutarlılık"
#: vmbackups/templates/vmbackups/index.html:47
msgid "Schedule"
msgstr "Zamanlama"
#: vmbackups/templates/vmbackups/index.html:56
#: vmbackups/templates/vmbackups/index.html:60
msgid "removed"
msgstr "kaldırıldı"
#: vmbackups/templates/vmbackups/index.html:61
msgid "By hand"
msgstr "Elle"
msgid "Schedule"
msgstr "Zamanlama"
#: vmbackups/templates/vmbackups/index.html:71
#: vmbackups/templates/vmbackups/index.html:73
msgid "No backup matches the filter."
msgstr "Süzgece uyan yedek yok."
#: vmbackups/templates/vmbackups/index.html:73
#: vmbackups/templates/vmbackups/index.html:75
msgid "No backup yet. Back a VM up from its Backups tab."
msgstr "Henüz yedek yok. Bir sanal makineyi Yedekler sekmesinden yedekleyin."
@ -10501,6 +10502,10 @@ msgstr ""
"Yedek %(vm)s üzerine geri yüklensin mi? VM'in yedekten sonra yazdıkları, "
"çalışacağı disklerde artık olmaz."
#: vmbackups/templates/vmbackups/state.html:1
msgid "Its deletion did not end; delete it again"
msgstr "Silinmesi tamamlanmadı; yeniden silin"
#: vmbackups/templates/vmbackups/state.html:1
msgid "Files of the backup are missing from the target"
msgstr "Yedeğin dosyaları hedefte yok"

Binary file not shown.

View file

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-11-17 19:26+0000\n"
"POT-Creation-Date: 2026-11-17 20:27+0000\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
@ -3145,7 +3145,7 @@ msgstr "控制台监听的不只是 localhost;只有管理员可以移除其
msgid "The name of the virtual machine must not contain any special characters"
msgstr "虚拟机名称不能包含任何特殊字符"
#: instances/jobs.py:73 vmbackups/jobs.py:134
#: instances/jobs.py:73 vmbackups/jobs.py:138
msgid "The VM moved to another compute after the job was queued"
msgstr "任务排队后,虚拟机已移到另一个计算节点"
@ -3166,17 +3166,17 @@ msgstr "请从可用名称列表中选择克隆的名称"
msgid "%(quota)s: cannot create '%(clone_name)s'."
msgstr "%(quota)s:无法创建“%(clone_name)s”。"
#: instances/jobs.py:206 instances/jobs.py:646 vmbackups/jobs.py:675
#: instances/jobs.py:206 instances/jobs.py:646 vmbackups/jobs.py:681
#, python-format
msgid "Instance '%(clone_name)s' already exists!"
msgstr "虚拟机 '%(clone_name)s' 已存在!"
#: instances/jobs.py:208 vmbackups/jobs.py:677
#: instances/jobs.py:208 vmbackups/jobs.py:683
#, python-format
msgid "Instance name '%(clone_name)s' is longer than 64 characters"
msgstr "虚拟机名称“%(clone_name)s”超过 64 个字符"
#: instances/jobs.py:211 vmbackups/jobs.py:679
#: instances/jobs.py:211 vmbackups/jobs.py:685
#, python-format
msgid "Instance name '%(clone_name)s' contains invalid characters!"
msgstr "虚拟机名称 '%(clone_name)s' 包含无效字符!"
@ -3318,12 +3318,12 @@ msgid "Clone VM"
msgstr "克隆虚拟机"
#: instances/jobs.py:656 instances/jobs.py:663 instances/jobs.py:1005
#: vmbackups/jobs.py:351 vmbackups/jobs.py:842 vmbackups/jobs.py:1012
#: vmbackups/jobs.py:1187
#: vmbackups/jobs.py:355 vmbackups/jobs.py:848 vmbackups/jobs.py:1030
#: vmbackups/jobs.py:1205
msgid "Copying disks"
msgstr "正在复制磁盘"
#: instances/jobs.py:715 vmbackups/jobs.py:431
#: instances/jobs.py:715 vmbackups/jobs.py:435
msgid "libvirt has no result of the copy"
msgstr "libvirt 没有复制的结果"
@ -3334,7 +3334,7 @@ msgid ""
"(%(thaw)s); thaw them with: virsh domfsthaw %(vm)s"
msgstr "复制失败:%(error)s。无法解冻客户机的文件系统(%(thaw)s);请用以下命令解冻:virsh domfsthaw %(vm)s"
#: instances/jobs.py:729 instances/jobs.py:821 vmbackups/jobs.py:437
#: instances/jobs.py:729 instances/jobs.py:821 vmbackups/jobs.py:443
msgid "The copy failed"
msgstr "复制失败"
@ -3352,11 +3352,11 @@ msgid ""
"this job: %(volumes)s"
msgstr "克隆的一个卷正在创建中;请检查这些卷,然后处理此任务:%(volumes)s"
#: instances/jobs.py:801 vmbackups/jobs.py:474
#: instances/jobs.py:801 vmbackups/jobs.py:480
msgid "The job stopped before the copy started"
msgstr "任务在复制开始前停止"
#: instances/jobs.py:808 vmbackups/jobs.py:522
#: instances/jobs.py:808 vmbackups/jobs.py:528
msgid "libvirt is still copying the disks"
msgstr "libvirt 仍在复制磁盘"
@ -3798,7 +3798,7 @@ msgstr "字母、数字、点、短横线和下划线。"
#: instances/templates/add_instance_volume.html:44
#: instances/templates/instances/settings_tab.html:851
#: vmbackups/templates/vmbackups/index.html:48
#: vmbackups/templates/vmbackups/index.html:50
#: vmbackups/templates/vmbackups/vm_tab.html:42
msgid "Size"
msgstr "大小"
@ -3954,7 +3954,7 @@ msgstr "地址"
#: instances/templates/allinstances.html:105 instances/views.py:240
#: interfaces/templates/interface.html:153 networks/templates/network.html:202
#: vmbackups/templates/vmbackups/index.html:17
#: vmbackups/templates/vmbackups/index.html:47
#: vmbackups/templates/vmbackups/index.html:48
#: vmbackups/templates/vmbackups/policy.html:29
msgid "VM"
msgstr "虚拟机"
@ -6270,7 +6270,7 @@ msgstr "仍在运行的搜索过多;请稍后再试。"
#: operations/templates/operations/jobs.html:62
#: storages/templates/storage.html:91
#: vmbackups/templates/vmbackups/index.html:28
#: vmbackups/templates/vmbackups/index.html:48
#: vmbackups/templates/vmbackups/index.html:50
#: vmbackups/templates/vmbackups/policies.html:18
#: vmbackups/templates/vmbackups/vm_tab.html:42
msgid "State"
@ -9276,7 +9276,7 @@ msgstr "1:每次备份都是完整备份。大于 1 时,中间的备份只
msgid "Choose a compute or VMs, not both"
msgstr "请选择一个计算节点或若干虚拟机,不能同时选择"
#: vmbackups/forms.py:108 vmbackups/jobs.py:106
#: vmbackups/forms.py:108 vmbackups/jobs.py:110
#, python-format
msgid "Backup target %(target)s has no storage pool on %(compute)s"
msgstr "备份目标 %(target)s 在 %(compute)s 上没有存储池"
@ -9291,296 +9291,301 @@ msgid "Backup target %(target)s is not open to VM owners"
msgstr "备份目标 %(target)s 未向虚拟机所有者开放"
#: vmbackups/jobs.py:86
msgid ""
"You have no backup quota; an administrator sets it with your user's quota"
msgstr "您没有备份配额;管理员可在您的用户配额中设置"
#: vmbackups/jobs.py:90
#, python-format
msgid ""
"The backup needs %(needed).1f GiB; %(used).1f GiB of your %(limit)d GiB "
"The backup needs about %(needed)s GiB; %(used)s GiB of your %(limit)d GiB "
"backup quota is used"
msgstr "备份需要 %(needed).1f GiB;您的 %(limit)d GiB 备份配额已使用 %(used).1f GiB"
msgstr "备份大约需要 %(needed)s GiB;您的 %(limit)d GiB 备份配额已使用 %(used)s GiB"
#: vmbackups/jobs.py:116
#: vmbackups/jobs.py:120
msgid "The VM must be running, paused or shut off to be backed up"
msgstr "虚拟机必须处于运行、暂停或关闭状态才能备份"
#: vmbackups/jobs.py:120
#: vmbackups/jobs.py:124
msgid ""
"A running VM's backup needs libvirt 11.10 or later; shut the VM down to back "
"it up"
msgstr "运行中虚拟机的备份需要 libvirt 11.10 或更高版本;请关闭虚拟机后再备份"
#: vmbackups/jobs.py:122
#: vmbackups/jobs.py:126
msgid "A paused VM's file systems cannot be frozen"
msgstr "无法冻结已暂停虚拟机的文件系统"
#: vmbackups/jobs.py:124
#: vmbackups/jobs.py:128
msgid "The guest agent does not answer: the file systems cannot be frozen"
msgstr "客户机代理没有响应:无法冻结文件系统"
#: vmbackups/jobs.py:181
#: vmbackups/jobs.py:185
msgid ""
"The VM's NVRAM file changed while it was backed up; back the VM up again"
msgstr "虚拟机的 NVRAM 文件在备份期间发生了变化;请重新备份该虚拟机"
#: vmbackups/jobs.py:291
#: vmbackups/jobs.py:295
msgid "Back up VM"
msgstr "备份虚拟机"
#: vmbackups/jobs.py:330
#: vmbackups/jobs.py:334
msgid "The schedule's window ended before the backup could start"
msgstr "备份开始前计划的时间窗口已结束"
#: vmbackups/jobs.py:332
#: vmbackups/jobs.py:336
#, python-format
msgid ""
"%(compute)s went into maintenance before the scheduled backup could start"
msgstr "计划的备份开始前 %(compute)s 已进入维护"
#: vmbackups/jobs.py:367 vmbackups/jobs.py:438
#: vmbackups/jobs.py:371 vmbackups/jobs.py:444
msgid "Writing the backup's files"
msgstr "正在写入备份文件"
#: vmbackups/jobs.py:450
#: vmbackups/jobs.py:456
msgid "The guest's file systems could not be thawed; trying again"
msgstr "无法解冻客户机的文件系统;正在重试"
#: vmbackups/jobs.py:499
#: vmbackups/jobs.py:505
#, python-format
msgid ""
"The VM is no longer on the compute the job ran on; check these volumes of the"
" backup target, then resolve this job: %(volumes)s"
msgstr "虚拟机已不在作业运行的计算节点上;请检查备份目标中的这些卷,然后解决此作业:%(volumes)s"
#: vmbackups/jobs.py:516
#: vmbackups/jobs.py:522
#, python-format
msgid ""
"A disk was being copied when the job stopped; check these volumes of the "
"backup target, then resolve this job: %(volumes)s"
msgstr "作业停止时正在复制磁盘;请检查备份目标中的这些卷,然后解决此作业:%(volumes)s"
#: vmbackups/jobs.py:526
#: vmbackups/jobs.py:532
#, python-format
msgid ""
"Another backup runs on the VM; check these volumes of the backup target, then"
" resolve this job: %(volumes)s"
msgstr "虚拟机上正在运行另一个备份;请检查备份目标中的这些卷,然后解决此作业:%(volumes)s"
#: vmbackups/jobs.py:532
#: vmbackups/jobs.py:538
#, python-format
msgid ""
"libvirt has no result of the copy; check these volumes of the backup target, "
"then resolve this job: %(volumes)s"
msgstr "libvirt 没有复制的结果;请检查备份目标中的这些卷,然后解决此作业:%(volumes)s"
#: vmbackups/jobs.py:540
#: vmbackups/jobs.py:546
msgid "The job stopped before the copy ended"
msgstr "作业在复制结束前停止"
#: vmbackups/jobs.py:547
#: vmbackups/jobs.py:553
#, python-format
msgid "The backup's files could not be written: %(error)s"
msgstr "无法写入备份文件:%(error)s"
#: vmbackups/jobs.py:567
#: vmbackups/jobs.py:573
#, python-format
msgid "No compute of backup target %(target)s reaches its storage pool"
msgstr "备份目标 %(target)s 的计算节点都无法访问其存储池"
#: vmbackups/jobs.py:601 vmbackups/templates/vmbackups/delete_form.html:11
#: vmbackups/jobs.py:607 vmbackups/templates/vmbackups/delete_form.html:11
msgid "Delete backup"
msgstr "删除备份"
#: vmbackups/jobs.py:621
#: vmbackups/jobs.py:627
msgid "This backup is being made; cancel its job to stop it"
msgstr "此备份正在创建;要停止它,请取消其作业"
#: vmbackups/jobs.py:623 vmbackups/jobs.py:638
#: vmbackups/jobs.py:629 vmbackups/jobs.py:644
msgid "Later backups depend on this one; delete them first"
msgstr "后续备份依赖于此备份;请先删除它们"
#: vmbackups/jobs.py:636
#: vmbackups/jobs.py:642
msgid "The backup is no longer beyond what its schedule keeps; it is kept"
msgstr "该备份已不再超出其计划保留的数量;予以保留"
#: vmbackups/jobs.py:656
#: vmbackups/jobs.py:662
msgid "The job stopped before the deletion began"
msgstr "任务在删除开始前已停止"
#: vmbackups/jobs.py:692
#: vmbackups/jobs.py:698
#, python-format
msgid "The backup's file %(name)s is missing from the target"
msgstr "目标中缺少备份文件 %(name)s"
#: vmbackups/jobs.py:695 vmbackups/jobs.py:697
#: vmbackups/jobs.py:701 vmbackups/jobs.py:703
#, python-format
msgid "The backup's file %(name)s differs from the one written"
msgstr "备份文件 %(name)s 与写入的不同"
#: vmbackups/jobs.py:708
#: vmbackups/jobs.py:714
#, python-format
msgid "The backup taken %(time)s builds on a backup that is gone"
msgstr "%(time)s 的备份所依赖的备份已不存在"
#: vmbackups/jobs.py:722
#: vmbackups/jobs.py:728
#, python-format
msgid "The backup's TPM state file %(name)s is not a plain file name"
msgstr "备份的 TPM 状态文件 %(name)s 不是普通文件名"
#: vmbackups/jobs.py:734 vmbackups/templates/vmbackups/restore.html:7
#: vmbackups/jobs.py:740 vmbackups/templates/vmbackups/restore.html:7
msgid "Restore backup"
msgstr "恢复备份"
#: vmbackups/jobs.py:768
#: vmbackups/jobs.py:774
#, python-format
msgid "%(quota)s: cannot restore %(name)s"
msgstr "%(quota)s:无法恢复 %(name)s"
#: vmbackups/jobs.py:775 vmbackups/jobs.py:969 vmbackups/jobs.py:1153
#: vmbackups/jobs.py:781 vmbackups/jobs.py:987 vmbackups/jobs.py:1171
msgid "Only a ready backup is restored"
msgstr "只能恢复就绪的备份"
#: vmbackups/jobs.py:812
#: vmbackups/jobs.py:818
#, python-format
msgid "A VM named %(name)s exists on %(compute)s"
msgstr "%(compute)s 上已存在名为 %(name)s 的虚拟机"
#: vmbackups/jobs.py:820 vmbackups/jobs.py:1006 vmbackups/jobs.py:1183
#: vmbackups/jobs.py:826 vmbackups/jobs.py:1024 vmbackups/jobs.py:1201
#, python-format
msgid "This host has no active directory storage pool %(pool)s"
msgstr "此主机没有名为 %(pool)s 的活动目录存储池"
#: vmbackups/jobs.py:838
#: vmbackups/jobs.py:844
#, python-format
msgid "The NVRAM file %(path)s exists already"
msgstr "NVRAM 文件 %(path)s 已存在"
#: vmbackups/jobs.py:874
#: vmbackups/jobs.py:884 vmbackups/jobs.py:910
#, python-format
msgid "The VM was restored; it did not start: %(error)s"
msgstr "虚拟机已恢复;但未能启动:%(error)s"
#: vmbackups/jobs.py:896 vmbackups/jobs.py:1112
#: vmbackups/jobs.py:914 vmbackups/jobs.py:1130
#, python-format
msgid ""
"A disk was being copied when the job stopped; check this volume, then resolve"
" this job: %(volumes)s"
msgstr "作业停止时正在复制磁盘;请检查此卷,然后解决此作业:%(volumes)s"
#: vmbackups/jobs.py:901 vmbackups/jobs.py:1118
#: vmbackups/jobs.py:919 vmbackups/jobs.py:1136
#, python-format
msgid ""
"Storage pool %(pool)s is not active; the restore's copies in it are removed "
"when it is"
msgstr "存储池 %(pool)s 未激活;其中恢复的副本将在其激活后删除"
#: vmbackups/jobs.py:915
#: vmbackups/jobs.py:933
msgid "The VM was not defined; its copies were removed"
msgstr "虚拟机未定义;其副本已删除"
#: vmbackups/jobs.py:928
#: vmbackups/jobs.py:946
msgid "Shut the VM down to restore a backup over it"
msgstr "请先将虚拟机关机,再将备份恢复到其上"
#: vmbackups/jobs.py:931
#: vmbackups/jobs.py:949
msgid "The VM has snapshots; delete them to restore a backup over it"
msgstr "虚拟机有快照;请删除它们后再将备份恢复到其上"
#: vmbackups/jobs.py:936
#: vmbackups/jobs.py:954
#, python-format
msgid ""
"The VM's disks (%(now)s) are not the backup's (%(then)s); restore it as a new"
" VM or one disk"
msgstr "虚拟机的磁盘(%(now)s)与备份的(%(then)s)不同;请恢复为新虚拟机或恢复单个磁盘"
#: vmbackups/jobs.py:940
#: vmbackups/jobs.py:958
#, python-format
msgid ""
"The backup's disk %(dev)s is larger than the VM's now; restore it as a new VM"
msgstr "备份的磁盘 %(dev)s 比虚拟机当前的磁盘大;请恢复为新虚拟机"
#: vmbackups/jobs.py:943
#: vmbackups/jobs.py:961
msgid "The VM's UEFI firmware changed since the backup; restore it as a new VM"
msgstr "备份之后虚拟机的 UEFI 固件已更改;请恢复为新虚拟机"
#: vmbackups/jobs.py:945
#: vmbackups/jobs.py:963
msgid "The VM's TPM changed since the backup; restore it as a new VM"
msgstr "备份之后虚拟机的 TPM 已更改;请恢复为新虚拟机"
#: vmbackups/jobs.py:960
#: vmbackups/jobs.py:978
msgid "Restore backup over the VM"
msgstr "将备份恢复到虚拟机上"
#: vmbackups/jobs.py:973
#: vmbackups/jobs.py:991
msgid "The backup's VM is no longer in the panel; restore it as a new VM"
msgstr "备份的虚拟机已不在面板中;请恢复为新虚拟机"
#: vmbackups/jobs.py:997
#: vmbackups/jobs.py:1015
msgid "The VM's disks changed after the job was queued"
msgstr "任务排队后虚拟机的磁盘已更改"
#: vmbackups/jobs.py:1029
#: vmbackups/jobs.py:1047
msgid "The VM changed while its backup was copied; it keeps its disks"
msgstr "复制备份期间虚拟机发生了变化;虚拟机保留其磁盘"
#: vmbackups/jobs.py:1032
#: vmbackups/jobs.py:1050
msgid "Replacing the VM's disks"
msgstr "正在替换虚拟机的磁盘"
#: vmbackups/jobs.py:1092
#: vmbackups/jobs.py:1110
msgid ""
"The VM moved to another compute; check its disks and the restore's copies, "
"then resolve this job"
msgstr "虚拟机已迁移到另一台计算节点;请检查其磁盘和恢复的副本,然后处理此任务"
#: vmbackups/jobs.py:1105
#: vmbackups/jobs.py:1123
msgid ""
"The VM was started while its disks were being replaced; check its disks, then"
" resolve this job"
msgstr "替换磁盘期间虚拟机被启动;请检查其磁盘,然后处理此任务"
#: vmbackups/jobs.py:1123
#: vmbackups/jobs.py:1141
msgid "The VM keeps its disks; the restore's copies were removed"
msgstr "虚拟机保留其磁盘;恢复的副本已删除"
#: vmbackups/jobs.py:1135
#: vmbackups/jobs.py:1153
msgid "Restore a disk of a backup"
msgstr "恢复备份的一个磁盘"
#: vmbackups/jobs.py:1146
#: vmbackups/jobs.py:1164
#, python-format
msgid "The backup has no disk %(dev)s"
msgstr "备份中没有磁盘 %(dev)s"
#: vmbackups/jobs.py:1156
#: vmbackups/jobs.py:1174
#, python-format
msgid "%(name)s is not a volume name"
msgstr "%(name)s 不是有效的卷名"
#: vmbackups/jobs.py:1215
#: vmbackups/jobs.py:1233
#, python-format
msgid ""
"The disk was being copied when the job stopped; check this volume, then "
"resolve this job: %(volume)s"
msgstr "任务停止时磁盘正在复制;请检查此卷,然后处理此任务:%(volume)s"
#: vmbackups/jobs.py:1218
#: vmbackups/jobs.py:1236
msgid "The disk was not restored"
msgstr "磁盘未恢复"
#: vmbackups/jobs.py:1239 vmbackups/templates/vmbackups/target.html:23
#: vmbackups/jobs.py:1257 vmbackups/templates/vmbackups/target.html:23
msgid "Read backups from target"
msgstr "从目标读取备份"
#: vmbackups/jobs.py:1300
#: vmbackups/jobs.py:1318
#, python-format
msgid ""
"Not read, as a file of the backup is missing, changed or unreadable: "
"%(names)s"
msgstr "由于备份的某个文件缺失、已更改或无法读取,未读取:%(names)s"
#: vmbackups/jobs.py:1316
#: vmbackups/jobs.py:1334
msgid "Check backup target"
msgstr "检查备份目标"
#: vmbackups/jobs.py:1347
#: vmbackups/jobs.py:1365
#, python-format
msgid "Files of these backups are missing from the target: %(backups)s"
msgstr "以下备份的文件在目标中缺失:%(backups)s"
@ -9665,7 +9670,7 @@ msgid "VM name"
msgstr "虚拟机名称"
#: vmbackups/templates/vmbackups/index.html:21
#: vmbackups/templates/vmbackups/index.html:47
#: vmbackups/templates/vmbackups/index.html:57
#: vmbackups/templates/vmbackups/policies.html:17
#: vmbackups/templates/vmbackups/vm_tab.html:42
msgid "Target"
@ -9690,33 +9695,29 @@ msgstr "正在创建"
msgid "Deleting"
msgstr "正在删除"
#: vmbackups/templates/vmbackups/index.html:47
#: vmbackups/templates/vmbackups/index.html:48
#: vmbackups/templates/vmbackups/vm_tab.html:42
msgid "Time"
msgstr "时间"
#: vmbackups/templates/vmbackups/index.html:47
#: vmbackups/templates/vmbackups/index.html:49
#: vmbackups/templates/vmbackups/vm_tab.html:42
msgid "Consistency"
msgstr "一致性"
#: vmbackups/templates/vmbackups/index.html:47
msgid "Schedule"
msgstr "计划"
#: vmbackups/templates/vmbackups/index.html:56
#: vmbackups/templates/vmbackups/index.html:60
msgid "removed"
msgstr "已移除"
#: vmbackups/templates/vmbackups/index.html:61
msgid "By hand"
msgstr "手动"
msgid "Schedule"
msgstr "计划"
#: vmbackups/templates/vmbackups/index.html:71
#: vmbackups/templates/vmbackups/index.html:73
msgid "No backup matches the filter."
msgstr "没有符合筛选条件的备份。"
#: vmbackups/templates/vmbackups/index.html:73
#: vmbackups/templates/vmbackups/index.html:75
msgid "No backup yet. Back a VM up from its Backups tab."
msgstr "还没有备份。请在虚拟机的备份选项卡中备份虚拟机。"
@ -9888,6 +9889,10 @@ msgid ""
"longer on the disks it runs from."
msgstr "将备份恢复到 %(vm)s 上?备份之后虚拟机写入的内容将不在其运行的磁盘上。"
#: vmbackups/templates/vmbackups/state.html:1
msgid "Its deletion did not end; delete it again"
msgstr "其删除未完成;请再次删除"
#: vmbackups/templates/vmbackups/state.html:1
msgid "Files of the backup are missing from the target"
msgstr "备份的文件在目标中缺失"

View file

@ -7,7 +7,7 @@ import re
import time
from uuid import UUID, uuid4
from django.core.exceptions import PermissionDenied
from django.core.exceptions import PermissionDenied, ValidationError
from django.db.models import Sum
from django.http import Http404
from django.urls import reverse
@ -82,9 +82,13 @@ def _backup_quota(user, needed):
return
used = (Backup.objects.filter(taken_by=user, policy__isnull=True, state__in=Backup.LIVING)
.aggregate(total=Sum("size"))["total"] or 0)
if limit == 0:
raise util.OperationError(_("You have no backup quota; an administrator sets it with your user's quota"))
if used + needed > limit * 1024**3:
raise util.OperationError(_("The backup needs %(needed).1f GiB; %(used).1f GiB of your %(limit)d GiB backup "
"quota is used"), needed=needed / 1024**3, used=used / 1024**3, limit=limit)
# in GiB to one decimal, but never 0.0 for a small disk
gib = lambda size: max(round(size / 1024**3, 1), 0.1) if size else 0
raise util.OperationError(_("The backup needs about %(needed)s GiB; %(used)s GiB of your %(limit)d GiB backup "
"quota is used"), needed=gib(needed), used=gib(used), limit=limit)
def _vm_pool(instance):
@ -431,6 +435,8 @@ class CreateBackup(Kind):
raise util.OperationError(_("libvirt has no result of the copy")) # recovery decides
if not result[0]:
_discard(op, pool)
if thaw_error: # the guest is still frozen: recovery thaws it first, a cancelled job would not
raise util.OperationError(THAW_FAILED, error=thaw_error, vm=op.resource_label.rpartition("/")[2])
op.refresh_from_db(fields=["cancel_requested"])
if op.cancel_requested:
raise Cancelled
@ -844,9 +850,13 @@ class RestoreBackup(Kind):
paths = {}
for disk in disks:
ctx.record_intent(copying=disk.dev)
paths[disk.dev] = storage.clone_volume(tpool.storageVolLookupByName(disk.volume), volumes[disk.dev],
vol_fmt=disk.format, disk_owner_uid=_owner()[0],
disk_owner_gid=_owner()[1])
try:
paths[disk.dev] = storage.clone_volume(tpool.storageVolLookupByName(disk.volume), volumes[disk.dev],
vol_fmt=disk.format, disk_owner_uid=_owner()[0],
disk_owner_gid=_owner()[1])
except libvirtError: # libvirt answered: the copy failed; its claimed name goes with the copies
ctx.record_intent(copied=[*op.intent.get("copied", []), disk.dev], copying=None)
raise
ctx.record_intent(copied=[*op.intent.get("copied", []), disk.dev], copying=None)
if nvram and nvram_file:
data = get_file(conn, tpool, nvram_file.volume)
@ -888,9 +898,17 @@ class RestoreBackup(Kind):
except libvirtError as err:
if err.get_error_code() != VIR_ERR_NO_DOMAIN:
raise # unreachable: recovery waits and retries
else: # defined last: the restore is done
else: # defined last: the restore is done, but for the start it was asked for
record_vm(op, owner=True)
return Outcome(Operation.SUCCEEDED, result={"open": _vm_page(op)})
result = {"open": _vm_page(op)}
dom = conn.wvm.lookupByUUIDString(op.intent["uuid"])
if op.params["start"] and not dom.isActive():
try:
compute.refuse_start()
dom.create()
except (libvirtError, util.OperationError) as err:
result["warning"] = say(_("The VM was restored; it did not start: %(error)s"), error=err)
return Outcome(Operation.SUCCEEDED, result=result)
if op.intent.get("copying"): # libvirt's answer to that copy is unknown
return Outcome(Operation.UNCERTAIN, error=say(_(
"A disk was being copied when the job stopped; check this volume, then resolve this job: %(volumes)s"),
@ -1281,7 +1299,7 @@ class ImportBackups(Kind):
fields = {"vm_uuid": vm["uuid"], "vm_name": vm["name"], "compute_name": manifest["compute"],
"consistency": manifest["consistency"], "parent": parent,
"checkpoint": manifest.get("checkpoint") or ""}
except (ValueError, KeyError, TypeError, util.OperationError):
except (ValueError, KeyError, TypeError, ValidationError, util.OperationError):
# cut short, not a manifest of the panel, or a file missing or changed: the others are still read
incomplete.append(name)
continue

View file

@ -1,7 +1,7 @@
{% load i18n %}{% load operations %}{% load bootstrap_icons %}{% if backup.state != "deleting" and backup.uuid|stringformat:"s" not in pending_deletes %}<div class="d-inline-flex gap-1 justify-content-end">{% if backup.state == "ready" %}<div class="btn-group">
{% load i18n %}{% load operations %}{% load bootstrap_icons %}{% if backup.uuid|stringformat:"s" not in pending_deletes %}<div class="d-inline-flex flex-wrap gap-1 justify-content-end">{% if backup.state == "ready" %}<div class="btn-group">
{# fixed: the menu would be cut off by the table's scrolling box #}
<button class="btn btn-sm btn-outline-primary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false"
data-bs-popper-config='{"strategy": "fixed"}'>{% trans "Restore" %}</button>
data-bs-popper-config='{"strategy": "fixed"}' aria-label="{% trans "Restore" %}">{% bs_icon 'arrow-clockwise' %}<span class="d-none d-sm-inline"> {% trans "Restore" %}</span></button>
<ul class="dropdown-menu dropdown-menu-end shadow">
<li><a class="dropdown-item" href="{% url 'vmbackups:restore' backup.uuid %}">{% trans "As a new VM" %}</a></li>
{% if backup.instance_id %}<li><a class="dropdown-item" href="{% url 'vmbackups:restore_over' backup.uuid %}">{% trans "Over the VM" %}</a></li>{% endif %}

View file

@ -44,24 +44,26 @@
<div class="table-responsive">
<table class="table table-hover align-middle" id="backups">
<thead>
<tr><th>{% trans "Time" %}</th><th>{% trans "VM" %}</th><th>{% trans "Target" %}</th><th>{% trans "Consistency" %}</th><th>{% trans "Schedule" %}</th>
<th class="text-end">{% trans "Size" %}</th><th>{% trans "State" %}</th><th></th></tr>
{# on a phone: time, VM, state and actions; the rest from wider screens #}
<tr><th>{% trans "Time" %}</th><th>{% trans "VM" %}</th>
<th class="d-none d-md-table-cell">{% trans "Consistency" %}</th>
<th class="text-end d-none d-sm-table-cell">{% trans "Size" %}</th><th>{% trans "State" %}</th><th></th></tr>
</thead>
<tbody>
{% for backup in rows %}
<tr>
<td class="text-nowrap">{{ backup.created_at|date:"Y-m-d H:i" }}</td>
<td class="text-nowrap">
{% if backup.instance %}<a href="{% url 'instances:instance' backup.instance.id %}">{{ backup.vm_name }}</a>
{% else %}{{ backup.vm_name }} <span class="badge text-bg-secondary">{% trans "removed" %}</span>{% endif %}
<div class="small text-body-secondary">{{ backup.compute_name }}</div>
{# date and time wrap apart on a phone #}
<td class="text-nowrap">{{ backup.created_at|date:"Y-m-d" }}<br class="d-sm-none"><span class="d-none d-sm-inline"> </span>{{ backup.created_at|date:"H:i" }}
<div class="small text-body-secondary text-nowrap" title="{% trans "Target" %}">{{ backup.target.name }}</div></td>
<td style="max-width: min(12rem, 30vw);">{# a long name is cut, whole on hover #}
{% if backup.instance %}<a class="d-inline-block text-truncate mw-100 align-bottom" title="{{ backup.vm_name }}" href="{% url 'instances:instance' backup.instance.id %}">{{ backup.vm_name }}</a>
{% else %}<span class="d-inline-block text-truncate mw-100 align-bottom" title="{{ backup.vm_name }}">{{ backup.vm_name }}</span> <span class="badge text-bg-secondary">{% trans "removed" %}</span>{% endif %}
<div class="small text-body-secondary text-truncate">{{ backup.compute_name }}{% if backup.policy %}, <a href="{% url 'vmbackups:policy' backup.policy_id %}" title="{% trans "Schedule" %}">{{ backup.policy.name }}</a>{% endif %}</div>
</td>
<td class="text-nowrap">{{ backup.target.name }}</td>
<td>{% include "vmbackups/consistency.html" %}</td>
<td>{% if backup.policy %}<a href="{% url 'vmbackups:policy' backup.policy_id %}">{{ backup.policy.name }}</a>{% else %}<span class="text-body-secondary">{% trans "By hand" %}</span>{% endif %}</td>
<td class="text-end text-nowrap">{% if backup.size %}{{ backup.size|filesizeformat }}{% else %}–{% endif %}</td>
<td class="d-none d-md-table-cell">{% include "vmbackups/consistency.html" %}</td>
<td class="text-end text-nowrap d-none d-sm-table-cell">{% if backup.size %}{{ backup.size|filesizeformat }}{% else %}–{% endif %}</td>
<td>{% include "vmbackups/state.html" %}</td>
<td class="text-end text-nowrap">{% include "vmbackups/delete_form.html" %}</td>
<td class="text-end">{% include "vmbackups/delete_form.html" %}</td>
</tr>
{% endfor %}
</tbody>

View file

@ -1 +1 @@
{% load i18n %}{% if backup.state == "deleting" or backup.uuid|stringformat:"s" in pending_deletes %}<span class="badge text-bg-warning" data-backup-pending>{% trans "Deleting" %}</span>{% elif backup.state == "ready" %}<span class="badge text-bg-success">{% trans "Ready" %}</span>{% elif backup.state == "creating" %}<span class="badge text-bg-info" data-backup-pending>{% trans "Creating" %}</span>{% if backup.operation_id %} <a class="small" href="{% url 'operations:job' backup.operation_id %}">{% trans "Progress" %}</a>{% endif %}{% elif backup.state == "missing" %}<span class="badge text-bg-danger" title="{% trans "Files of the backup are missing from the target" %}">{% trans "Missing" %}</span>{% else %}<span class="badge text-bg-danger">{% trans "Failed" %}</span>{% if backup.operation_id %} <a class="small" href="{% url 'operations:job' backup.operation_id %}">{% trans "Why?" %}</a>{% endif %}{% endif %}
{% load i18n %}{% if backup.uuid|stringformat:"s" in pending_deletes %}<span class="badge text-bg-warning" data-backup-pending>{% trans "Deleting" %}</span>{% elif backup.state == "deleting" %}<span class="badge text-bg-warning" title="{% trans "Its deletion did not end; delete it again" %}">{% trans "Deleting" %}</span>{% elif backup.state == "ready" %}<span class="badge text-bg-success">{% trans "Ready" %}</span>{% elif backup.state == "creating" %}<span class="badge text-bg-info" data-backup-pending>{% trans "Creating" %}</span>{% if backup.operation_id %}{% if user.is_superuser or backup.operation.user_id == user.id %} <a class="small" href="{% url 'operations:job' backup.operation_id %}">{% trans "Progress" %}</a>{% endif %}{% endif %}{% elif backup.state == "missing" %}<span class="badge text-bg-danger" title="{% trans "Files of the backup are missing from the target" %}">{% trans "Missing" %}</span>{% else %}<span class="badge text-bg-danger">{% trans "Failed" %}</span>{% if backup.operation_id %}{% if user.is_superuser or backup.operation.user_id == user.id %} <a class="small" href="{% url 'operations:job' backup.operation_id %}">{% trans "Why?" %}</a>{% endif %}{% endif %}{% endif %}

View file

@ -39,17 +39,17 @@
<div class="table-responsive mt-3">
<table class="table table-sm align-middle mb-0">
<thead>
<tr><th>{% trans "Time" %}</th><th>{% trans "Target" %}</th><th>{% trans "Consistency" %}</th><th class="text-end">{% trans "Size" %}</th><th>{% trans "State" %}</th><th></th></tr>
<tr><th>{% trans "Time" %}</th><th class="d-none d-md-table-cell">{% trans "Target" %}</th><th class="d-none d-sm-table-cell">{% trans "Consistency" %}</th><th class="text-end d-none d-sm-table-cell">{% trans "Size" %}</th><th>{% trans "State" %}</th><th></th></tr>
</thead>
<tbody>
{% for backup in backups.rows %}
<tr>
<td class="text-nowrap">{{ backup.created_at|date:"Y-m-d H:i" }}</td>
<td>{{ backup.target.name }}</td>
<td>{% include "vmbackups/consistency.html" %}</td>
<td class="text-end text-nowrap">{% if backup.size %}{{ backup.size|filesizeformat }}{% else %}–{% endif %}</td>
<td class="d-none d-md-table-cell">{{ backup.target.name }}</td>
<td class="d-none d-sm-table-cell">{% include "vmbackups/consistency.html" %}</td>
<td class="text-end text-nowrap d-none d-sm-table-cell">{% if backup.size %}{{ backup.size|filesizeformat }}{% else %}–{% endif %}</td>
<td>{% include "vmbackups/state.html" with pending_deletes=backups.pending_deletes %}</td>
<td class="text-end text-nowrap">{% include "vmbackups/delete_form.html" with pending_deletes=backups.pending_deletes %}</td>
<td class="text-end">{% include "vmbackups/delete_form.html" with pending_deletes=backups.pending_deletes %}</td>
</tr>
{% endfor %}
</tbody>

View file

@ -227,6 +227,23 @@ class CreateBackupTests(TransactionTestCase):
self.proxy.fs_thaw.side_effect = None
self.assertEqual(CreateBackup().reconcile(op).state, Operation.SUCCEEDED)
def test_a_cancelled_backup_of_a_guest_still_frozen_is_left_to_recovery(self):
# the copy was aborted (cancel) while the thaw kept failing: recovery must thaw it, a cancel would not
self.proxy.get_status.return_value = libvirt.VIR_DOMAIN_RUNNING
self.proxy.fs_thaw.side_effect = libvirt_error("thaw failed")
self.proxy.backup_result.return_value = (False, "operation aborted")
op = self.submit(frozen=True)
# the cancel comes while the copy runs
self.proxy.begin_clone_backup.side_effect = lambda *a, **kw: Operation.objects.filter(pk=op.pk).update(
cancel_requested=True)
with self.assertRaises(OperationError): # not Cancelled: the worker ends a cancelled job without recovery
self.run_job(op)
op.refresh_from_db()
with self.assertRaises(libvirt.libvirtError): # recovery thaws first, and tries again
CreateBackup().reconcile(op)
self.proxy.fs_thaw.side_effect = None
self.assertEqual(CreateBackup().reconcile(op).state, Operation.CANCELLED)
def test_an_optional_freeze_that_failed_is_thawed_until_it_works(self):
# a freeze that failed part way may have frozen some file systems: the guest counts as frozen
self.proxy.get_status.return_value = libvirt.VIR_DOMAIN_RUNNING
@ -563,6 +580,21 @@ class BackupTabTests(PageControls, TransactionTestCase):
self.assertIn("ctl-vm has TPM state", page.xpath("string(//div[@id='backups'])"))
self.assertFalse(page.xpath("//div[@id='backups']//form[contains(@action, '/create/')]"))
def test_an_owner_gets_no_link_to_a_job_they_cannot_open(self):
owner = self.user("tab-owner3", perms=("backup_instances",), owner={"is_change": True})
target = BackupTarget.objects.create(name="opened2", owners=True)
BackupTargetPool.objects.create(target=target, compute=self.compute, pool="p", pool_uuid="u")
admin = get_user_model().objects.create_superuser("tab-admin3", "c@example.com", "x")
from operations.models import Operation as Op
theirs = Op.objects.create(kind="backup.create", user=admin, state=Op.FAILED, params={}, intent={})
Backup.objects.create(target=target, instance=self.instance, vm_uuid=self.instance.uuid, vm_name="ctl-vm",
compute_name="ctl-compute", state=Backup.FAILED, operation=theirs)
with patch("vmbackups.utils.wvmBackup"):
self.controls(owner)
tab = lxml_html.fromstring(self.last_page).xpath("//div[@id='backups']")[0]
self.assertFalse(tab.xpath(".//a[contains(@href, '/jobs/')]"))
def test_owners_without_the_backup_permission_have_no_backups_tab(self):
self.controls(self.user("tab-owner", owner={"is_change": True}))
self.assertFalse(lxml_html.fromstring(self.last_page).xpath("//*[@id='backups']"))

View file

@ -109,6 +109,15 @@ class DeleteBackupTests(TransactionTestCase):
self.run_job(op)
self.assertEqual(self.removed, [])
def test_a_deletion_that_did_not_end_can_be_asked_again(self):
# its job ended uncertain and was resolved: the backup stays deleting, and the page offers Delete again
Backup.objects.filter(pk=self.backup.pk).update(state=Backup.DELETING)
self.client.force_login(self.admin)
page = lxml_html.fromstring(self.client.get(reverse("vmbackups:index")).content)
self.assertTrue(page.xpath("//table[@id='backups']//button[@data-confirm]"))
self.run_job(self.submit())
self.assertFalse(Backup.objects.exists())
def test_a_target_no_compute_reaches_is_refused(self):
op = self.submit()
with patch("vmbackups.jobs.target_pool", side_effect=OperationError("Storage pool %(pool)s is gone", pool="b1")):

View file

@ -122,6 +122,14 @@ class ImportTests(TransactionTestCase):
self.assertGreaterEqual(self.read()["added"], 1)
self.assertTrue(Backup.objects.filter(uuid=self.b).exists())
def test_a_manifest_with_a_bad_uuid_does_not_stop_the_others(self):
bad = manifest(self.a)
bad["backup"] = "not-a-uuid"
self.files[f"wvc-{self.a}-manifest.json"] = json.dumps(bad).encode()
result = self.read()
self.assertEqual(result["added"], 1)
self.assertIn(f"wvc-{self.a}-manifest.json", result["warning"][0]["values"]["names"])
def test_an_incremental_backup_without_its_base_is_incomplete(self):
lonely = manifest(self.a)
lonely["parent"] = str(uuid4())

View file

@ -133,7 +133,17 @@ class OwnerTests(TransactionTestCase):
def test_no_quota_means_none(self):
UserAttributes.objects.filter(user=self.owner).update(max_backup_size=0)
with self.assertRaisesMessage(OperationError, "backup quota"):
with self.assertRaisesMessage(OperationError, "You have no backup quota"):
self.back_up()
def test_the_quota_refusal_names_sizes_a_person_reads(self):
self.taken(9)
with self.assertRaisesMessage(OperationError, "The backup needs about 4.0 GiB; 9.0 GiB of your 10 GiB"):
self.back_up()
self.proxy.backup_plan.return_value["disks"][0]["allocation"] = 300 # a nearly empty disk: not 0.0
Backup.objects.all().delete()
self.taken(10)
with self.assertRaisesMessage(OperationError, "about 0.1 GiB"):
self.back_up()
# deleting

View file

@ -291,6 +291,23 @@ class RestoreTests(TransactionTestCase):
self.backup.refresh_from_db()
self.assertEqual(RestoreForm(backup=self.backup).fields["compute"].initial, self.compute)
def test_a_copy_libvirt_refused_fails_and_removes_the_copies(self):
self.storage.clone_volume.side_effect = libvirt.libvirtError("No space left on device")
op = self.submit()
with self.assertRaises(libvirt.libvirtError):
self.run_job(op)
op.refresh_from_db()
self.assertEqual(RestoreBackup().reconcile(op).state, Operation.FAILED) # not uncertain: libvirt answered
self.assertIn("vm1-restored-vda.qcow2", self.removed)
def test_recovery_starts_a_restored_vm_it_was_asked_to_start(self):
op = self.submit(start="on")
self.conn.wvm.lookupByUUIDString.side_effect = None # defined before the worker stopped, not started
dom = self.conn.wvm.lookupByUUIDString.return_value
dom.isActive.return_value = 0
self.assertEqual(RestoreBackup().reconcile(op).state, Operation.SUCCEEDED)
dom.create.assert_called_once_with()
def test_the_nvram_file_is_qemus(self):
self.run_job(self.submit())
self.assertEqual(self.conn.upload_volume.call_args.kwargs, {"owner": _owner(), "mode": "0600"})