diff --git a/instances/tests/test_duplicate_devices.py b/instances/tests/test_duplicate_devices.py index 4f3080f7..cf32471d 100644 --- a/instances/tests/test_duplicate_devices.py +++ b/instances/tests/test_duplicate_devices.py @@ -11,6 +11,8 @@ from django.urls import reverse from computes.models import Compute from instances.models import Instance +from operations.claims import admit +from operations.models import Claim PATH = "/var/lib/libvirt/images/data.qcow2" MAC = "52:54:00:aa:bb:cc" @@ -51,6 +53,23 @@ class DuplicateDeviceTests(TestCase): self.assertEqual(self.post("add_existing_vol", form), ["data.qcow2 is already a disk of this VM"]) self.proxy.attach_disk.assert_called_once() + @patch("instances.views.wvmStorage") + def test_a_volume_a_job_writes_is_not_attached(self, storage): + # a download holds the volume it writes: the VM would get a half-written disk; nothing is read before the claim + pool = storage.return_value + pool.get_volumes.return_value = ["data.qcow2"] + pool.get_volume_format_type.return_value = "qcow2" + pool.get_type.return_value = "dir" + pool.get_volume_type.return_value = "file" + pool.get_volume.return_value.path.return_value = PATH + # a copy reads it (shared): a running VM would write it meanwhile + admit({f"volume:{self.vm.compute_id}:default/data.qcow2": Claim.SHARED}, holder="other-node:1:1") + form = {"selected_storage": "default", "vols": "data.qcow2", "bus": "virtio", "cache": "default"} + self.assertEqual(self.post("add_existing_vol", form), + ["A short operation is in progress on this resource; try again in a moment."]) + self.proxy.attach_disk.assert_not_called() + pool.get_volume_format_type.assert_not_called() + @patch("instances.views.wvmStorage") def test_a_backup_volume_is_not_attached(self, storage): # the VM would write into the backup, and its deletion would remove the VM's disk diff --git a/instances/views.py b/instances/views.py index d6601ebf..7dd8d4f9 100755 --- a/instances/views.py +++ b/instances/views.py @@ -55,6 +55,7 @@ from logs.audit import audit, audit_vm, failed_vm from lxml import etree from operations import claims, jobs from operations.jobs import KEY_RE +from operations.models import Claim from operations.utils import HOST_BUSY, busy_message, summary from webvirtcloud.middleware import error_text, same_origin_referer from vrtManager import util @@ -1597,6 +1598,14 @@ def add_existing_vol(request, pk): instance = get_instance(request.user, pk, perm_type="change") storage = request.POST.get("selected_storage", "") name = request.POST.get("vols", "") + # the volume exclusive from its first read to the attach: not while a download writes it + # or a copy reads it (Busy names the job) + with claims.hold({claims.volume_key(instance.compute_id, storage, name): Claim.EXCLUSIVE}): + return _attach_volume(request, instance, storage, name) + + +def _attach_volume(request, instance, storage, name): + pk = instance.pk bus = request.POST.get("bus", app_settings.INSTANCE_VOLUME_DEFAULT_BUS) cache = request.POST.get("cache", app_settings.INSTANCE_VOLUME_DEFAULT_CACHE) diff --git a/locale/tr/LC_MESSAGES/django.mo b/locale/tr/LC_MESSAGES/django.mo index cf638703..914d54b4 100644 Binary files a/locale/tr/LC_MESSAGES/django.mo and b/locale/tr/LC_MESSAGES/django.mo differ diff --git a/locale/tr/LC_MESSAGES/django.po b/locale/tr/LC_MESSAGES/django.po index 8d48db45..46070e51 100644 --- a/locale/tr/LC_MESSAGES/django.po +++ b/locale/tr/LC_MESSAGES/django.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-11-20 11:28+0000\n" +"POT-Creation-Date: 2026-11-20 12:24+0000\n" "PO-Revision-Date: 2020-11-04 12:00+0000\n" "Last-Translator: catborise , 2020\n" "Language-Team: Turkish (https://www.transifex.com/catborise/teams/110663/tr/)\n" @@ -226,7 +226,7 @@ msgstr "Kullanıcı bölümleri" #: admin/forms.py:221 admin/templates/admin/tag_list.html:25 #: computes/templates/computes/list.html:34 #: computes/templates/computes/list.html:62 computes/templates/overview.html:90 -#: instances/views.py:278 vmbackups/templates/vmbackups/policies.html:17 +#: instances/views.py:279 vmbackups/templates/vmbackups/policies.html:17 msgid "VMs" msgstr "Sanal makineler" @@ -250,7 +250,7 @@ msgstr "Sanal makine ekle" #: instances/templates/allinstances.html:146 #: instances/templates/allinstances_index_nongrouped.html:9 #: instances/templates/create_steps.html:6 -#: instances/templates/create_steps.html:8 instances/views.py:254 +#: instances/templates/create_steps.html:8 instances/views.py:255 #: operations/templates/operations/jobs.html:24 msgid "Host" msgstr "Sunucu" @@ -799,7 +799,7 @@ msgstr "" #: instances/templates/allinstances_index_nongrouped.html:15 #: instances/templates/create_instance_w2.html:63 #: instances/templates/instances/resize_tab.html:30 -#: instances/templates/instances/settings_tab.html:878 instances/views.py:254 +#: instances/templates/instances/settings_tab.html:878 instances/views.py:255 msgid "vCPUs" msgstr "vCPU" @@ -1015,7 +1015,7 @@ msgid "IP" msgstr "IP" #: admin/templates/admin/logs.html:56 admin/views.py:398 instances/states.py:19 -#: instances/views.py:502 logs/views.py:18 +#: instances/views.py:503 logs/views.py:18 msgid "Unknown" msgstr "Bilinmeyen" @@ -1033,7 +1033,7 @@ msgstr "Başarısız" #: admin/templates/admin/tag_list.html:6 admin/templates/admin/tag_list.html:8 #: admin/templates/admin/tag_list.html:17 computes/forms.py:55 -#: instances/templates/instances/settings_tab.html:958 instances/views.py:255 +#: instances/templates/instances/settings_tab.html:958 instances/views.py:256 #: templates/common/tag_filter.html:6 templates/navbar.html:39 msgid "Tags" msgstr "Etiketler" @@ -1125,7 +1125,7 @@ msgstr "Korumalı" msgid "Left" msgstr "Ayrıldığı sunucu" -#: admin/templates/admin/tombstone_list.html:36 instances/views.py:255 +#: admin/templates/admin/tombstone_list.html:36 instances/views.py:256 msgid "Owners" msgstr "Sahipler" @@ -2600,7 +2600,7 @@ msgstr "Sunucu, sanal makineleri taşınmadan bakıma alınsın mı?" msgid "Put in maintenance without migrating" msgstr "Taşımadan bakıma al" -#: computes/templates/computes/bulk_migrate.html:26 instances/views.py:395 +#: computes/templates/computes/bulk_migrate.html:26 instances/views.py:396 msgid "There is no other host to migrate to." msgstr "Taşınacak başka bir sunucu yok." @@ -3548,13 +3548,13 @@ msgstr "" "VNC olarak değiştirin." #: instances/api/viewsets.py:160 instances/api/viewsets.py:178 -#: instances/jobs.py:1605 instances/views.py:1009 instances/views.py:1031 -#: instances/views.py:2021 +#: instances/jobs.py:1605 instances/views.py:1010 instances/views.py:1032 +#: instances/views.py:2030 msgid "Templates cannot be started." msgstr "Şablon makineler başlatılamaz." #: instances/forms.py:14 instances/templates/create_instance_w2.html:69 -#: instances/templates/instances/settings_tab.html:882 instances/views.py:254 +#: instances/templates/instances/settings_tab.html:882 instances/views.py:255 msgid "Memory (MiB)" msgstr "Bellek (MiB)" @@ -3838,8 +3838,8 @@ msgid "Clone VM" msgstr "Sanal makineyi klonla" #: instances/jobs.py:668 instances/jobs.py:675 instances/jobs.py:1017 -#: vmbackups/jobs.py:369 vmbackups/jobs.py:1075 vmbackups/jobs.py:1281 -#: vmbackups/jobs.py:1456 +#: vmbackups/jobs.py:369 vmbackups/jobs.py:1076 vmbackups/jobs.py:1283 +#: vmbackups/jobs.py:1459 msgid "Copying disks" msgstr "Diskler kopyalanıyor" @@ -3953,7 +3953,7 @@ msgstr "" msgid "Create VM" msgstr "Sanal makine oluştur" -#: instances/jobs.py:940 instances/jobs.py:987 instances/views.py:2817 +#: instances/jobs.py:940 instances/jobs.py:987 instances/views.py:2826 msgid "A virtual machine with this name already exists" msgstr "Bu isimde bir sanal makine mevcut" @@ -4359,7 +4359,7 @@ msgid "Disk source" msgstr "Disk kaynağı" #: instances/templates/add_instance_volume.html:21 -#: instances/templates/create_instance_w2.html:134 instances/views.py:2847 +#: instances/templates/create_instance_w2.html:134 instances/views.py:2856 msgid "New disk" msgstr "Yeni disk" @@ -4609,7 +4609,7 @@ msgstr "Bul" msgid "Address" msgstr "Adres" -#: instances/templates/allinstances.html:143 instances/views.py:254 +#: instances/templates/allinstances.html:143 instances/views.py:255 #: interfaces/templates/interface.html:153 networks/templates/network.html:202 #: vmbackups/templates/vmbackups/index.html:18 #: vmbackups/templates/vmbackups/index.html:50 @@ -4822,7 +4822,7 @@ msgstr "Özel CPU modelleri" msgid "Size (GiB)" msgstr "Boyut (GiB)" -#: instances/templates/create_instance_w2.html:161 instances/views.py:2848 +#: instances/templates/create_instance_w2.html:161 instances/views.py:2857 msgid "Existing volumes" msgstr "Mevcut birimler" @@ -4859,7 +4859,7 @@ msgstr "Aygıt" msgid "Remove" msgstr "Kaldır" -#: instances/templates/create_instance_w2.html:194 instances/views.py:2849 +#: instances/templates/create_instance_w2.html:194 instances/views.py:2858 msgid "Clone from template" msgstr "Şablondan klonla" @@ -7159,15 +7159,15 @@ msgstr "Geçersiz MAC adresi" msgid "More MAC addresses than networks" msgstr "Ağlardan daha fazla MAC adresi" -#: instances/views.py:205 +#: instances/views.py:206 msgid "Enter an IP address, a network such as 192.0.2.0/24, or a MAC address." msgstr "Bir IP adresi, 192.0.2.0/24 gibi bir ağ ya da bir MAC adresi girin." -#: instances/views.py:211 instances/views.py:245 +#: instances/views.py:212 instances/views.py:246 msgid "Too many searches are still running; try again shortly." msgstr "Çok fazla arama hâlâ çalışıyor; birazdan yeniden deneyin." -#: instances/views.py:254 interfaces/templates/interface.html:46 +#: instances/views.py:255 interfaces/templates/interface.html:46 #: networks/templates/network.html:51 #: operations/templates/operations/jobs.html:38 #: operations/templates/operations/jobs.html:62 @@ -7179,54 +7179,54 @@ msgstr "Çok fazla arama hâlâ çalışıyor; birazdan yeniden deneyin." msgid "State" msgstr "Durum" -#: instances/views.py:254 +#: instances/views.py:255 msgid "OS" msgstr "İşletim sistemi" -#: instances/views.py:254 +#: instances/views.py:255 msgid "OS family" msgstr "İşletim sistemi ailesi" -#: instances/views.py:254 +#: instances/views.py:255 msgid "IP addresses" msgstr "IP adresleri" -#: instances/views.py:255 +#: instances/views.py:256 msgid "Address sources" msgstr "Adres kaynakları" -#: instances/views.py:255 +#: instances/views.py:256 msgid "MAC addresses" msgstr "MAC adresleri" -#: instances/views.py:255 +#: instances/views.py:256 msgid "In the panel" msgstr "Panelde" -#: instances/views.py:267 +#: instances/views.py:268 msgid "yes" msgstr "evet" -#: instances/views.py:267 +#: instances/views.py:268 msgid "no" msgstr "hayır" -#: instances/views.py:269 +#: instances/views.py:270 #, python-format msgid "Created: %(time)s" msgstr "Oluşturulma: %(time)s" -#: instances/views.py:270 +#: instances/views.py:271 #, python-format msgid "VMs listed: %(n)s" msgstr "Listelenen sanal makineler: %(n)s" -#: instances/views.py:271 +#: instances/views.py:272 #, python-format msgid "Running VMs read: %(n)s" msgstr "Okunan çalışan sanal makineler: %(n)s" -#: instances/views.py:272 +#: instances/views.py:273 #, python-format msgid "" "Without a connected guest agent (a static address on them cannot be seen): " @@ -7234,7 +7234,7 @@ msgid "" msgstr "" "Bağlı konuk ajanı olmayanlar (üzerlerindeki statik adres görülemez): %(n)s" -#: instances/views.py:273 +#: instances/views.py:274 #, python-format msgid "" "Guest agents not read (a paused VM, no answer in time, or an error): %(n)s" @@ -7242,45 +7242,45 @@ msgstr "" "Okunamayan konuk ajanları (duraklatılmış VM, zamanında yanıt yok ya da hata):" " %(n)s" -#: instances/views.py:275 +#: instances/views.py:276 #, python-format msgid "Hosts not reached: %(hosts)s" msgstr "Ulaşılamayan sunucular: %(hosts)s" -#: instances/views.py:277 +#: instances/views.py:278 #, python-format msgid "Hosts not finished in time: %(hosts)s" msgstr "Zamanında bitmeyen sunucular: %(hosts)s" -#: instances/views.py:278 +#: instances/views.py:279 msgid "Coverage" msgstr "Kapsam" -#: instances/views.py:293 +#: instances/views.py:294 #, python-format msgid "The host %(host)s of '%(name)s' cannot be reached: %(error)s" msgstr "'%(name)s' sanal makinesinin sunucusu %(host)s erişilemiyor: %(error)s" -#: instances/views.py:299 +#: instances/views.py:300 #, python-format msgid "The host of '%(name)s' cannot be reached right now." msgstr "'%(name)s' sanal makinesinin sunucusuna şu anda erişilemiyor." -#: instances/views.py:300 +#: instances/views.py:301 msgid " Jobs on it can be followed under Jobs in the menu." msgstr " Üzerindeki işler menüdeki İşler bölümünden izlenebilir." -#: instances/views.py:308 +#: instances/views.py:309 #, python-format msgid "'%(name)s' is no longer on its host." msgstr "'%(name)s' artık sunucusunda yok." -#: instances/views.py:397 +#: instances/views.py:398 msgid "A VM migrates when it is running, paused or shut off." msgstr "" "Sanal makine çalışırken, duraklatılmışken ya da kapalıyken taşınabilir." -#: instances/views.py:399 +#: instances/views.py:400 msgid "" "A VM with snapshots cannot be migrated: its snapshots stay on this host. " "Delete them first." @@ -7288,7 +7288,7 @@ msgstr "" "Anlık görüntüsü olan bir sanal makine taşınamaz: anlık görüntüleri bu " "sunucuda kalır. Önce onları silin." -#: instances/views.py:401 +#: instances/views.py:402 msgid "" "A VM with host devices cannot be migrated: the destination may not have them." " Remove them first." @@ -7296,44 +7296,44 @@ msgstr "" "Sunucu aygıtları olan bir sanal makine taşınamaz: hedefte bu aygıtlar " "olmayabilir. Önce onları kaldırın." -#: instances/views.py:651 +#: instances/views.py:652 #, python-format msgid "Disk %(dev)s has changed since the page was loaded; reload the page" msgstr "%(dev)s diski sayfa yüklendikten sonra değişti; sayfayı yenileyin" -#: instances/views.py:726 instances/views.py:737 +#: instances/views.py:727 instances/views.py:738 msgid "Choose the VMs and write the tag" msgstr "Sanal makineleri seçin ve etiketi yazın" -#: instances/views.py:729 instances/views.py:788 +#: instances/views.py:730 instances/views.py:789 #, python-format msgid "Choose at most %(count)s VMs at once" msgstr "En fazla %(count)s sanal makine seçin" -#: instances/views.py:742 +#: instances/views.py:743 #, python-format msgid "There is no tag %(tag)s" msgstr "%(tag)s etiketi yok" -#: instances/views.py:749 +#: instances/views.py:750 #, python-format msgid "Tag %(tag)s removed from %(count)s VM" msgid_plural "Tag %(tag)s removed from %(count)s VMs" msgstr[0] "%(tag)s etiketi %(count)s sanal makineden kaldırıldı" msgstr[1] "%(tag)s etiketi %(count)s sanal makineden kaldırıldı" -#: instances/views.py:750 +#: instances/views.py:751 #, python-format msgid "Tag %(tag)s added to %(count)s VM" msgid_plural "Tag %(tag)s added to %(count)s VMs" msgstr[0] "%(tag)s etiketi %(count)s sanal makineye eklendi" msgstr[1] "%(tag)s etiketi %(count)s sanal makineye eklendi" -#: instances/views.py:765 instances/views.py:835 +#: instances/views.py:766 instances/views.py:836 msgid "a chosen VM" msgstr "seçilen bir sanal makine" -#: instances/views.py:777 +#: instances/views.py:778 #, python-format msgid "%(count)s VM is queued; the Jobs page follows it." msgid_plural "%(count)s VMs are queued; the Jobs page follows them." @@ -7341,36 +7341,36 @@ msgstr[0] "%(count)s sanal makine kuyruğa alındı; İşler sayfası onu izliyo msgstr[1] "" "%(count)s sanal makine kuyruğa alındı; İşler sayfası onları izliyor." -#: instances/views.py:799 instances/views.py:801 +#: instances/views.py:800 instances/views.py:802 msgid "Choose the VMs you may power, and Start, Shut down or Force off" msgstr "" "Güç işlemi yapabileceğiniz sanal makineleri seçin; ardından Başlat, Kapat ya " "da Zorla kapat" -#: instances/views.py:803 +#: instances/views.py:804 #, python-format msgid "%(vm)s: you may not power it now" msgstr "%(vm)s: şu anda güç işlemi yapamazsınız" -#: instances/views.py:811 instances/views.py:813 +#: instances/views.py:812 instances/views.py:814 msgid "Choose the VMs and write the snapshot's name" msgstr "Sanal makineleri seçin ve anlık görüntünün adını yazın" -#: instances/views.py:823 +#: instances/views.py:824 #, python-format msgid "%(vm)s: a template's snapshots are not taken here" msgstr "%(vm)s: şablonun anlık görüntüleri buradan alınmaz" -#: instances/views.py:827 +#: instances/views.py:828 #, python-format msgid "%(vm)s: you may not snapshot it" msgstr "%(vm)s: anlık görüntüsünü alamazsınız" -#: instances/views.py:855 instances/views.py:856 +#: instances/views.py:856 instances/views.py:857 msgid "The VM was moved meanwhile; try again." msgstr "Sanal makine bu arada taşındı; yeniden deneyin." -#: instances/views.py:972 +#: instances/views.py:973 msgid "" "The running VM has no free PCI slot for another disk on this bus: choose the " "scsi bus if the VM has a SCSI controller, or shut the VM down and add the " @@ -7383,7 +7383,7 @@ msgstr "" "yuvaları ekle, sonraki başlatmadan itibaren ona boş yuvalar verir. Yeni bir " "birim havuzunda kalır, mevcut birim olarak eklenebilir." -#: instances/views.py:976 +#: instances/views.py:977 msgid "" "The running VM has no free PCI slot for the SCSI controller the disk needs: " "shut the VM down and add the disk then; Add PCIe slots on the Disks tab gives" @@ -7395,195 +7395,195 @@ msgstr "" "PCIe yuvaları ekle, sonraki başlatmadan itibaren ona boş yuvalar verir. Yeni " "bir birim havuzunda kalır, mevcut birim olarak eklenebilir." -#: instances/views.py:994 +#: instances/views.py:995 #, python-format msgid "Invalid disk options: %(options)s" msgstr "Geçersiz disk seçenekleri: %(options)s" -#: instances/views.py:1006 instances/views.py:1101 +#: instances/views.py:1007 instances/views.py:1102 #, python-format msgid "Invalid options: %(options)s" msgstr "Geçersiz seçenekler: %(options)s" -#: instances/views.py:1041 +#: instances/views.py:1042 msgid "The VM was forced off but did not start again: it stays off." msgstr "Sanal makine zorla kapatıldı ancak yeniden başlamadı: kapalı kalıyor." -#: instances/views.py:1229 +#: instances/views.py:1230 #, python-format msgid "Set the gstfsd key of %(compute)s first (Computes, edit the host)" msgstr "" "Önce %(compute)s sunucusunun gstfsd anahtarını ayarlayın (Sunucular, sunucuyu" " düzenle)" -#: instances/views.py:1236 instances/views.py:1254 instances/views.py:1263 +#: instances/views.py:1237 instances/views.py:1255 instances/views.py:1264 #, python-format msgid "gstfsd error: %(err)s" msgstr "gstfsd hatası: %(err)s" -#: instances/views.py:1264 +#: instances/views.py:1265 msgid "the reply is not signed with the key" msgstr "yanıt anahtarla imzalanmamış" -#: instances/views.py:1272 +#: instances/views.py:1273 msgid "Shut the VM down, or start its QEMU guest agent, and try again" msgstr "" "Sanal makineyi kapatın ya da QEMU konuk ajanını başlatın ve yeniden deneyin" -#: instances/views.py:1280 +#: instances/views.py:1281 msgid "The change may still be made when the agent answers again." msgstr "Ajan yeniden yanıt verdiğinde değişiklik yine de yapılabilir." -#: instances/views.py:1295 +#: instances/views.py:1296 msgid "Enter a password" msgstr "Bir parola girin" -#: instances/views.py:1300 +#: instances/views.py:1301 msgid "Enter a password of at most 4096 characters, without NUL characters" msgstr "En fazla 4096 karakterlik, NUL karakteri içermeyen bir parola girin" -#: instances/views.py:1316 +#: instances/views.py:1317 msgid "Reset root password" msgstr "Root parolasını sıfırla" -#: instances/views.py:1332 +#: instances/views.py:1333 msgid "Select an SSH public key" msgstr "Bir SSH açık anahtarı seçin" -#: instances/views.py:1354 +#: instances/views.py:1355 #, python-format msgid "Installed new SSH public key %(keyname)s" msgstr "Yeni %(keyname)s SSH açık anahtarı yüklendi" -#: instances/views.py:1374 +#: instances/views.py:1375 msgid "Enter a whole number of vCPUs" msgstr "vCPU sayısı için bir tam sayı girin" -#: instances/views.py:1378 +#: instances/views.py:1379 msgid "Shut off the VM to change its vCPUs" msgstr "vCPU'larını değiştirmek için sanal makineyi kapatın" -#: instances/views.py:1381 +#: instances/views.py:1382 msgid "The current vCPUs cannot be more than the maximum" msgstr "Geçerli vCPU sayısı en fazla değerden büyük olamaz" -#: instances/views.py:1388 +#: instances/views.py:1389 #, python-format msgid "%(quota)s: cannot resize the CPU of '%(instance_name)s'." msgstr "%(quota)s: '%(instance_name)s' CPU'su yeniden boyutlandırılamıyor." -#: instances/views.py:1396 +#: instances/views.py:1397 #, python-format msgid "vCPUs set to %(cur)s (maximum %(max)s)" msgstr "vCPU sayısı %(cur)s olarak ayarlandı (en fazla %(max)s)" -#: instances/views.py:1415 +#: instances/views.py:1416 msgid "Enter a whole number for memory" msgstr "Bellek için bir tam sayı girin" -#: instances/views.py:1418 +#: instances/views.py:1419 msgid "The current memory cannot be more than the maximum" msgstr "Geçerli bellek en fazla değerden büyük olamaz" -#: instances/views.py:1422 +#: instances/views.py:1423 #, python-format msgid "%(quota)s: cannot resize the memory of '%(instance_name)s'." msgstr "%(quota)s: '%(instance_name)s' belleği yeniden boyutlandırılamıyor." -#: instances/views.py:1428 +#: instances/views.py:1429 #, python-format msgid "Memory set to %(cur)s MiB (maximum %(max)s MiB)" msgstr "Bellek %(cur)s MiB olarak ayarlandı (en fazla %(max)s MiB)" -#: instances/views.py:1448 +#: instances/views.py:1449 msgid "Enter disk sizes as whole GiB" msgstr "Disk boyutlarını tam GiB olarak girin" -#: instances/views.py:1452 +#: instances/views.py:1453 #, python-format msgid "Disk %(dev)s was changed meanwhile; reload the page" msgstr "%(dev)s diski bu arada değişti; sayfayı yeniden yükleyin" -#: instances/views.py:1456 +#: instances/views.py:1457 #, python-format msgid "%(dev)s is %(size)s: a disk cannot shrink" msgstr "%(dev)s boyutu %(size)s: disk küçültülemez" -#: instances/views.py:1464 +#: instances/views.py:1465 msgid "No disks were selected or valid for resizing." msgstr "Boyutlandırma için seçilmiş ya da geçerli disk yok." -#: instances/views.py:1473 +#: instances/views.py:1474 #, python-format msgid "%(quota)s: cannot resize the disks of '%(instance_name)s'." msgstr "%(quota)s: '%(instance_name)s' diskleri yeniden boyutlandırılamıyor." -#: instances/views.py:1485 +#: instances/views.py:1486 #, python-format msgid "The storage pool of %(dev)s cannot resize its volumes" msgstr "%(dev)s diskinin depolama havuzu birimlerini boyutlandıramaz" -#: instances/views.py:1487 +#: instances/views.py:1488 #, python-format msgid "Disk is resized: %(dev)s" msgstr "Disk boyutu değiştirildi: %(dev)s" -#: instances/views.py:1581 +#: instances/views.py:1582 msgid "The VM's machine has no PCIe slots to add" msgstr "Sanal makinenin makine tipinde eklenecek PCIe yuvası yok" -#: instances/views.py:1586 +#: instances/views.py:1587 #, python-format msgid "%(count)s PCIe slots added" msgstr "%(count)s PCIe yuvası eklendi" -#: instances/views.py:1588 +#: instances/views.py:1589 #, python-format msgid "%(count)s PCIe slots added: the VM gets them at its next start" msgstr "" "%(count)s PCIe yuvası eklendi: sanal makine bunları sonraki başlatmasında " "alır" -#: instances/views.py:1639 +#: instances/views.py:1648 #, python-format msgid "%(volume)s is already a disk of this VM" msgstr "%(volume)s zaten bu sanal makinenin bir diski" -#: instances/views.py:1729 +#: instances/views.py:1738 msgid "Volume changes are applied. But it will be activated after shutdown" msgstr "" "Birim değişiklikleri uygulandı. Ama yeniden başlatıldıktan sonra uygulanacak" -#: instances/views.py:1734 +#: instances/views.py:1743 msgid "Volume is changed successfully." msgstr "Birim başarıyla değiştirildi." -#: instances/views.py:1754 +#: instances/views.py:1763 #, python-format msgid "Disk %(dev)s is not a storage volume of this instance" msgstr "%(dev)s diski bu sanal makinenin bir depolama birimi değil" -#: instances/views.py:1759 vrtManager/instance.py:2601 +#: instances/views.py:1768 vrtManager/instance.py:2601 msgid "The VM has a saved state; start it or remove the saved state first" msgstr "" "Sanal makinenin kaydedilmiş durumu var; önce başlatın veya kaydedilmiş durumu" " kaldırın" -#: instances/views.py:1765 +#: instances/views.py:1774 #, python-format msgid "Disk %(dev)s has a pending change; delete it once the VM is shut down" msgstr "" "%(dev)s diskinin bekleyen bir değişikliği var; sanal makine kapatıldığında " "silin" -#: instances/views.py:1780 +#: instances/views.py:1789 #, python-format msgid "Volume %(vol)s is used by another VM; detach it instead" msgstr "" "%(vol)s birimi başka bir sanal makine tarafından kullanılıyor; onun yerine " "ayırın" -#: instances/views.py:1798 +#: instances/views.py:1807 #, python-format msgid "" "The guest has not released disk %(dev)s yet; volume %(vol)s was kept. Delete " @@ -7592,66 +7592,66 @@ msgstr "" "Konuk sistem %(dev)s diskini henüz bırakmadı; %(vol)s birimi korundu. Sanal " "makine kapatıldığında depolama havuzundan silin." -#: instances/views.py:1809 +#: instances/views.py:1818 #, python-format msgid "Disk %(dev)s was detached, but its volume was kept: %(err)s" msgstr "%(dev)s diski ayrıldı, ancak birimi korundu: %(err)s" -#: instances/views.py:1837 +#: instances/views.py:1846 #, python-format msgid "This VM cannot take a CD-ROM on the %(bus)s bus now" msgstr "Bu sanal makineye şu anda %(bus)s veri yolunda CD-ROM eklenemez" -#: instances/views.py:1840 +#: instances/views.py:1849 msgid "A USB CD-ROM needs an ISO image: libvirt has no empty USB drive" msgstr "USB CD-ROM bir ISO imajı ister: libvirt boş USB sürücü desteklemiyor" -#: instances/views.py:1845 +#: instances/views.py:1854 #, python-format msgid "%(image)s is already in a CD-ROM of this VM" msgstr "%(image)s bu sanal makinenin bir CD-ROM'unda zaten takılı" -#: instances/views.py:1926 +#: instances/views.py:1935 #, python-format msgid "Pool %(pool)s was not read again: %(err)s" msgstr "%(pool)s havuzu yeniden okunamadı: %(err)s" -#: instances/views.py:1947 +#: instances/views.py:1956 #, python-format msgid "Snapshot was not deleted: %(err)s" msgstr "Anlık görüntü silinmedi: %(err)s" -#: instances/views.py:2066 +#: instances/views.py:2075 msgid "Add at least one device to the boot order." msgstr "Ön yükleme sırasına en az bir aygıt ekleyin." -#: instances/views.py:2072 vrtManager/instance.py:1364 +#: instances/views.py:2081 vrtManager/instance.py:1364 msgid "Invalid Device Type for boot order" msgstr "Ön yükleme sırası için geçersiz aygıt türü" -#: instances/views.py:2083 +#: instances/views.py:2092 msgid "Boot order changed. It applies at the next start." msgstr "Ön yükleme sırası değiştirildi. Sonraki başlatmada uygulanır." -#: instances/views.py:2085 +#: instances/views.py:2094 msgid "Boot order changed successfully." msgstr "Ön yükleme sırası başarıyla değiştirildi." -#: instances/views.py:2105 +#: instances/views.py:2114 msgid "The XML is empty" msgstr "XML boş" -#: instances/views.py:2109 instances/views.py:2829 +#: instances/views.py:2118 instances/views.py:2838 #, python-format msgid "The XML is not well-formed: %(error)s" msgstr "XML düzgün biçimlendirilmemiş: %(error)s" -#: instances/views.py:2111 +#: instances/views.py:2120 #, python-format msgid "The XML must keep the VM's UUID %(uuid)s." msgstr "XML, sanal makinenin %(uuid)s UUID'sini korumalıdır." -#: instances/views.py:2115 +#: instances/views.py:2124 msgid "" "The definition has changed since the editor was opened. Reload the page to " "edit the current one." @@ -7659,45 +7659,45 @@ msgstr "" "Düzenleyici açıldığından beri tanım değişti. Geçerli tanımı düzenlemek için " "sayfayı yeniden yükleyin." -#: instances/views.py:2131 +#: instances/views.py:2140 msgid "The XML definition was saved." msgstr "XML tanımı kaydedildi." -#: instances/views.py:2133 +#: instances/views.py:2142 msgid "The XML definition was saved; the VM uses it from its next start." msgstr "" "XML tanımı kaydedildi; sanal makine onu sonraki başlatmasından itibaren " "kullanır." -#: instances/views.py:2214 +#: instances/views.py:2223 msgid "Select one network interface to change" msgstr "Değiştirilecek bir ağ arabirimi seçin" -#: instances/views.py:2228 +#: instances/views.py:2237 #, python-format msgid "Network interface %(mac)s was changed meanwhile; reload the page" msgstr "%(mac)s ağ arayüzü bu arada değişti; sayfayı yeniden yükleyin" -#: instances/views.py:2258 +#: instances/views.py:2267 msgid "Network Device Config is changed. Please shutdown instance to activate." msgstr "" "Ağ aygıtı yapılandırması değiştirildi. Aktifleştirmek için lütfen sanal " "makineyi kapatın." -#: instances/views.py:2260 +#: instances/views.py:2269 msgid "Network device changed" msgstr "Ağ aygıtı değiştirildi" -#: instances/views.py:2272 +#: instances/views.py:2281 msgid "No network selected" msgstr "Ağ seçilmedi" -#: instances/views.py:2277 +#: instances/views.py:2286 #, python-format msgid "The VM already has a network device with MAC %(mac)s" msgstr "Sanal makinede %(mac)s MAC adresli bir ağ aygıtı zaten var" -#: instances/views.py:2296 +#: instances/views.py:2305 msgid "" "The running VM has no free PCI slot for another network device: shut it down " "and add the device then; Add PCIe slots on the Disks tab gives it free ones " @@ -7707,21 +7707,21 @@ msgstr "" "aygıtı sonra ekleyin; Diskler sekmesindeki PCIe yuvaları ekle, sonraki " "başlatmadan itibaren ona boş yuvalar verir." -#: instances/views.py:2342 instances/views.py:2348 +#: instances/views.py:2351 instances/views.py:2357 msgid "The VM has it" msgstr "Sanal makinede var" -#: instances/views.py:2383 +#: instances/views.py:2392 #, python-format msgid "The host has no USB device %(device)s; reload the page" msgstr "Sunucuda %(device)s USB aygıtı yok; sayfayı yeniden yükleyin" -#: instances/views.py:2404 +#: instances/views.py:2413 #, python-format msgid "The host has no PCI device %(device)s" msgstr "Sunucuda %(device)s PCI aygıtı yok" -#: instances/views.py:2422 +#: instances/views.py:2431 #, python-format msgid "" "Removal of PCI device %(address)s requested: the guest has not let it go yet;" @@ -7731,20 +7731,20 @@ msgstr "" "bırakmadı; bırakana ya da sanal makine durana kadar çalışan sanal makinede " "kalır." -#: instances/views.py:2467 instances/views.py:2497 +#: instances/views.py:2476 instances/views.py:2506 msgid "Select a network interface and a QoS direction" msgstr "Bir ağ arabirimi ve bir QoS yönü seçin" -#: instances/views.py:2470 vrtManager/network.py:470 +#: instances/views.py:2479 vrtManager/network.py:470 msgid "QoS rates must be whole numbers" msgstr "QoS hızları tam sayı olmalıdır" -#: instances/views.py:2477 networks/views.py:235 +#: instances/views.py:2486 networks/views.py:235 #, python-format msgid "%(qos_dir)s QoS is set" msgstr "%(qos_dir)s QoS ayarlandı" -#: instances/views.py:2482 +#: instances/views.py:2491 #, python-format msgid "" "%(qos_dir)s QoS is set. A running VM gets it after it is powered off and on." @@ -7752,12 +7752,12 @@ msgstr "" "%(qos_dir)s QoS ayarlandı. Çalışan bir sanal makine, kapatılıp açıldıktan " "sonra bunu alır." -#: instances/views.py:2504 networks/views.py:261 +#: instances/views.py:2513 networks/views.py:261 #, python-format msgid "%(qos_dir)s QoS is deleted" msgstr "%(qos_dir)s QoS silindi" -#: instances/views.py:2509 +#: instances/views.py:2518 #, python-format msgid "" "%(qos_dir)s QoS is deleted. A running VM keeps the old limit until it is " @@ -7766,21 +7766,21 @@ msgstr "" "%(qos_dir)s QoS silindi. Çalışan bir sanal makine, kapatılıp açılana kadar " "eski sınırı korur." -#: instances/views.py:2537 +#: instances/views.py:2546 msgid "Only one owner is allowed and the one already added" msgstr "Sadece bir sahibe izin verilmiştir ve bir sahip zaten eklenmiş" -#: instances/views.py:2539 +#: instances/views.py:2548 #, python-format msgid "%(user)s is already an owner" msgstr "%(user)s zaten bir sahip" -#: instances/views.py:2604 +#: instances/views.py:2613 #, python-format msgid "Console settings were not saved: %(errors)s" msgstr "Konsol ayarları kaydedilmedi: %(errors)s" -#: instances/views.py:2626 +#: instances/views.py:2635 msgid "" "Error setting console password. You should check that your instance have an " "graphic device." @@ -7788,41 +7788,41 @@ msgstr "" "Konsol parolası ayarlanırken hata oluştu. Sanal makinenin bir grafik aygıtına" " sahip olduğundan emin olunuz." -#: instances/views.py:2673 +#: instances/views.py:2682 msgid "Shut the VM down to change whether it is a template." msgstr "Şablon olup olmadığını değiştirmek için sanal makineyi kapatın." -#: instances/views.py:2679 +#: instances/views.py:2688 #, python-format msgid "%(quota)s: '%(instance_name)s' stays a template." msgstr "%(quota)s: '%(instance_name)s' şablon olarak kalıyor." -#: instances/views.py:2701 +#: instances/views.py:2710 msgid "An I/O limit is whole numbers of IOPS and MiB/s, 0 for none" msgstr "G/Ç sınırı, IOPS ve MiB/s için tam sayılardır; 0: sınır yok" -#: instances/views.py:2815 +#: instances/views.py:2824 msgid "The XML has no name" msgstr "XML'de ad yok" -#: instances/views.py:2833 webvirtcloud/middleware.py:157 +#: instances/views.py:2842 webvirtcloud/middleware.py:157 #, python-format msgid "libvirt Error - %(exception)s" msgstr "libvirt Hatası - %(exception)s" -#: instances/views.py:2847 +#: instances/views.py:2856 msgid "An empty disk of the size you set" msgstr "Belirlediğiniz boyutta boş bir disk" -#: instances/views.py:2848 +#: instances/views.py:2857 msgid "Volumes already in a pool" msgstr "Bir havuzda zaten bulunan birimler" -#: instances/views.py:2849 +#: instances/views.py:2858 msgid "A copy of a template volume" msgstr "Bir şablon biriminin kopyası" -#: instances/views.py:2939 +#: instances/views.py:2948 msgid "" "This host has no running storage pool for the VM's disks: add or start one on" " its Storage page." @@ -7830,29 +7830,29 @@ msgstr "" "Bu sunucuda sanal makinenin diskleri için çalışan bir depolama havuzu yok: " "Depolama sayfasından bir tane ekleyin ya da başlatın." -#: instances/views.py:2941 +#: instances/views.py:2950 msgid "This host has no network for the VM: add one on its Networks page." msgstr "" "Bu sunucuda sanal makine için ağ yok: Ağlar sayfasından bir tane ekleyin." -#: instances/views.py:2973 +#: instances/views.py:2982 #, python-format msgid "The machine type is q35, not %(machine)s: UEFI Secure Boot needs it" msgstr "Makine türü %(machine)s değil q35: UEFI Secure Boot bunu gerektiriyor" -#: instances/views.py:3002 +#: instances/views.py:3011 msgid "Flavor Created" msgstr "Flavor Oluşturuldu" -#: instances/views.py:3010 +#: instances/views.py:3019 msgid "Create Flavor" msgstr "Kullanıcı Oluştur" -#: instances/views.py:3022 +#: instances/views.py:3031 msgid "Flavor Deleted" msgstr "Flavor Silindi" -#: instances/views.py:3028 +#: instances/views.py:3037 msgid "Only the size template goes; VMs made from it keep their size." msgstr "" "Yalnızca boyut şablonu silinir; ondan oluşturulan sanal makineler boyutlarını" @@ -9476,8 +9476,8 @@ msgstr "" msgid "The worker stopped before the job changed anything" msgstr "Worker, iş herhangi bir şeyi değiştirmeden önce durdu" -#: storages/api/viewsets.py:145 storages/api/viewsets.py:161 -#: storages/api/viewsets.py:197 storages/api/viewsets.py:220 +#: storages/api/viewsets.py:148 storages/api/viewsets.py:164 +#: storages/api/viewsets.py:200 storages/api/viewsets.py:223 msgid "Pool is not active" msgstr "Havuz etkin değil" @@ -9559,111 +9559,115 @@ msgstr "İmaj adı 120 karakterden fazla olamaz" msgid "Clone volume" msgstr "Birimi klonla" -#: storages/jobs.py:66 storages/jobs.py:79 +#: storages/jobs.py:66 storages/jobs.py:83 msgid "Name of volume already in use" msgstr "Birim adı zaten kullanılıyor" -#: storages/jobs.py:73 +#: storages/jobs.py:70 +msgid "The volume changed since the copy was asked; ask it again" +msgstr "Kopya istendiğinden beri birim değişti; yeniden isteyin" + +#: storages/jobs.py:77 #, python-format msgid "The pool has no volume named %(name)s" msgstr "Havuzda %(name)s adında birim yok" -#: storages/jobs.py:75 +#: storages/jobs.py:79 msgid "An ISO image is not cloned" msgstr "ISO imajı klonlanmaz" -#: storages/jobs.py:88 +#: storages/jobs.py:94 msgid "Copying the volume" msgstr "Birim kopyalanıyor" -#: storages/jobs.py:100 +#: storages/jobs.py:106 msgid "" "The copy exists, but the job did not see it finish; check it, then resolve " "this job." msgstr "" "Kopya var, ancak iş bittiğini görmedi; kontrol edin, sonra bu işi çözün." -#: storages/jobs.py:101 +#: storages/jobs.py:107 msgid "The copy was not made" msgstr "Kopya oluşturulmadı" -#: storages/jobs.py:112 +#: storages/jobs.py:118 msgid "Upload ISO image" msgstr "ISO imajı yükle" -#: storages/jobs.py:127 +#: storages/jobs.py:133 msgid "Invalid file name" msgstr "Geçersiz dosya adı" -#: storages/jobs.py:129 +#: storages/jobs.py:135 msgid "Only .iso files can be uploaded" msgstr "Yalnızca .iso dosyaları yüklenebilir" -#: storages/jobs.py:131 +#: storages/jobs.py:137 msgid "Invalid file size" msgstr "Geçersiz dosya boyutu" -#: storages/jobs.py:133 +#: storages/jobs.py:139 msgid "Invalid chunk index or total chunks" msgstr "Geçersiz parça dizini veya toplam parça sayısı" -#: storages/jobs.py:164 +#: storages/jobs.py:169 msgid "Give an http or https address" msgstr "Bir http ya da https adresi verin" -#: storages/jobs.py:186 +#: storages/jobs.py:191 #, python-format msgid "The file could not be downloaded: %(error)s" msgstr "Dosya indirilemedi: %(error)s" -#: storages/jobs.py:213 +#: storages/jobs.py:218 #, python-format msgid "The server answered %(status)s, not the whole file" msgstr "Sunucu dosyanın tamamı yerine %(status)s yanıtı verdi" -#: storages/jobs.py:216 +#: storages/jobs.py:221 #, python-format msgid "The address is redirected more than %(count)s times" msgstr "Adres %(count)s defadan fazla yönlendiriliyor" -#: storages/jobs.py:226 +#: storages/jobs.py:231 msgid "Download volume" msgstr "Birim indir" -#: storages/jobs.py:241 +#: storages/jobs.py:246 msgid "A volume's name is letters, digits, '.', '_' and '-'" msgstr "Birim adı harf, rakam, '.', '_' ve '-' olur" -#: storages/jobs.py:246 +#: storages/jobs.py:251 msgid "Files are downloaded into a pool of files (dir, fs, netfs)" msgstr "Dosyalar, dosya tabanlı bir havuza (dir, fs, netfs) indirilir" -#: storages/jobs.py:250 +#: storages/jobs.py:255 storages/jobs.py:270 #, python-format msgid "The pool has a volume named %(name)s" msgstr "Havuzda %(name)s adında bir birim var" -#: storages/jobs.py:272 +#: storages/jobs.py:285 msgid "The server does not tell the file's size" msgstr "Sunucu dosyanın boyutunu bildirmiyor" -#: storages/jobs.py:275 +#: storages/jobs.py:288 msgid "The file is larger than the pool's free space" msgstr "Dosya, havuzun boş alanından büyük" -#: storages/jobs.py:285 +#: storages/jobs.py:303 msgid "The server sent more than the file's size" msgstr "Sunucu dosyanın boyutundan fazlasını gönderdi" -#: storages/jobs.py:298 +#: storages/jobs.py:314 msgid "The download ended early" msgstr "İndirme erken bitti" -#: storages/jobs.py:304 +#: storages/jobs.py:320 msgid "The download stopped and its volume was not deleted" msgstr "İndirme durdu ve birimi silinemedi" -#: storages/jobs.py:321 +#: storages/jobs.py:337 msgid "The download stopped; what it wrote was deleted" msgstr "İndirme durdu; yazdıkları silindi" @@ -10170,12 +10174,12 @@ msgstr "Yükleme oturumu meşgul. Lütfen yeniden deneyin." msgid "ISO image already exists" msgstr "ISO imajı zaten mevcut" -#: storages/views.py:188 +#: storages/views.py:190 #, python-format msgid "Volume: %(vol)s is deleted." msgstr "Birim: %(vol)s silindi." -#: storages/views.py:205 +#: storages/views.py:207 #, python-format msgid "Image file %(name)s is created successfully" msgstr "İmaj dosyası %(name)s başarıyla oluşturuldu" @@ -10840,31 +10844,31 @@ msgstr "Yedeği geri yükle" msgid "%(quota)s: cannot restore %(name)s" msgstr "%(quota)s: %(name)s geri yüklenemiyor" -#: vmbackups/jobs.py:1008 vmbackups/jobs.py:1230 vmbackups/jobs.py:1422 +#: vmbackups/jobs.py:1008 vmbackups/jobs.py:1231 vmbackups/jobs.py:1424 msgid "Only a ready backup is restored" msgstr "Yalnızca hazır bir yedek geri yüklenir" -#: vmbackups/jobs.py:1045 +#: vmbackups/jobs.py:1046 #, 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:1053 vmbackups/jobs.py:1274 vmbackups/jobs.py:1452 +#: vmbackups/jobs.py:1054 vmbackups/jobs.py:1276 vmbackups/jobs.py:1455 #, 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:1071 +#: vmbackups/jobs.py:1072 #, python-format msgid "The NVRAM file %(path)s exists already" msgstr "%(path)s NVRAM dosyası zaten var" -#: vmbackups/jobs.py:1111 vmbackups/jobs.py:1137 +#: vmbackups/jobs.py:1112 vmbackups/jobs.py:1138 #, 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:1141 vmbackups/jobs.py:1381 +#: vmbackups/jobs.py:1142 vmbackups/jobs.py:1383 #, python-format msgid "" "A disk was being copied when the job stopped; check this volume, then resolve" @@ -10873,7 +10877,7 @@ msgstr "" "İş durduğunda bir disk kopyalanıyordu; bu birimi kontrol edin, sonra bu işi " "çözün: %(volumes)s" -#: vmbackups/jobs.py:1146 vmbackups/jobs.py:1387 +#: vmbackups/jobs.py:1147 vmbackups/jobs.py:1389 #, python-format msgid "" "Storage pool %(pool)s is not active; the restore's copies in it are removed " @@ -10882,20 +10886,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:1160 +#: vmbackups/jobs.py:1161 msgid "The VM was not defined; its copies were removed" msgstr "Sanal makine tanımlanmadı; kopyaları kaldırıldı" -#: vmbackups/jobs.py:1173 +#: vmbackups/jobs.py:1174 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:1176 +#: vmbackups/jobs.py:1177 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:1181 +#: vmbackups/jobs.py:1182 #, python-format msgid "" "The VM's disks (%(now)s) are not the backup's (%(then)s); restore it as a new" @@ -10904,7 +10908,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:1185 +#: vmbackups/jobs.py:1186 #, python-format msgid "" "The backup's disk %(dev)s is larger than the VM's now; restore it as a new VM" @@ -10912,37 +10916,37 @@ msgstr "" "Yedeğin %(dev)s diski VM'in şimdiki diskinden büyük; yeni bir VM olarak geri " "yükleyin" -#: vmbackups/jobs.py:1188 +#: vmbackups/jobs.py:1189 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:1190 +#: vmbackups/jobs.py:1191 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:1221 +#: vmbackups/jobs.py:1222 msgid "Restore backup over the VM" msgstr "Yedeği VM'in üzerine geri yükle" -#: vmbackups/jobs.py:1234 +#: vmbackups/jobs.py:1235 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:1264 +#: vmbackups/jobs.py:1266 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:1298 +#: vmbackups/jobs.py:1300 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:1301 +#: vmbackups/jobs.py:1303 msgid "Replacing the VM's disks" msgstr "VM'in diskleri değiştiriliyor" -#: vmbackups/jobs.py:1361 +#: vmbackups/jobs.py:1363 msgid "" "The VM moved to another compute; check its disks and the restore's copies, " "then resolve this job" @@ -10950,7 +10954,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:1374 +#: vmbackups/jobs.py:1376 msgid "" "The VM was started while its disks were being replaced; check its disks, then" " resolve this job" @@ -10958,25 +10962,25 @@ msgstr "" "VM'in diskleri değiştirilirken VM başlatıldı; disklerini denetleyin, sonra bu" " işi çözümleyin" -#: vmbackups/jobs.py:1392 +#: vmbackups/jobs.py:1394 msgid "The VM keeps its disks; the restore's copies were removed" msgstr "VM disklerini koruyor; geri yüklemenin kopyaları silindi" -#: vmbackups/jobs.py:1404 +#: vmbackups/jobs.py:1406 msgid "Restore a disk of a backup" msgstr "Yedeğin bir diskini geri yükle" -#: vmbackups/jobs.py:1415 +#: vmbackups/jobs.py:1417 #, python-format msgid "The backup has no disk %(dev)s" msgstr "Yedekte %(dev)s diski yok" -#: vmbackups/jobs.py:1425 +#: vmbackups/jobs.py:1427 #, python-format msgid "%(name)s is not a volume name" msgstr "%(name)s bir birim adı değil" -#: vmbackups/jobs.py:1484 +#: vmbackups/jobs.py:1487 #, python-format msgid "" "The disk was being copied when the job stopped; check this volume, then " @@ -10985,15 +10989,15 @@ msgstr "" "İş durduğunda disk kopyalanıyordu; bu birimi denetleyin, sonra bu işi " "çözümleyin: %(volume)s" -#: vmbackups/jobs.py:1487 +#: vmbackups/jobs.py:1490 msgid "The disk was not restored" msgstr "Disk geri yüklenmedi" -#: vmbackups/jobs.py:1508 vmbackups/templates/vmbackups/target.html:23 +#: vmbackups/jobs.py:1511 vmbackups/templates/vmbackups/target.html:23 msgid "Read backups from target" msgstr "Yedekleri hedeften oku" -#: vmbackups/jobs.py:1577 +#: vmbackups/jobs.py:1580 #, python-format msgid "" "Not read, as a file of the backup is missing, changed or unreadable: " @@ -11002,16 +11006,16 @@ msgstr "" "Yedeğin bir dosyası eksik, değişmiş ya da okunamaz olduğu için okunmadı: " "%(names)s" -#: vmbackups/jobs.py:1593 +#: vmbackups/jobs.py:1596 msgid "Check backup target" msgstr "Yedek hedefini denetle" -#: vmbackups/jobs.py:1630 +#: vmbackups/jobs.py:1633 #, python-format msgid "Backups missing from %(target)s" msgstr "%(target)s hedefinde kayıp yedekler" -#: vmbackups/jobs.py:1631 vmbackups/jobs.py:1633 +#: vmbackups/jobs.py:1634 vmbackups/jobs.py:1636 #, python-format msgid "Files of these backups are missing from the target: %(backups)s" msgstr "Şu yedeklerin dosyaları hedefte yok: %(backups)s" @@ -11508,7 +11512,7 @@ msgstr "Zamanlamalar:" msgid "No backup of this VM yet." msgstr "Bu sanal makinenin henüz yedeği yok." -#: vmbackups/utils.py:36 +#: vmbackups/utils.py:38 #, python-format msgid "" "Volume %(volume)s belongs to a backup of %(vm)s; delete the backup on the " @@ -11516,7 +11520,7 @@ msgid "" msgstr "" "%(volume)s birimi %(vm)s yedeğine ait; yedeği Yedekler sayfasından silin" -#: vmbackups/utils.py:46 +#: vmbackups/utils.py:48 #, python-format msgid "" "Storage pool %(pool)s is backup target %(target)s; remove it from the target " @@ -11524,14 +11528,14 @@ msgid "" msgstr "" "%(pool)s depolama havuzu %(target)s yedek hedefidir; önce hedeften çıkarın" -#: vmbackups/utils.py:73 +#: vmbackups/utils.py:85 msgid "" "No backup target open to VM owners has a storage pool on this VM's host." msgstr "" "VM sahiplerine açık hiçbir yedek hedefinin bu VM'in sunucusunda depolama " "havuzu yok." -#: vmbackups/utils.py:74 +#: vmbackups/utils.py:86 msgid "No backup target has a storage pool on this VM's host." msgstr "" "Hiçbir yedek hedefinin bu sanal makinenin sunucusunda depolama havuzu yok." diff --git a/locale/zh/LC_MESSAGES/django.mo b/locale/zh/LC_MESSAGES/django.mo index 2d82db53..12ebfc6a 100644 Binary files a/locale/zh/LC_MESSAGES/django.mo and b/locale/zh/LC_MESSAGES/django.mo differ diff --git a/locale/zh/LC_MESSAGES/django.po b/locale/zh/LC_MESSAGES/django.po index 1a8dd27b..a1662f21 100644 --- a/locale/zh/LC_MESSAGES/django.po +++ b/locale/zh/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-11-20 11:28+0000\n" +"POT-Creation-Date: 2026-11-20 12:24+0000\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -221,7 +221,7 @@ msgstr "用户页面导航" #: admin/forms.py:221 admin/templates/admin/tag_list.html:25 #: computes/templates/computes/list.html:34 #: computes/templates/computes/list.html:62 computes/templates/overview.html:90 -#: instances/views.py:278 vmbackups/templates/vmbackups/policies.html:17 +#: instances/views.py:279 vmbackups/templates/vmbackups/policies.html:17 msgid "VMs" msgstr "虚拟机" @@ -245,7 +245,7 @@ msgstr "添加虚拟机" #: instances/templates/allinstances.html:146 #: instances/templates/allinstances_index_nongrouped.html:9 #: instances/templates/create_steps.html:6 -#: instances/templates/create_steps.html:8 instances/views.py:254 +#: instances/templates/create_steps.html:8 instances/views.py:255 #: operations/templates/operations/jobs.html:24 msgid "Host" msgstr "主机" @@ -773,7 +773,7 @@ msgstr "NEW_USER_DEFAULT_INSTANCES:%(name)s 已有所有者,且只允许一 #: instances/templates/allinstances_index_nongrouped.html:15 #: instances/templates/create_instance_w2.html:63 #: instances/templates/instances/resize_tab.html:30 -#: instances/templates/instances/settings_tab.html:878 instances/views.py:254 +#: instances/templates/instances/settings_tab.html:878 instances/views.py:255 msgid "vCPUs" msgstr "vCPU" @@ -987,7 +987,7 @@ msgid "IP" msgstr "IP" #: admin/templates/admin/logs.html:56 admin/views.py:398 instances/states.py:19 -#: instances/views.py:502 logs/views.py:18 +#: instances/views.py:503 logs/views.py:18 msgid "Unknown" msgstr "未知" @@ -1005,7 +1005,7 @@ msgstr "失败" #: admin/templates/admin/tag_list.html:6 admin/templates/admin/tag_list.html:8 #: admin/templates/admin/tag_list.html:17 computes/forms.py:55 -#: instances/templates/instances/settings_tab.html:958 instances/views.py:255 +#: instances/templates/instances/settings_tab.html:958 instances/views.py:256 #: templates/common/tag_filter.html:6 templates/navbar.html:39 msgid "Tags" msgstr "标签" @@ -1091,7 +1091,7 @@ msgstr "受保护" msgid "Left" msgstr "已离开" -#: admin/templates/admin/tombstone_list.html:36 instances/views.py:255 +#: admin/templates/admin/tombstone_list.html:36 instances/views.py:256 msgid "Owners" msgstr "所有者" @@ -2474,7 +2474,7 @@ msgstr "不迁移其虚拟机,直接将主机置于维护状态?" msgid "Put in maintenance without migrating" msgstr "不迁移,直接进入维护" -#: computes/templates/computes/bulk_migrate.html:26 instances/views.py:395 +#: computes/templates/computes/bulk_migrate.html:26 instances/views.py:396 msgid "There is no other host to migrate to." msgstr "没有其他可迁移到的主机。" @@ -3365,13 +3365,13 @@ msgid "" msgstr "不支持控制台类型 '%(type)s'。请将虚拟机图形切换为 VNC。" #: instances/api/viewsets.py:160 instances/api/viewsets.py:178 -#: instances/jobs.py:1605 instances/views.py:1009 instances/views.py:1031 -#: instances/views.py:2021 +#: instances/jobs.py:1605 instances/views.py:1010 instances/views.py:1032 +#: instances/views.py:2030 msgid "Templates cannot be started." msgstr "模板无法启动。" #: instances/forms.py:14 instances/templates/create_instance_w2.html:69 -#: instances/templates/instances/settings_tab.html:882 instances/views.py:254 +#: instances/templates/instances/settings_tab.html:882 instances/views.py:255 msgid "Memory (MiB)" msgstr "内存(MiB)" @@ -3632,8 +3632,8 @@ msgid "Clone VM" msgstr "克隆虚拟机" #: instances/jobs.py:668 instances/jobs.py:675 instances/jobs.py:1017 -#: vmbackups/jobs.py:369 vmbackups/jobs.py:1075 vmbackups/jobs.py:1281 -#: vmbackups/jobs.py:1456 +#: vmbackups/jobs.py:369 vmbackups/jobs.py:1076 vmbackups/jobs.py:1283 +#: vmbackups/jobs.py:1459 msgid "Copying disks" msgstr "正在复制磁盘" @@ -3730,7 +3730,7 @@ msgstr "磁盘缓存 %(cache)s 与设置中的原生 (native) 磁盘 I/O 不兼 msgid "Create VM" msgstr "创建虚拟机" -#: instances/jobs.py:940 instances/jobs.py:987 instances/views.py:2817 +#: instances/jobs.py:940 instances/jobs.py:987 instances/views.py:2826 msgid "A virtual machine with this name already exists" msgstr "同名虚拟机已存在" @@ -4122,7 +4122,7 @@ msgid "Disk source" msgstr "磁盘来源" #: instances/templates/add_instance_volume.html:21 -#: instances/templates/create_instance_w2.html:134 instances/views.py:2847 +#: instances/templates/create_instance_w2.html:134 instances/views.py:2856 msgid "New disk" msgstr "新磁盘" @@ -4361,7 +4361,7 @@ msgstr "查找" msgid "Address" msgstr "地址" -#: instances/templates/allinstances.html:143 instances/views.py:254 +#: instances/templates/allinstances.html:143 instances/views.py:255 #: interfaces/templates/interface.html:153 networks/templates/network.html:202 #: vmbackups/templates/vmbackups/index.html:18 #: vmbackups/templates/vmbackups/index.html:50 @@ -4567,7 +4567,7 @@ msgstr "自定义 CPU 型号" msgid "Size (GiB)" msgstr "大小(GiB)" -#: instances/templates/create_instance_w2.html:161 instances/views.py:2848 +#: instances/templates/create_instance_w2.html:161 instances/views.py:2857 msgid "Existing volumes" msgstr "已有卷" @@ -4604,7 +4604,7 @@ msgstr "设备" msgid "Remove" msgstr "移除" -#: instances/templates/create_instance_w2.html:194 instances/views.py:2849 +#: instances/templates/create_instance_w2.html:194 instances/views.py:2858 msgid "Clone from template" msgstr "从模板克隆" @@ -6729,15 +6729,15 @@ msgstr "无效的 MAC 地址" msgid "More MAC addresses than networks" msgstr "MAC 地址数量多于网络数量" -#: instances/views.py:205 +#: instances/views.py:206 msgid "Enter an IP address, a network such as 192.0.2.0/24, or a MAC address." msgstr "请输入 IP 地址、网络(如 192.0.2.0/24)或 MAC 地址。" -#: instances/views.py:211 instances/views.py:245 +#: instances/views.py:212 instances/views.py:246 msgid "Too many searches are still running; try again shortly." msgstr "仍在运行的搜索过多;请稍后再试。" -#: instances/views.py:254 interfaces/templates/interface.html:46 +#: instances/views.py:255 interfaces/templates/interface.html:46 #: networks/templates/network.html:51 #: operations/templates/operations/jobs.html:38 #: operations/templates/operations/jobs.html:62 @@ -6749,184 +6749,184 @@ msgstr "仍在运行的搜索过多;请稍后再试。" msgid "State" msgstr "状态" -#: instances/views.py:254 +#: instances/views.py:255 msgid "OS" msgstr "操作系统" -#: instances/views.py:254 +#: instances/views.py:255 msgid "OS family" msgstr "操作系统系列" -#: instances/views.py:254 +#: instances/views.py:255 msgid "IP addresses" msgstr "IP 地址" -#: instances/views.py:255 +#: instances/views.py:256 msgid "Address sources" msgstr "地址来源" -#: instances/views.py:255 +#: instances/views.py:256 msgid "MAC addresses" msgstr "MAC 地址" -#: instances/views.py:255 +#: instances/views.py:256 msgid "In the panel" msgstr "在面板中" -#: instances/views.py:267 +#: instances/views.py:268 msgid "yes" msgstr "是" -#: instances/views.py:267 +#: instances/views.py:268 msgid "no" msgstr "否" -#: instances/views.py:269 +#: instances/views.py:270 #, python-format msgid "Created: %(time)s" msgstr "创建时间:%(time)s" -#: instances/views.py:270 +#: instances/views.py:271 #, python-format msgid "VMs listed: %(n)s" msgstr "列出的虚拟机:%(n)s" -#: instances/views.py:271 +#: instances/views.py:272 #, python-format msgid "Running VMs read: %(n)s" msgstr "已读取的运行中虚拟机:%(n)s" -#: instances/views.py:272 +#: instances/views.py:273 #, python-format msgid "" "Without a connected guest agent (a static address on them cannot be seen): " "%(n)s" msgstr "没有已连接客户机代理的虚拟机(无法看到其上的静态地址):%(n)s" -#: instances/views.py:273 +#: instances/views.py:274 #, python-format msgid "" "Guest agents not read (a paused VM, no answer in time, or an error): %(n)s" msgstr "未读取的客户机代理(虚拟机已暂停、未及时响应或出错):%(n)s" -#: instances/views.py:275 +#: instances/views.py:276 #, python-format msgid "Hosts not reached: %(hosts)s" msgstr "无法连接的主机:%(hosts)s" -#: instances/views.py:277 +#: instances/views.py:278 #, python-format msgid "Hosts not finished in time: %(hosts)s" msgstr "未按时完成的主机:%(hosts)s" -#: instances/views.py:278 +#: instances/views.py:279 msgid "Coverage" msgstr "覆盖范围" -#: instances/views.py:293 +#: instances/views.py:294 #, python-format msgid "The host %(host)s of '%(name)s' cannot be reached: %(error)s" msgstr "无法连接“%(name)s”所在的主机 %(host)s:%(error)s" -#: instances/views.py:299 +#: instances/views.py:300 #, python-format msgid "The host of '%(name)s' cannot be reached right now." msgstr "目前无法连接“%(name)s”所在的主机。" -#: instances/views.py:300 +#: instances/views.py:301 msgid " Jobs on it can be followed under Jobs in the menu." msgstr " 其上的任务可在菜单的“任务”中跟踪。" -#: instances/views.py:308 +#: instances/views.py:309 #, python-format msgid "'%(name)s' is no longer on its host." msgstr "“%(name)s”已不在其主机上。" -#: instances/views.py:397 +#: instances/views.py:398 msgid "A VM migrates when it is running, paused or shut off." msgstr "虚拟机在运行、暂停或关机状态下均可迁移。" -#: instances/views.py:399 +#: instances/views.py:400 msgid "" "A VM with snapshots cannot be migrated: its snapshots stay on this host. " "Delete them first." msgstr "有快照的虚拟机无法迁移:其快照保留在本主机上。请先删除快照。" -#: instances/views.py:401 +#: instances/views.py:402 msgid "" "A VM with host devices cannot be migrated: the destination may not have them." " Remove them first." msgstr "有主机设备的虚拟机无法迁移:目标主机可能没有这些设备。请先移除它们。" -#: instances/views.py:651 +#: instances/views.py:652 #, python-format msgid "Disk %(dev)s has changed since the page was loaded; reload the page" msgstr "磁盘 %(dev)s 在页面加载后已更改;请刷新页面" -#: instances/views.py:726 instances/views.py:737 +#: instances/views.py:727 instances/views.py:738 msgid "Choose the VMs and write the tag" msgstr "请选择虚拟机并填写标签" -#: instances/views.py:729 instances/views.py:788 +#: instances/views.py:730 instances/views.py:789 #, python-format msgid "Choose at most %(count)s VMs at once" msgstr "一次最多选择 %(count)s 台虚拟机" -#: instances/views.py:742 +#: instances/views.py:743 #, python-format msgid "There is no tag %(tag)s" msgstr "没有标签 %(tag)s" -#: instances/views.py:749 +#: instances/views.py:750 #, python-format msgid "Tag %(tag)s removed from %(count)s VM" msgid_plural "Tag %(tag)s removed from %(count)s VMs" msgstr[0] "已从 %(count)s 台虚拟机移除标签 %(tag)s" -#: instances/views.py:750 +#: instances/views.py:751 #, python-format msgid "Tag %(tag)s added to %(count)s VM" msgid_plural "Tag %(tag)s added to %(count)s VMs" msgstr[0] "已为 %(count)s 台虚拟机添加标签 %(tag)s" -#: instances/views.py:765 instances/views.py:835 +#: instances/views.py:766 instances/views.py:836 msgid "a chosen VM" msgstr "所选的一台虚拟机" -#: instances/views.py:777 +#: instances/views.py:778 #, python-format msgid "%(count)s VM is queued; the Jobs page follows it." msgid_plural "%(count)s VMs are queued; the Jobs page follows them." msgstr[0] "已将 %(count)s 台虚拟机加入队列;可在任务页面查看。" -#: instances/views.py:799 instances/views.py:801 +#: instances/views.py:800 instances/views.py:802 msgid "Choose the VMs you may power, and Start, Shut down or Force off" msgstr "请选择您可操作电源的虚拟机,然后选择启动、关闭或强制关闭" -#: instances/views.py:803 +#: instances/views.py:804 #, python-format msgid "%(vm)s: you may not power it now" msgstr "%(vm)s:您现在无法对其进行电源操作" -#: instances/views.py:811 instances/views.py:813 +#: instances/views.py:812 instances/views.py:814 msgid "Choose the VMs and write the snapshot's name" msgstr "请选择虚拟机并填写快照名称" -#: instances/views.py:823 +#: instances/views.py:824 #, python-format msgid "%(vm)s: a template's snapshots are not taken here" msgstr "%(vm)s:模板的快照不在此处创建" -#: instances/views.py:827 +#: instances/views.py:828 #, python-format msgid "%(vm)s: you may not snapshot it" msgstr "%(vm)s:您无法为其创建快照" -#: instances/views.py:855 instances/views.py:856 +#: instances/views.py:856 instances/views.py:857 msgid "The VM was moved meanwhile; try again." msgstr "该虚拟机在此期间已被移动;请重试。" -#: instances/views.py:972 +#: instances/views.py:973 msgid "" "The running VM has no free PCI slot for another disk on this bus: choose the " "scsi bus if the VM has a SCSI controller, or shut the VM down and add the " @@ -6936,7 +6936,7 @@ msgstr "" "运行中的虚拟机在此总线上没有可用 PCI 插槽来添加磁盘:如果虚拟机有 SCSI 控制器,请选择 scsi " "总线;或关闭虚拟机后再添加磁盘。“磁盘”选项卡上的“添加 PCIe 插槽”可使其从下次启动起获得可用插槽。新卷会保留在其存储池中,可作为现有卷挂载。" -#: instances/views.py:976 +#: instances/views.py:977 msgid "" "The running VM has no free PCI slot for the SCSI controller the disk needs: " "shut the VM down and add the disk then; Add PCIe slots on the Disks tab gives" @@ -6946,289 +6946,289 @@ msgstr "" "运行中的虚拟机没有可用 PCI 插槽来添加磁盘所需的 SCSI 控制器:请关闭虚拟机后再添加磁盘。“磁盘”选项卡上的“添加 PCIe " "插槽”可使其从下次启动起获得可用插槽。新卷会保留在其存储池中,可作为现有卷挂载。" -#: instances/views.py:994 +#: instances/views.py:995 #, python-format msgid "Invalid disk options: %(options)s" msgstr "无效的磁盘选项:%(options)s" -#: instances/views.py:1006 instances/views.py:1101 +#: instances/views.py:1007 instances/views.py:1102 #, python-format msgid "Invalid options: %(options)s" msgstr "无效的选项:%(options)s" -#: instances/views.py:1041 +#: instances/views.py:1042 msgid "The VM was forced off but did not start again: it stays off." msgstr "虚拟机已被强制关机,但没有再次启动:它保持关机状态。" -#: instances/views.py:1229 +#: instances/views.py:1230 #, python-format msgid "Set the gstfsd key of %(compute)s first (Computes, edit the host)" msgstr "请先设置 %(compute)s 的 gstfsd 密钥(计算节点,编辑该主机)" -#: instances/views.py:1236 instances/views.py:1254 instances/views.py:1263 +#: instances/views.py:1237 instances/views.py:1255 instances/views.py:1264 #, python-format msgid "gstfsd error: %(err)s" msgstr "gstfsd 错误:%(err)s" -#: instances/views.py:1264 +#: instances/views.py:1265 msgid "the reply is not signed with the key" msgstr "回复未使用该密钥签名" -#: instances/views.py:1272 +#: instances/views.py:1273 msgid "Shut the VM down, or start its QEMU guest agent, and try again" msgstr "请关闭虚拟机,或启动其 QEMU 客户机代理,然后重试" -#: instances/views.py:1280 +#: instances/views.py:1281 msgid "The change may still be made when the agent answers again." msgstr "当代理再次响应时,此更改仍可能生效。" -#: instances/views.py:1295 +#: instances/views.py:1296 msgid "Enter a password" msgstr "请输入密码" -#: instances/views.py:1300 +#: instances/views.py:1301 msgid "Enter a password of at most 4096 characters, without NUL characters" msgstr "请输入不超过 4096 个字符且不含 NUL 字符的密码" -#: instances/views.py:1316 +#: instances/views.py:1317 msgid "Reset root password" msgstr "重置 root 密码" -#: instances/views.py:1332 +#: instances/views.py:1333 msgid "Select an SSH public key" msgstr "请选择 SSH 公钥" -#: instances/views.py:1354 +#: instances/views.py:1355 #, python-format msgid "Installed new SSH public key %(keyname)s" msgstr "已安装新的 SSH 公钥 %(keyname)s" -#: instances/views.py:1374 +#: instances/views.py:1375 msgid "Enter a whole number of vCPUs" msgstr "请输入整数个 vCPU" -#: instances/views.py:1378 +#: instances/views.py:1379 msgid "Shut off the VM to change its vCPUs" msgstr "请关闭虚拟机以更改其 vCPU" -#: instances/views.py:1381 +#: instances/views.py:1382 msgid "The current vCPUs cannot be more than the maximum" msgstr "当前 vCPU 数不能超过最大值" -#: instances/views.py:1388 +#: instances/views.py:1389 #, python-format msgid "%(quota)s: cannot resize the CPU of '%(instance_name)s'." msgstr "%(quota)s:无法调整“%(instance_name)s”的 CPU。" -#: instances/views.py:1396 +#: instances/views.py:1397 #, python-format msgid "vCPUs set to %(cur)s (maximum %(max)s)" msgstr "vCPU 已设为 %(cur)s(最大 %(max)s)" -#: instances/views.py:1415 +#: instances/views.py:1416 msgid "Enter a whole number for memory" msgstr "请输入整数内存值" -#: instances/views.py:1418 +#: instances/views.py:1419 msgid "The current memory cannot be more than the maximum" msgstr "当前内存不能超过最大值" -#: instances/views.py:1422 +#: instances/views.py:1423 #, python-format msgid "%(quota)s: cannot resize the memory of '%(instance_name)s'." msgstr "%(quota)s:无法调整“%(instance_name)s”的内存。" -#: instances/views.py:1428 +#: instances/views.py:1429 #, python-format msgid "Memory set to %(cur)s MiB (maximum %(max)s MiB)" msgstr "内存已设为 %(cur)s MiB(最大 %(max)s MiB)" -#: instances/views.py:1448 +#: instances/views.py:1449 msgid "Enter disk sizes as whole GiB" msgstr "请以整数 GiB 输入磁盘大小" -#: instances/views.py:1452 +#: instances/views.py:1453 #, python-format msgid "Disk %(dev)s was changed meanwhile; reload the page" msgstr "磁盘 %(dev)s 在此期间已更改;请重新加载页面" -#: instances/views.py:1456 +#: instances/views.py:1457 #, python-format msgid "%(dev)s is %(size)s: a disk cannot shrink" msgstr "%(dev)s 为 %(size)s:磁盘不能缩小" -#: instances/views.py:1464 +#: instances/views.py:1465 msgid "No disks were selected or valid for resizing." msgstr "未选择磁盘或没有可调整大小的有效磁盘。" -#: instances/views.py:1473 +#: instances/views.py:1474 #, python-format msgid "%(quota)s: cannot resize the disks of '%(instance_name)s'." msgstr "%(quota)s:无法调整“%(instance_name)s”的磁盘。" -#: instances/views.py:1485 +#: instances/views.py:1486 #, python-format msgid "The storage pool of %(dev)s cannot resize its volumes" msgstr "%(dev)s 所在的存储池无法调整其卷的大小" -#: instances/views.py:1487 +#: instances/views.py:1488 #, python-format msgid "Disk is resized: %(dev)s" msgstr "磁盘已调整大小:%(dev)s" -#: instances/views.py:1581 +#: instances/views.py:1582 msgid "The VM's machine has no PCIe slots to add" msgstr "该虚拟机的机器类型没有可添加的 PCIe 插槽" -#: instances/views.py:1586 +#: instances/views.py:1587 #, python-format msgid "%(count)s PCIe slots added" msgstr "已添加 %(count)s 个 PCIe 插槽" -#: instances/views.py:1588 +#: instances/views.py:1589 #, python-format msgid "%(count)s PCIe slots added: the VM gets them at its next start" msgstr "已添加 %(count)s 个 PCIe 插槽:虚拟机在下次启动时获得它们" -#: instances/views.py:1639 +#: instances/views.py:1648 #, python-format msgid "%(volume)s is already a disk of this VM" msgstr "%(volume)s 已是此虚拟机的磁盘" -#: instances/views.py:1729 +#: instances/views.py:1738 msgid "Volume changes are applied. But it will be activated after shutdown" msgstr "卷更改已应用,但将在关机后生效" -#: instances/views.py:1734 +#: instances/views.py:1743 msgid "Volume is changed successfully." msgstr "卷已成功更改。" -#: instances/views.py:1754 +#: instances/views.py:1763 #, python-format msgid "Disk %(dev)s is not a storage volume of this instance" msgstr "磁盘 %(dev)s 不是此虚拟机的存储卷" -#: instances/views.py:1759 vrtManager/instance.py:2601 +#: instances/views.py:1768 vrtManager/instance.py:2601 msgid "The VM has a saved state; start it or remove the saved state first" msgstr "虚拟机有保存的状态;请先启动它或删除保存的状态" -#: instances/views.py:1765 +#: instances/views.py:1774 #, python-format msgid "Disk %(dev)s has a pending change; delete it once the VM is shut down" msgstr "磁盘 %(dev)s 有待生效的更改;请在虚拟机关机后删除它" -#: instances/views.py:1780 +#: instances/views.py:1789 #, python-format msgid "Volume %(vol)s is used by another VM; detach it instead" msgstr "卷 %(vol)s 正被另一台虚拟机使用;请改为分离它" -#: instances/views.py:1798 +#: instances/views.py:1807 #, python-format msgid "" "The guest has not released disk %(dev)s yet; volume %(vol)s was kept. Delete " "it from the storage pool once the VM is shut down." msgstr "客户机尚未释放磁盘 %(dev)s;卷 %(vol)s 已保留。请在虚拟机关机后从存储池中删除它。" -#: instances/views.py:1809 +#: instances/views.py:1818 #, python-format msgid "Disk %(dev)s was detached, but its volume was kept: %(err)s" msgstr "磁盘 %(dev)s 已分离,但其卷已保留:%(err)s" -#: instances/views.py:1837 +#: instances/views.py:1846 #, python-format msgid "This VM cannot take a CD-ROM on the %(bus)s bus now" msgstr "该虚拟机现在无法在 %(bus)s 总线上添加 CD-ROM" -#: instances/views.py:1840 +#: instances/views.py:1849 msgid "A USB CD-ROM needs an ISO image: libvirt has no empty USB drive" msgstr "USB CD-ROM 需要 ISO 镜像:libvirt 不支持空的 USB 驱动器" -#: instances/views.py:1845 +#: instances/views.py:1854 #, python-format msgid "%(image)s is already in a CD-ROM of this VM" msgstr "%(image)s 已在此虚拟机的某个光驱中" -#: instances/views.py:1926 +#: instances/views.py:1935 #, python-format msgid "Pool %(pool)s was not read again: %(err)s" msgstr "未重新读取存储池 %(pool)s:%(err)s" -#: instances/views.py:1947 +#: instances/views.py:1956 #, python-format msgid "Snapshot was not deleted: %(err)s" msgstr "快照未删除:%(err)s" -#: instances/views.py:2066 +#: instances/views.py:2075 msgid "Add at least one device to the boot order." msgstr "请至少向启动顺序中添加一个设备。" -#: instances/views.py:2072 vrtManager/instance.py:1364 +#: instances/views.py:2081 vrtManager/instance.py:1364 msgid "Invalid Device Type for boot order" msgstr "启动顺序的设备类型无效" -#: instances/views.py:2083 +#: instances/views.py:2092 msgid "Boot order changed. It applies at the next start." msgstr "启动顺序已更改,将在下次启动时生效。" -#: instances/views.py:2085 +#: instances/views.py:2094 msgid "Boot order changed successfully." msgstr "启动顺序已成功更改。" -#: instances/views.py:2105 +#: instances/views.py:2114 msgid "The XML is empty" msgstr "XML 为空" -#: instances/views.py:2109 instances/views.py:2829 +#: instances/views.py:2118 instances/views.py:2838 #, python-format msgid "The XML is not well-formed: %(error)s" msgstr "XML 格式不正确:%(error)s" -#: instances/views.py:2111 +#: instances/views.py:2120 #, python-format msgid "The XML must keep the VM's UUID %(uuid)s." msgstr "XML 必须保留虚拟机的 UUID %(uuid)s。" -#: instances/views.py:2115 +#: instances/views.py:2124 msgid "" "The definition has changed since the editor was opened. Reload the page to " "edit the current one." msgstr "自打开编辑器以来定义已被更改。请重新加载页面以编辑当前定义。" -#: instances/views.py:2131 +#: instances/views.py:2140 msgid "The XML definition was saved." msgstr "XML 定义已保存。" -#: instances/views.py:2133 +#: instances/views.py:2142 msgid "The XML definition was saved; the VM uses it from its next start." msgstr "XML 定义已保存;虚拟机从下次启动起使用它。" -#: instances/views.py:2214 +#: instances/views.py:2223 msgid "Select one network interface to change" msgstr "请选择一个要更改的网络接口" -#: instances/views.py:2228 +#: instances/views.py:2237 #, python-format msgid "Network interface %(mac)s was changed meanwhile; reload the page" msgstr "网络接口 %(mac)s 在此期间已更改;请重新加载页面" -#: instances/views.py:2258 +#: instances/views.py:2267 msgid "Network Device Config is changed. Please shutdown instance to activate." msgstr "网络设备配置已更改。请关闭虚拟机以使其生效。" -#: instances/views.py:2260 +#: instances/views.py:2269 msgid "Network device changed" msgstr "网络设备已更改" -#: instances/views.py:2272 +#: instances/views.py:2281 msgid "No network selected" msgstr "未选择网络" -#: instances/views.py:2277 +#: instances/views.py:2286 #, python-format msgid "The VM already has a network device with MAC %(mac)s" msgstr "虚拟机已有 MAC 地址为 %(mac)s 的网络设备" -#: instances/views.py:2296 +#: instances/views.py:2305 msgid "" "The running VM has no free PCI slot for another network device: shut it down " "and add the device then; Add PCIe slots on the Disks tab gives it free ones " @@ -7236,140 +7236,140 @@ msgid "" msgstr "" "运行中的虚拟机没有可用 PCI 插槽来添加网络设备:请关机后再添加设备。“磁盘”选项卡上的“添加 PCIe 插槽”可使其从下次启动起获得可用插槽。" -#: instances/views.py:2342 instances/views.py:2348 +#: instances/views.py:2351 instances/views.py:2357 msgid "The VM has it" msgstr "虚拟机已有此设备" -#: instances/views.py:2383 +#: instances/views.py:2392 #, python-format msgid "The host has no USB device %(device)s; reload the page" msgstr "主机没有 USB 设备 %(device)s;请重新加载页面" -#: instances/views.py:2404 +#: instances/views.py:2413 #, python-format msgid "The host has no PCI device %(device)s" msgstr "主机上没有 PCI 设备 %(device)s" -#: instances/views.py:2422 +#: instances/views.py:2431 #, python-format msgid "" "Removal of PCI device %(address)s requested: the guest has not let it go yet;" " it stays in the running VM until it does or the VM stops." msgstr "已请求移除 PCI 设备 %(address)s:客户机尚未释放它;在客户机释放或虚拟机停止之前,它仍保留在运行中的虚拟机中。" -#: instances/views.py:2467 instances/views.py:2497 +#: instances/views.py:2476 instances/views.py:2506 msgid "Select a network interface and a QoS direction" msgstr "请选择网络接口和 QoS 方向" -#: instances/views.py:2470 vrtManager/network.py:470 +#: instances/views.py:2479 vrtManager/network.py:470 msgid "QoS rates must be whole numbers" msgstr "QoS 速率必须为整数" -#: instances/views.py:2477 networks/views.py:235 +#: instances/views.py:2486 networks/views.py:235 #, python-format msgid "%(qos_dir)s QoS is set" msgstr "%(qos_dir)s QoS 已设置" -#: instances/views.py:2482 +#: instances/views.py:2491 #, python-format msgid "" "%(qos_dir)s QoS is set. A running VM gets it after it is powered off and on." msgstr "%(qos_dir)s QoS 已设置。运行中的虚拟机需关机再开机后才能生效。" -#: instances/views.py:2504 networks/views.py:261 +#: instances/views.py:2513 networks/views.py:261 #, python-format msgid "%(qos_dir)s QoS is deleted" msgstr "%(qos_dir)s QoS 已删除" -#: instances/views.py:2509 +#: instances/views.py:2518 #, python-format msgid "" "%(qos_dir)s QoS is deleted. A running VM keeps the old limit until it is " "powered off and on." msgstr "%(qos_dir)s QoS 已删除。运行中的虚拟机在关机再开机之前保留旧的限制。" -#: instances/views.py:2537 +#: instances/views.py:2546 msgid "Only one owner is allowed and the one already added" msgstr "只允许一个所有者,且已添加" -#: instances/views.py:2539 +#: instances/views.py:2548 #, python-format msgid "%(user)s is already an owner" msgstr "%(user)s 已是所有者" -#: instances/views.py:2604 +#: instances/views.py:2613 #, python-format msgid "Console settings were not saved: %(errors)s" msgstr "控制台设置未保存:%(errors)s" -#: instances/views.py:2626 +#: instances/views.py:2635 msgid "" "Error setting console password. You should check that your instance have an " "graphic device." msgstr "设置控制台密码出错。请检查虚拟机是否有图形设备。" -#: instances/views.py:2673 +#: instances/views.py:2682 msgid "Shut the VM down to change whether it is a template." msgstr "请关闭虚拟机以更改其是否为模板。" -#: instances/views.py:2679 +#: instances/views.py:2688 #, python-format msgid "%(quota)s: '%(instance_name)s' stays a template." msgstr "%(quota)s:“%(instance_name)s”仍为模板。" -#: instances/views.py:2701 +#: instances/views.py:2710 msgid "An I/O limit is whole numbers of IOPS and MiB/s, 0 for none" msgstr "I/O 限制须为 IOPS 和 MiB/s 的整数,0 表示不限" -#: instances/views.py:2815 +#: instances/views.py:2824 msgid "The XML has no name" msgstr "XML 中没有名称" -#: instances/views.py:2833 webvirtcloud/middleware.py:157 +#: instances/views.py:2842 webvirtcloud/middleware.py:157 #, python-format msgid "libvirt Error - %(exception)s" msgstr "libvirt 错误 - %(exception)s" -#: instances/views.py:2847 +#: instances/views.py:2856 msgid "An empty disk of the size you set" msgstr "按设定大小创建的空磁盘" -#: instances/views.py:2848 +#: instances/views.py:2857 msgid "Volumes already in a pool" msgstr "存储池中已有的卷" -#: instances/views.py:2849 +#: instances/views.py:2858 msgid "A copy of a template volume" msgstr "模板卷的副本" -#: instances/views.py:2939 +#: instances/views.py:2948 msgid "" "This host has no running storage pool for the VM's disks: add or start one on" " its Storage page." msgstr "此主机没有可用于虚拟机磁盘的运行中存储池:请在其“存储”页面添加或启动一个。" -#: instances/views.py:2941 +#: instances/views.py:2950 msgid "This host has no network for the VM: add one on its Networks page." msgstr "此主机没有可供虚拟机使用的网络:请在其“网络”页面添加一个。" -#: instances/views.py:2973 +#: instances/views.py:2982 #, python-format msgid "The machine type is q35, not %(machine)s: UEFI Secure Boot needs it" msgstr "机器类型为 q35,而不是 %(machine)s:UEFI 安全启动需要它" -#: instances/views.py:3002 +#: instances/views.py:3011 msgid "Flavor Created" msgstr "规格已创建" -#: instances/views.py:3010 +#: instances/views.py:3019 msgid "Create Flavor" msgstr "创建规格" -#: instances/views.py:3022 +#: instances/views.py:3031 msgid "Flavor Deleted" msgstr "规格已删除" -#: instances/views.py:3028 +#: instances/views.py:3037 msgid "Only the size template goes; VMs made from it keep their size." msgstr "仅删除此规格;由它创建的虚拟机保持其大小。" @@ -8906,8 +8906,8 @@ msgstr "恢复在一小时内无法读取任务状态;请检查虚拟机,然 msgid "The worker stopped before the job changed anything" msgstr "工作进程在任务做出任何更改之前停止" -#: storages/api/viewsets.py:145 storages/api/viewsets.py:161 -#: storages/api/viewsets.py:197 storages/api/viewsets.py:220 +#: storages/api/viewsets.py:148 storages/api/viewsets.py:164 +#: storages/api/viewsets.py:200 storages/api/viewsets.py:223 msgid "Pool is not active" msgstr "存储池未激活" @@ -8987,110 +8987,114 @@ msgstr "镜像名称不能超过 120 个字符" msgid "Clone volume" msgstr "克隆卷" -#: storages/jobs.py:66 storages/jobs.py:79 +#: storages/jobs.py:66 storages/jobs.py:83 msgid "Name of volume already in use" msgstr "卷名已被使用" -#: storages/jobs.py:73 +#: storages/jobs.py:70 +msgid "The volume changed since the copy was asked; ask it again" +msgstr "请求复制后卷已发生变化;请重新请求" + +#: storages/jobs.py:77 #, python-format msgid "The pool has no volume named %(name)s" msgstr "存储池中没有名为 %(name)s 的卷" -#: storages/jobs.py:75 +#: storages/jobs.py:79 msgid "An ISO image is not cloned" msgstr "ISO 镜像不会被克隆" -#: storages/jobs.py:88 +#: storages/jobs.py:94 msgid "Copying the volume" msgstr "正在复制卷" -#: storages/jobs.py:100 +#: storages/jobs.py:106 msgid "" "The copy exists, but the job did not see it finish; check it, then resolve " "this job." msgstr "副本已存在,但任务未看到其完成;请检查后处理此任务。" -#: storages/jobs.py:101 +#: storages/jobs.py:107 msgid "The copy was not made" msgstr "未创建副本" -#: storages/jobs.py:112 +#: storages/jobs.py:118 msgid "Upload ISO image" msgstr "上传 ISO 镜像" -#: storages/jobs.py:127 +#: storages/jobs.py:133 msgid "Invalid file name" msgstr "文件名无效" -#: storages/jobs.py:129 +#: storages/jobs.py:135 msgid "Only .iso files can be uploaded" msgstr "只能上传 .iso 文件" -#: storages/jobs.py:131 +#: storages/jobs.py:137 msgid "Invalid file size" msgstr "文件大小无效" -#: storages/jobs.py:133 +#: storages/jobs.py:139 msgid "Invalid chunk index or total chunks" msgstr "分块索引或分块总数无效" -#: storages/jobs.py:164 +#: storages/jobs.py:169 msgid "Give an http or https address" msgstr "请提供 http 或 https 地址" -#: storages/jobs.py:186 +#: storages/jobs.py:191 #, python-format msgid "The file could not be downloaded: %(error)s" msgstr "无法下载文件:%(error)s" -#: storages/jobs.py:213 +#: storages/jobs.py:218 #, python-format msgid "The server answered %(status)s, not the whole file" msgstr "服务器返回了 %(status)s,而不是完整文件" -#: storages/jobs.py:216 +#: storages/jobs.py:221 #, python-format msgid "The address is redirected more than %(count)s times" msgstr "该地址重定向超过 %(count)s 次" -#: storages/jobs.py:226 +#: storages/jobs.py:231 msgid "Download volume" msgstr "下载卷" -#: storages/jobs.py:241 +#: storages/jobs.py:246 msgid "A volume's name is letters, digits, '.', '_' and '-'" msgstr "卷名只能包含字母、数字、'.'、'_' 和 '-'" -#: storages/jobs.py:246 +#: storages/jobs.py:251 msgid "Files are downloaded into a pool of files (dir, fs, netfs)" msgstr "文件只能下载到文件型存储池(dir、fs、netfs)" -#: storages/jobs.py:250 +#: storages/jobs.py:255 storages/jobs.py:270 #, python-format msgid "The pool has a volume named %(name)s" msgstr "存储池中已有名为 %(name)s 的卷" -#: storages/jobs.py:272 +#: storages/jobs.py:285 msgid "The server does not tell the file's size" msgstr "服务器未告知文件大小" -#: storages/jobs.py:275 +#: storages/jobs.py:288 msgid "The file is larger than the pool's free space" msgstr "文件大于存储池的可用空间" -#: storages/jobs.py:285 +#: storages/jobs.py:303 msgid "The server sent more than the file's size" msgstr "服务器发送的数据超过了文件大小" -#: storages/jobs.py:298 +#: storages/jobs.py:314 msgid "The download ended early" msgstr "下载提前结束" -#: storages/jobs.py:304 +#: storages/jobs.py:320 msgid "The download stopped and its volume was not deleted" msgstr "下载已停止,但其卷未被删除" -#: storages/jobs.py:321 +#: storages/jobs.py:337 msgid "The download stopped; what it wrote was deleted" msgstr "下载已停止;已写入的内容已删除" @@ -9578,12 +9582,12 @@ msgstr "上传会话繁忙,请重试。" msgid "ISO image already exists" msgstr "ISO 镜像已存在" -#: storages/views.py:188 +#: storages/views.py:190 #, python-format msgid "Volume: %(vol)s is deleted." msgstr "卷 %(vol)s 已删除。" -#: storages/views.py:205 +#: storages/views.py:207 #, python-format msgid "Image file %(name)s is created successfully" msgstr "镜像文件 %(name)s 创建成功" @@ -10202,159 +10206,159 @@ msgstr "恢复备份" msgid "%(quota)s: cannot restore %(name)s" msgstr "%(quota)s:无法恢复 %(name)s" -#: vmbackups/jobs.py:1008 vmbackups/jobs.py:1230 vmbackups/jobs.py:1422 +#: vmbackups/jobs.py:1008 vmbackups/jobs.py:1231 vmbackups/jobs.py:1424 msgid "Only a ready backup is restored" msgstr "只能恢复就绪的备份" -#: vmbackups/jobs.py:1045 +#: vmbackups/jobs.py:1046 #, python-format msgid "A VM named %(name)s exists on %(compute)s" msgstr "%(compute)s 上已存在名为 %(name)s 的虚拟机" -#: vmbackups/jobs.py:1053 vmbackups/jobs.py:1274 vmbackups/jobs.py:1452 +#: vmbackups/jobs.py:1054 vmbackups/jobs.py:1276 vmbackups/jobs.py:1455 #, python-format msgid "This host has no active directory storage pool %(pool)s" msgstr "此主机没有名为 %(pool)s 的活动目录存储池" -#: vmbackups/jobs.py:1071 +#: vmbackups/jobs.py:1072 #, python-format msgid "The NVRAM file %(path)s exists already" msgstr "NVRAM 文件 %(path)s 已存在" -#: vmbackups/jobs.py:1111 vmbackups/jobs.py:1137 +#: vmbackups/jobs.py:1112 vmbackups/jobs.py:1138 #, python-format msgid "The VM was restored; it did not start: %(error)s" msgstr "虚拟机已恢复;但未能启动:%(error)s" -#: vmbackups/jobs.py:1141 vmbackups/jobs.py:1381 +#: vmbackups/jobs.py:1142 vmbackups/jobs.py:1383 #, 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:1146 vmbackups/jobs.py:1387 +#: vmbackups/jobs.py:1147 vmbackups/jobs.py:1389 #, 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:1160 +#: vmbackups/jobs.py:1161 msgid "The VM was not defined; its copies were removed" msgstr "虚拟机未定义;其副本已删除" -#: vmbackups/jobs.py:1173 +#: vmbackups/jobs.py:1174 msgid "Shut the VM down to restore a backup over it" msgstr "请先将虚拟机关机,再将备份恢复到其上" -#: vmbackups/jobs.py:1176 +#: vmbackups/jobs.py:1177 msgid "The VM has snapshots; delete them to restore a backup over it" msgstr "虚拟机有快照;请删除它们后再将备份恢复到其上" -#: vmbackups/jobs.py:1181 +#: vmbackups/jobs.py:1182 #, 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:1185 +#: vmbackups/jobs.py:1186 #, 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:1188 +#: vmbackups/jobs.py:1189 msgid "The VM's UEFI firmware changed since the backup; restore it as a new VM" msgstr "备份之后虚拟机的 UEFI 固件已更改;请恢复为新虚拟机" -#: vmbackups/jobs.py:1190 +#: vmbackups/jobs.py:1191 msgid "The VM's TPM changed since the backup; restore it as a new VM" msgstr "备份之后虚拟机的 TPM 已更改;请恢复为新虚拟机" -#: vmbackups/jobs.py:1221 +#: vmbackups/jobs.py:1222 msgid "Restore backup over the VM" msgstr "将备份恢复到虚拟机上" -#: vmbackups/jobs.py:1234 +#: vmbackups/jobs.py:1235 msgid "The backup's VM is no longer in the panel; restore it as a new VM" msgstr "备份的虚拟机已不在面板中;请恢复为新虚拟机" -#: vmbackups/jobs.py:1264 +#: vmbackups/jobs.py:1266 msgid "The VM's disks changed after the job was queued" msgstr "任务排队后虚拟机的磁盘已更改" -#: vmbackups/jobs.py:1298 +#: vmbackups/jobs.py:1300 msgid "The VM changed while its backup was copied; it keeps its disks" msgstr "复制备份期间虚拟机发生了变化;虚拟机保留其磁盘" -#: vmbackups/jobs.py:1301 +#: vmbackups/jobs.py:1303 msgid "Replacing the VM's disks" msgstr "正在替换虚拟机的磁盘" -#: vmbackups/jobs.py:1361 +#: vmbackups/jobs.py:1363 msgid "" "The VM moved to another compute; check its disks and the restore's copies, " "then resolve this job" msgstr "虚拟机已迁移到另一台计算节点;请检查其磁盘和恢复的副本,然后处理此任务" -#: vmbackups/jobs.py:1374 +#: vmbackups/jobs.py:1376 msgid "" "The VM was started while its disks were being replaced; check its disks, then" " resolve this job" msgstr "替换磁盘期间虚拟机被启动;请检查其磁盘,然后处理此任务" -#: vmbackups/jobs.py:1392 +#: vmbackups/jobs.py:1394 msgid "The VM keeps its disks; the restore's copies were removed" msgstr "虚拟机保留其磁盘;恢复的副本已删除" -#: vmbackups/jobs.py:1404 +#: vmbackups/jobs.py:1406 msgid "Restore a disk of a backup" msgstr "恢复备份的一个磁盘" -#: vmbackups/jobs.py:1415 +#: vmbackups/jobs.py:1417 #, python-format msgid "The backup has no disk %(dev)s" msgstr "备份中没有磁盘 %(dev)s" -#: vmbackups/jobs.py:1425 +#: vmbackups/jobs.py:1427 #, python-format msgid "%(name)s is not a volume name" msgstr "%(name)s 不是有效的卷名" -#: vmbackups/jobs.py:1484 +#: vmbackups/jobs.py:1487 #, 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:1487 +#: vmbackups/jobs.py:1490 msgid "The disk was not restored" msgstr "磁盘未恢复" -#: vmbackups/jobs.py:1508 vmbackups/templates/vmbackups/target.html:23 +#: vmbackups/jobs.py:1511 vmbackups/templates/vmbackups/target.html:23 msgid "Read backups from target" msgstr "从目标读取备份" -#: vmbackups/jobs.py:1577 +#: vmbackups/jobs.py:1580 #, python-format msgid "" "Not read, as a file of the backup is missing, changed or unreadable: " "%(names)s" msgstr "由于备份的某个文件缺失、已更改或无法读取,未读取:%(names)s" -#: vmbackups/jobs.py:1593 +#: vmbackups/jobs.py:1596 msgid "Check backup target" msgstr "检查备份目标" -#: vmbackups/jobs.py:1630 +#: vmbackups/jobs.py:1633 #, python-format msgid "Backups missing from %(target)s" msgstr "%(target)s 中缺少备份" -#: vmbackups/jobs.py:1631 vmbackups/jobs.py:1633 +#: vmbackups/jobs.py:1634 vmbackups/jobs.py:1636 #, python-format msgid "Files of these backups are missing from the target: %(backups)s" msgstr "以下备份的文件在目标中缺失:%(backups)s" @@ -10821,26 +10825,26 @@ msgstr "计划:" msgid "No backup of this VM yet." msgstr "此虚拟机还没有备份。" -#: vmbackups/utils.py:36 +#: vmbackups/utils.py:38 #, python-format msgid "" "Volume %(volume)s belongs to a backup of %(vm)s; delete the backup on the " "Backups page" msgstr "卷 %(volume)s 属于 %(vm)s 的备份;请在备份页面删除该备份" -#: vmbackups/utils.py:46 +#: vmbackups/utils.py:48 #, python-format msgid "" "Storage pool %(pool)s is backup target %(target)s; remove it from the target " "first" msgstr "存储池 %(pool)s 是备份目标 %(target)s;请先将其从目标中移除" -#: vmbackups/utils.py:73 +#: vmbackups/utils.py:85 msgid "" "No backup target open to VM owners has a storage pool on this VM's host." msgstr "没有向虚拟机所有者开放的备份目标在此虚拟机的主机上有存储池。" -#: vmbackups/utils.py:74 +#: vmbackups/utils.py:86 msgid "No backup target has a storage pool on this VM's host." msgstr "没有备份目标在此虚拟机的主机上有存储池。" diff --git a/static/js/bulk_power.js b/static/js/bulk_power.js index c8450b86..96ec9b89 100644 --- a/static/js/bulk_power.js +++ b/static/js/bulk_power.js @@ -64,8 +64,11 @@ update(); })(); -// whether VMs on screen are chosen: the list's reload (poll.js pageInUse) waits meanwhile +// whether VMs on screen are chosen, or a snapshot name or tag typed: the list's reload +// (poll.js pageInUse) waits meanwhile function bulkPowerChosen() { return Array.prototype.some.call(document.querySelectorAll("input[name='vm'][form='bulk-power']:checked"), - function (box) { return box.getClientRects().length > 0; }); + function (box) { return box.getClientRects().length > 0; }) + || Array.prototype.some.call(document.querySelectorAll("#bulk-power input[type='text']"), + function (box) { return box.value.trim() !== ""; }); } diff --git a/static/js/poll.js b/static/js/poll.js index b3242d3b..43391837 100644 --- a/static/js/poll.js +++ b/static/js/poll.js @@ -57,5 +57,5 @@ function pageInUse() { return !!document.querySelector(".modal.show") || !!(active && active.matches && active.matches("input, select, textarea")) || !!(window.xmlEditUnsaved && window.xmlEditUnsaved()) - || (typeof bulkPowerChosen === "function" && bulkPowerChosen()); // VMs chosen on the VM list (bulk_power.js) + || (typeof bulkPowerChosen === "function" && bulkPowerChosen()); // the VM list's bulk form in use (bulk_power.js) } diff --git a/storages/api/viewsets.py b/storages/api/viewsets.py index d4f5b005..cbe00740 100644 --- a/storages/api/viewsets.py +++ b/storages/api/viewsets.py @@ -10,10 +10,11 @@ from django.utils.translation import gettext as _ from drf_spectacular.utils import extend_schema, inline_serializer from libvirt import libvirtError from logs.audit import audit, failed +from operations import claims from rest_framework import serializers, status, viewsets from rest_framework.decorators import action from rest_framework.response import Response -from vmbackups.utils import refuse_backup_volume +from vmbackups.utils import pool_stop_claims, refuse_backup_volume from vrtManager.storage import wvmStorage, wvmStorages from webvirtcloud.serializers import ErrorSerializer, StatusSerializer @@ -93,7 +94,9 @@ class StorageViewSet(viewsets.ViewSet): conn = wvmStorage( compute.hostname, compute.login, compute.password, compute.type, pk ) - with audit(request, compute, f"Storage pool {pk}", "stop"): + # not while a job (a download, a copy) works in it + with claims.hold(pool_stop_claims(compute, pk)), \ + audit(request, compute, f"Storage pool {pk}", "stop"): ret = conn.stop() return Response({"status": "Pool stop command send: " + str(ret)}) diff --git a/storages/jobs.py b/storages/jobs.py index 5e7e1de2..2c4ed1f4 100644 --- a/storages/jobs.py +++ b/storages/jobs.py @@ -64,6 +64,10 @@ class CloneVolume(Kind): stg = _storage(op.params)[1] if op.intent["target"] in stg.get_volumes(): raise util.OperationError(gettext_noop("Name of volume already in use")) + # the source's format, which names the copy, may have changed before its claim was taken (a download ended) + if stg.clone_name(op.params["name"], op.params["format"] or stg.get_volume_format_type(op.params["image"])) \ + != op.intent["target"]: + raise util.OperationError(gettext_noop("The volume changed since the copy was asked; ask it again")) stg.refuse_running_copy(op.params["image"]) # the VM may have started since def plan(self, user, params): @@ -78,7 +82,9 @@ class CloneVolume(Kind): if target in volumes: raise util.OperationError(gettext_noop("Name of volume already in use")) pool = claims.pool_key(compute.pk, params["pool"]) + # the source shared: not copied while a download writes it return Plan(claims={claims.compute_key(compute.pk): Claim.SHARED, pool: Claim.SHARED, + claims.volume_key(compute.pk, params["pool"], params["image"]): Claim.SHARED, claims.volume_key(compute.pk, params["pool"], target): Claim.EXCLUSIVE}, resource=pool, label=f"{compute.name}/{params['pool']}", intent={"target": target}) @@ -158,7 +164,6 @@ class UploadVolume(Kind): # a volume's name as the pool page's forms take it VOLUME_NAME = re.compile(r"[A-Za-z0-9._-]{1,120}") -FETCH_PROGRESS_EVERY = 16 * 2**20 # bytes between two progress records FETCH_REDIRECTS = 5 FETCH_TIMEOUT = urllib3.Timeout(connect=10, read=60) BAD_ADDRESS = gettext_noop("Give an http or https address") @@ -257,6 +262,12 @@ class FetchVolume(Kind): if op.user is None or not op.user.is_active: raise PermissionDenied self.validate(op.user, op.params) + # a volume made outside the panel since the job was queued may have taken the name + stg = _storage(op.params)[1] + with contextlib.suppress(libvirtError): + stg.refresh() + if op.params["name"] in stg.get_volumes(): + raise util.OperationError(gettext_noop("The pool has a volume named %(name)s"), name=op.params["name"]) @staticmethod def _stop_if_cancelled(op): @@ -284,18 +295,16 @@ class FetchVolume(Kind): raise def chunks(): - done, recorded, checked = 0, 0, time.monotonic() + done, checked = 0, time.monotonic() try: for data in answer.stream(2**20, decode_content=False): done += len(data) if done > size: raise util.OperationError(gettext_noop("The server sent more than the file's size")) - if time.monotonic() - checked >= 1: + if time.monotonic() - checked >= 1: # each second: a cancel seen, the progress shown self._stop_if_cancelled(op) - checked = time.monotonic() - if done - recorded >= FETCH_PROGRESS_EVERY: ctx.record_intent(done=done) - recorded = done + checked = time.monotonic() yield data except urllib3.exceptions.HTTPError as err: # the connection lost, a read timeout raise _download_error(err) from None diff --git a/storages/tests/test_pool_in_use.py b/storages/tests/test_pool_in_use.py index f0a04c2a..fd59d210 100644 --- a/storages/tests/test_pool_in_use.py +++ b/storages/tests/test_pool_in_use.py @@ -14,6 +14,8 @@ from django.contrib.auth import get_user_model from django.contrib.messages import get_messages from django.test import TestCase from django.urls import reverse +from operations.claims import admit +from operations.models import Claim from rest_framework.test import APIClient NODE = "use-pool/use-pool" @@ -65,6 +67,28 @@ class PoolInUseTests(TestCase): self.assertIn("running VMs api-user", response.json()["detail"]) self.assertTrue(self.pool.isActive()) + def test_a_pool_a_job_works_in_is_not_stopped_or_deleted(self): + # a download or a copy in it: its file would be left half-written, its cleanup could not see it + admit({f"pool:{self.compute.id}:use-pool": Claim.SHARED}, holder="other-node:1:1") + for action in ("stop", "delete"): + with self.subTest(action=action): + self.assertIn("A short operation is in progress on this resource; try again in a moment.", self.post(action)) + self.assertTrue(self.pool.isActive()) + api = APIClient() + api.force_login(self.admin) + response = api.post(reverse("compute-storage-stop", kwargs={"compute_pk": self.compute.id, "pk": "use-pool"})) + self.assertEqual(response.status_code, 409) + self.assertTrue(self.pool.isActive()) + + def test_a_backup_target_pool_is_not_stopped_during_a_backup(self): + from vmbackups.models import BackupTarget, BackupTargetPool + + target = BackupTarget.objects.create(name="nfs-b") + BackupTargetPool.objects.create(target=target, compute=self.compute, pool="use-pool", pool_uuid="u1") + admit({f"backup_target:{target.pk}": Claim.EXCLUSIVE}, holder="other-node:1:1") # a backup writes to it + self.assertIn("A short operation is in progress on this resource; try again in a moment.", self.post("stop")) + self.assertTrue(self.pool.isActive()) + def test_a_pool_a_vm_definition_names_is_not_deleted(self): self.conn.defineXML(domain("by-name", "type='volume'>")) self.conn.defineXML(domain("by-path", f"type='file'>")) diff --git a/storages/tests/test_volume_clone_job.py b/storages/tests/test_volume_clone_job.py index 64fd286b..bdc1170f 100644 --- a/storages/tests/test_volume_clone_job.py +++ b/storages/tests/test_volume_clone_job.py @@ -10,6 +10,7 @@ from django.urls import reverse from computes.models import Compute from operations.jobs import Context +from operations.claims import admit from operations.models import Claim, Operation, acquire from libvirt import libvirtError from storages.jobs import CloneVolume @@ -39,8 +40,9 @@ class VolumeCloneJobTestCase(TransactionTestCase): self.assertRedirects(response, url, fetch_redirect_response=False) op = Operation.objects.get() self.assertEqual((op.kind, op.intent["target"]), ("volume.clone", "copy.qcow2")) - self.assertIn((f"volume:{self.compute.pk}:pool-a/copy.qcow2", "exclusive"), - set(Claim.objects.values_list("resource", "mode"))) + self.assertLessEqual({(f"volume:{self.compute.pk}:pool-a/copy.qcow2", "exclusive"), + (f"volume:{self.compute.pk}:pool-a/base.qcow2", "shared")}, + set(Claim.objects.values_list("resource", "mode"))) self.stg.clone_volume.assert_not_called() acquire("wvc-test:1:a", "wvc-test") @@ -74,6 +76,18 @@ class VolumeCloneJobTestCase(TransactionTestCase): self.assertContains(response, "The running VMs vm use volume base.qcow2") self.assertFalse(Operation.objects.exists()) + @patch("storages.views.wvmStorage") + def test_a_volume_a_job_writes_is_not_copied(self, page): + # a download holds the volume it writes: the copy waits for it, not a half-written file + page.return_value.is_active.return_value = False + page.return_value.get_size.return_value = (1, 1) + url = reverse("storage", args=[self.compute.pk, "pool-a"]) + admit({f"volume:{self.compute.pk}:pool-a/base.qcow2": Claim.EXCLUSIVE}, holder="other-node:1:1") + response = self.client.post(url, {"cln_volume": "1", "image": "base.qcow2", "name": "copy", + "submission_key": "key-vol00005"}, follow=True) + self.assertContains(response, "try again in a moment") + self.assertFalse(Operation.objects.exists()) + def test_recovery(self): self.stg.get_volumes.return_value = ["base.qcow2", "copy.qcow2"] op = Operation(params={"compute": self.compute.pk, "pool": "pool-a"}, intent={"target": "copy.qcow2"}) @@ -89,6 +103,10 @@ class VolumeCloneJobTestCase(TransactionTestCase): params={"compute": self.compute.pk, "pool": "pool-a", "image": "base.qcow2", "name": "copy", "format": "", "prealloc": False}) CloneVolume().precheck(op, None) + self.stg.clone_name.return_value = "copy.img" # the source's format changed before the claim (a download ended) + with self.assertRaisesMessage(libvirtError, "The volume changed since the copy was asked"): + CloneVolume().precheck(op, None) + self.stg.clone_name.return_value = "copy.qcow2" self.stg.get_volumes.return_value = ["base.qcow2", "copy.qcow2"] # made outside the panel meanwhile with self.assertRaisesMessage(libvirtError, "Name of volume already in use"): CloneVolume().precheck(op, None) diff --git a/storages/tests/test_volume_fetch_job.py b/storages/tests/test_volume_fetch_job.py index 7b53247e..0253be91 100644 --- a/storages/tests/test_volume_fetch_job.py +++ b/storages/tests/test_volume_fetch_job.py @@ -139,6 +139,12 @@ class FetchJobTestCase(TransactionTestCase): self.run_job(op, [b"ab"]) self.assertEqual(recorded, [True]) + def test_the_worker_checks_the_name_is_still_free(self): + op = self.queue() + self.stg.get_volumes.return_value = ["rocky-10.qcow2"] # made outside the panel meanwhile + with self.assertRaisesRegex(util.OperationError, "has a volume named"): + FetchVolume().precheck(op, None) + def test_a_deactivated_superuser_s_job_does_not_run(self): op = self.queue() op.user.is_active = False @@ -147,6 +153,22 @@ class FetchJobTestCase(TransactionTestCase): with self.assertRaises(PermissionDenied): FetchVolume().precheck(op, None) + def test_the_progress_is_recorded_each_second(self): + # a slow server: the bar moves before 16 MiB came + op = self.queue() + seen = [] + + def write(name, size, chunks): + for _chunk in chunks: + seen.append(Operation.objects.get(pk=op.pk).intent["done"]) + return size + + self.stg.write_volume.side_effect = write + clock = iter(range(0, 100, 2)) + with patch("storages.jobs.time.monotonic", side_effect=lambda: next(clock)): + self.run_job(op, [b"ab", b"cd", b"ef"]) + self.assertEqual(seen, [2, 4, 6]) + def test_more_than_the_size_told_is_not_written(self): op = self.queue() self.stg.write_volume.side_effect = lambda name, size, chunks: sum(len(c) for c in chunks) diff --git a/storages/views.py b/storages/views.py index 98a879c1..6b4991e3 100644 --- a/storages/views.py +++ b/storages/views.py @@ -24,7 +24,7 @@ from vrtManager.storage import wvmStorage, wvmStorages from storages.forms import AddStgPool, CloneImage, CreateVolumeForm from storages.jobs import is_iso from storages.upload import write_chunk -from vmbackups.utils import backups_of, refuse_backup_volume, refuse_target_pool +from vmbackups.utils import backups_of, pool_stop_claims, refuse_backup_volume, refuse_target_pool from webvirtcloud.gunicorn_worker import request_progressed @@ -146,16 +146,18 @@ def storage(request, compute_id, pool): with audit(request, compute, subject, "start"): conn.start() return HttpResponseRedirect(request.get_full_path()) + # stopped or deleted only while no job (a download, a copy) works in it + in_pool = pool_stop_claims(compute, pool) if "stop" in request.POST: try: - with audit(request, compute, subject, "stop"): + with claims.hold(in_pool), audit(request, compute, subject, "stop"): conn.stop() except OperationError as err: # a running VM's disk is in it messages.error(request, str(err)) return HttpResponseRedirect(request.get_full_path()) if "delete" in request.POST: try: - with audit(request, compute, subject, "delete"): + with claims.hold(in_pool), audit(request, compute, subject, "delete"): refuse_target_pool(compute, pool) conn.delete() except OperationError as err: # a VM names it for a disk diff --git a/vmbackups/jobs.py b/vmbackups/jobs.py index d69ea7f3..316f9c5c 100644 --- a/vmbackups/jobs.py +++ b/vmbackups/jobs.py @@ -1016,6 +1016,7 @@ class RestoreBackup(Kind): keys = vm_claims(compute, params["name"]) for name in volumes.values(): # no other job makes a volume of these names meanwhile keys[claims.volume_key(compute.pk, params["pool"], name)] = Claim.EXCLUSIVE + keys[claims.pool_key(compute.pk, params["pool"])] = Claim.SHARED # not stopped under it keys[claims.backup_key(backup.uuid)] = Claim.SHARED keys[claims.backup_target_key(backup.target_id)] = Claim.EXCLUSIVE if quota: # a VM owner's: no other increase of their quota is admitted until the VM is recorded @@ -1242,6 +1243,7 @@ class RestoreOver(Kind): claims.backup_key(backup.uuid): Claim.SHARED, claims.backup_target_key(backup.target_id): Claim.EXCLUSIVE} for dev, name in names.items(): # no other job makes a volume of these names meanwhile keys[claims.volume_key(instance.compute_id, over["disks"][dev], name)] = Claim.EXCLUSIVE + keys[claims.pool_key(instance.compute_id, over["disks"][dev])] = Claim.SHARED # not stopped under it return Plan( claims=keys, resource=claims.instance_key(instance.uuid), @@ -1428,6 +1430,7 @@ class RestoreDisk(Kind): return Plan( claims={claims.compute_key(compute.pk): Claim.SHARED, claims.volume_key(compute.pk, params["pool"], params["name"]): Claim.EXCLUSIVE, + claims.pool_key(compute.pk, params["pool"]): Claim.SHARED, # not stopped under it claims.backup_key(backup.uuid): Claim.SHARED, claims.backup_target_key(backup.target_id): Claim.EXCLUSIVE}, resource=claims.backup_key(backup.uuid), diff --git a/vmbackups/tests/test_restore.py b/vmbackups/tests/test_restore.py index 42c8f8cf..b94f081a 100644 --- a/vmbackups/tests/test_restore.py +++ b/vmbackups/tests/test_restore.py @@ -196,6 +196,8 @@ class RestoreTests(TransactionTestCase): self.assertEqual(op.intent["volumes"], {"vda": "vm1-restored-vda.qcow2"}) self.assertTrue(Claim.objects.filter(operation=op, resource=f"volume:{self.compute.pk}:default/vm1-restored-vda.qcow2", mode=Claim.EXCLUSIVE).exists()) + # the pool written into, shared: not stopped under the restore + self.assertTrue(Claim.objects.filter(operation=op, resource=f"pool:{self.compute.pk}:default", mode=Claim.SHARED).exists()) def test_a_copy_in_flight_is_not_removed(self): # its name may have been taken meanwhile by another volume: the job is left to the administrator diff --git a/vmbackups/tests/test_restore_disk.py b/vmbackups/tests/test_restore_disk.py index b7d98d86..c305e70d 100644 --- a/vmbackups/tests/test_restore_disk.py +++ b/vmbackups/tests/test_restore_disk.py @@ -82,6 +82,8 @@ class RestoreDiskTests(TransactionTestCase): op = self.submit() self.assertTrue(Claim.objects.filter(operation=op, resource=f"volume:{self.compute.pk}:default/vm1-vdb-restored.raw", mode=Claim.EXCLUSIVE).exists()) + # the pool written into, shared: not stopped under the restore + self.assertTrue(Claim.objects.filter(operation=op, resource=f"pool:{self.compute.pk}:default", mode=Claim.SHARED).exists()) self.assertEqual(self.run_job(op), {"open": reverse("storage", args=[self.compute.pk, "default"])}) vol, name = self.storage.clone_volume.call_args.args self.assertEqual((name, self.storage.clone_volume.call_args.kwargs["vol_fmt"]), ("vm1-vdb-restored.raw", "raw")) diff --git a/vmbackups/tests/test_restore_over.py b/vmbackups/tests/test_restore_over.py index 656a457a..9f1c9f01 100644 --- a/vmbackups/tests/test_restore_over.py +++ b/vmbackups/tests/test_restore_over.py @@ -151,6 +151,8 @@ class RestoreOverTests(TransactionTestCase): self.assertEqual((op.intent["over"]["disks"], op.intent["names"]), ({"vda": "default"}, {"vda": "vm1-vda-20261117-1140.qcow2"})) self.assertTrue(Claim.objects.filter(operation=op, resource=f"volume:{self.compute.pk}:default/vm1-vda-20261117-1140.qcow2", mode=Claim.EXCLUSIVE).exists()) + # the pool written into, shared: not stopped under the restore + self.assertTrue(Claim.objects.filter(operation=op, resource=f"pool:{self.compute.pk}:default", mode=Claim.SHARED).exists()) self.assertTrue(Claim.objects.filter(operation=op, resource=f"instance:{self.vm.uuid}", mode=Claim.EXCLUSIVE).exists()) self.run_job(op) self.storage.clone_volume.assert_called_once() diff --git a/vmbackups/utils.py b/vmbackups/utils.py index 944b2d93..323e195c 100644 --- a/vmbackups/utils.py +++ b/vmbackups/utils.py @@ -3,6 +3,8 @@ from django.utils.translation import gettext, gettext_noop from libvirt import libvirtError from lxml import etree +from operations import claims +from operations.models import Claim from storages.forms import inside from vrtManager.backup import wvmBackup from vrtManager.util import InUse @@ -49,6 +51,16 @@ def refuse_target_pool(compute, pool): ) +def pool_stop_claims(compute, pool): + """The claims that keep out a pool's jobs while it is stopped or deleted: the pool's, and its + backup target's if it is one (backup jobs claim the target).""" + keys = {claims.pool_key(compute.pk, pool): Claim.EXCLUSIVE} + row = BackupTargetPool.objects.filter(compute=compute, pool=pool).first() + if row: + keys[claims.backup_target_key(row.target_id)] = Claim.EXCLUSIVE + return keys + + def pending_deletes(): """The UUIDs of the backups a deletion job was asked for and has not finished: shown as being deleted before the job marks them."""