From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 49B2F1FF164 for ; Fri, 22 Nov 2024 13:16:46 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0439B11B57; Fri, 22 Nov 2024 13:16:55 +0100 (CET) From: Gabriel Goller To: pbs-devel@lists.proxmox.com Date: Fri, 22 Nov 2024 13:16:15 +0100 Message-Id: <20241122121617.185615-3-g.goller@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241122121617.185615-1-g.goller@proxmox.com> References: <20241122121617.185615-1-g.goller@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.038 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH proxmox-backup v6 2/4] fix #3786: api: add resync-corrupt option to sync jobs X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" VGhpcyBvcHRpb24gYWxsb3dzIHVzIHRvICJmaXgiIGNvcnJ1cHQgc25hcHNob3RzIChhbmQvb3Ig dGhlaXIgY2h1bmtzKQpieSBwdWxsaW5nIHRoZW0gZnJvbSBhbm90aGVyIHJlbW90ZS4gV2hlbiB0 cmF2ZXJzaW5nIHRoZ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wYnNfY29uZmlnOjpDYWNoZWRVc2VySW5mbzsKIHVzZSBwcm94bW94X3Jlc3Rfc2VydmVyOjpX b3JrZXJUYXNrOwpAQCAtODcsNiArODcsNyBAQCBpbXBsIFRyeUZyb208JlN5bmNKb2JDb25maWc+ IGZvciBQdWxsUGFyYW1ldGVycyB7CiAgICAgICAgICAgICBzeW5jX2pvYi5ncm91cF9maWx0ZXIu Y2xvbmUoKSwKICAgICAgICAgICAgIHN5bmNfam9iLmxpbWl0LmNsb25lKCksCiAgICAgICAgICAg ICBzeW5jX2pvYi50cmFuc2Zlcl9sYXN0LAorICAgICAgICAgICAgc3luY19qb2IucmVzeW5jX2Nv cnJ1cHQsCiAgICAgICAgICkKICAgICB9CiB9CkBAIC0xMzIsNiArMTMzLDEwIEBAIGltcGwgVHJ5 RnJvbTwmU3luY0pvYkNvbmZpZz4gZm9yIFB1bGxQYXJhbWV0ZXJzIHsKICAgICAgICAgICAgICAg ICBzY2hlbWE6IFRSQU5TRkVSX0xBU1RfU0NIRU1BLAogICAgICAgICAgICAgICAgIG9wdGlvbmFs OiB0cnVlLAogICAgICAgICAgICAgfSwKKyAgICAgICAgICAgICJyZXN5bmMtY29ycnVwdCI6IHsK KyAgICAgICAgICAgICAgICBzY2hlbWE6IFJFU1lOQ19DT1JSVVBUX1NDSEVNQSwKKyAgICAgICAg ICAgICAgICBvcHRpb25hbDogdHJ1ZSwKKyAgICAgICAgICAgIH0sCiAgICAgICAgIH0sCiAgICAg fSwKICAgICBhY2Nlc3M6IHsKQEAgLTE1Niw2ICsxNjEsNyBAQCBhc3luYyBmbiBwdWxsKAogICAg IGdyb3VwX2ZpbHRlcjogT3B0aW9uPFZlYzxHcm91cEZpbHRlcj4+LAogICAgIGxpbWl0OiBSYXRl TGltaXRDb25maWcsCiAgICAgdHJhbnNmZXJfbGFzdDogT3B0aW9uPHVzaXplPiwKKyAgICByZXN5 bmNfY29ycnVwdDogT3B0aW9uPGJvb2w+LAogICAgIHJwY2VudjogJm11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biBwdWxsX3Nu YXBzaG90PCdhPigKICAgICAgICAgbGV0IG11dCBwYXRoID0gc25hcHNob3QuZnVsbF9wYXRoKCk7 CiAgICAgICAgIHBhdGgucHVzaCgmaXRlbS5maWxlbmFtZSk7CiAKLSAgICAgICAgaWYgcGF0aC5l eGlzdHMoKSB7CisgICAgICAgIGlmICFjb3JydXB0ICYmIHBhdGguZXhpc3RzKCkgewogICAgICAg ICAgICAgbWF0Y2ggQXJjaGl2ZVR5cGU6OmZyb21fcGF0aCgmaXRlbS5maWxlbmFtZSk/IHsKICAg ICAgICAgICAgICAgICBBcmNoaXZlVHlwZTo6RHluYW1pY0luZGV4ID0+IHsKICAgICAgICAgICAg ICAgICAgICAgbGV0IGluZGV4ID0gRHluYW1pY0luZGV4UmVhZGVyOjpvcGVuKCZwYXRoKT87CkBA IC00NDMsNiArNDUwLDcgQEAgYXN5bmMgZm4gcHVsbF9zbmFwc2hvdF9mcm9tPCdhPigKICAgICBy ZWFkZXI6IEFyYzxkeW4gU3luY1NvdXJjZVJlYWRlciArICdhPiwKICAgICBzbmFwc2hvdDogJidh IHBic19kYXRhc3RvcmU6OkJhY2t1cERpciwKICAgICBkb3dubG9hZGVkX2NodW5rczogQXJjPE11 dGV4PEhhc2hTZXQ8W3U4OyAzMl0+Pj4sCisgICAgY29ycnVwdDogYm9vbCwKICkgLT4gUmVzdWx0 PFN5bmNTdGF0cywgRXJyb3I+IHsKICAgICBsZXQgKF9wYXRoLCBpc19uZXcsIF9zbmFwX2xvY2sp ID0gc25hcHNob3QKICAgICAgICAgLmRhdGFzdG9yZSgpCkBAIC00NTEsNyArNDU5LDggQEAgYXN5 bmMgZm4gcHVsbF9zbmFwc2hvdF9mcm9tPCdhPigKICAgICBsZXQgc3luY19zdGF0cyA9IGlmIGlz X25ldyB7CiAgICAgICAgIGluZm8hKCJzeW5jIHNuYXBzaG90IHt9Iiwgc25hcHNob3QuZGlyKCkp OwogCi0gICAgICAgIG1hdGNoIHB1bGxfc25hcHNob3QocmVhZGVyLCBzbmFwc2hvdCwgZG93bmxv YWRlZF9jaHVua3MpLmF3YWl0IHsKKyAgICAgICAgLy8gdGhpcyBzbmFwc2hvdCBpcyBuZXcsIHNv IGl0IGNhbiBuZXZlciBiZSBjb3JydXB0CisgICAgICAgIG1hdGNoIHB1bGxfc25hcHNob3QocmVh ZGVyLCBzbmFwc2hvdCwgZG93bmxvYWRlZF9jaHVua3MsIGZhbHNlKS5hd2FpdCB7CiAgICAgICAg ICAgICBFcnIoZXJyKSA9PiB7CiAgICAgICAgICAgICAgICAgaWYgbGV0IEVycihjbGVhbnVwX2Vy cikgPSBzbmFwc2hvdC5kYXRhc3RvcmUoKS5yZW1vdmVfYmFja3VwX2RpcigKICAgICAgICAgICAg ICAgICAgICAgc25hcHNob3QuYmFja3VwX25zKCksCkBAIC00NjgsOCArNDc3LDEyIEBAIGFzeW5j IGZuIHB1bGxfc25hcHNob3RfZnJvbTwnYT4oCiAgICAgICAgICAgICB9CiAgICAgICAgIH0KICAg ICB9IGVsc2UgewotICAgICAgICBpbmZvISgicmUtc3luYyBzbmFwc2hvdCB7fSIsIHNuYXBzaG90 LmRpcigpKTsKLSAgICAgICAgcHVsbF9zbmFwc2hvdChyZWFkZXIsIHNuYXBzaG90LCBkb3dubG9h ZGVkX2NodW5rcykuYXdhaXQ/CisgICAgICAgIGlmIGNvcnJ1cHQgeworICAgICAgICAgICAgaW5m byEoInJlLXN5bmMgc25hcHNob3Qge30gZHVlIHRvIGNvcnJ1cHRpb24iLCBzbmFwc2hvdC5kaXIo KSk7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICBpbmZvISgicmUtc3luYyBzbmFwc2hv dCB7fSIsIHNuYXBzaG90LmRpcigpKTsKKyAgICAgICAgfQorICAgICAgICBwdWxsX3NuYXBzaG90 KHJlYWRlciwgc25hcHNob3QsIGRvd25sb2FkZWRfY2h1bmtzLCBjb3JydXB0KS5hd2FpdD8KICAg ICB9OwogCiAgICAgT2soc3luY19zdGF0cykKQEAgLTUyMywyNiArNTM2LDUyIEBAIGFzeW5jIGZu IHB1bGxfZ3JvdXAoCiAgICAgICAgIC5sYXN0X3N1Y2Nlc3NmdWxfYmFja3VwKCZ0YXJnZXRfbnMs IGdyb3VwKT8KICAgICAgICAgLnVud3JhcF9vcihpNjQ6Ok1JTik7CiAKLSAgICBsZXQgbGlzdDog VmVjPEJhY2t1cERpcj4gPSByYXdfbGlzdAorICAgIC8vIEZpbHRlciByZW1vdGUgQmFja3VwRGly cyB0byBpbmNsdWRlIGluIHB1bGwKKyAgICAvLyBBbHNvIHN0b3JlcyBpZiB0aGUgc25hcHNob3Qg aXMgY29ycnVwdCAodmVyaWZpY2F0aW9uIGpvYiBmYWlsZWQpCisgICAgbGV0IGxpc3Q6IFZlYzwo QmFja3VwRGlyLCBib29sKT4gPSByYXdfbGlzdAogICAgICAgICAuaW50b19pdGVyKCkKICAgICAg ICAgLmVudW1lcmF0ZSgpCi0gICAgICAgIC5maWx0ZXIofCYocG9zLCByZWYgZGlyKXwgeworICAg ICAgICAuZmlsdGVyX21hcCh8KHBvcywgZGlyKXwgewogICAgICAgICAgICAgc291cmNlX3NuYXBz aG90cy5pbnNlcnQoZGlyLnRpbWUpOworICAgICAgICAgICAgLy8gSWYgcmVzeW5jX2NvcnJ1cHQg aXMgc2V0LCBjaGVjayBpZiB0aGUgY29ycmVzcG9uZGluZyBsb2NhbCBzbmFwc2hvdCBmYWlsZWQg dG8KKyAgICAgICAgICAgIC8vIHZlcmlmaWNhdGlvbgorICAgICAgICAgICAgaWYgcGFyYW1zLnJl c3luY19jb3JydXB0IHsKKyAgICAgICAgICAgICAgICBsZXQgbG9jYWxfZGlyID0gcGFyYW1zCisg ICAgICAgICAgICAgICAgICAgIC50YXJnZXQKKyAgICAgICAgICAgICAgICAgICAgLnN0b3JlCisg ICAgICAgICAgICAgICAgICAgIC5iYWNrdXBfZGlyKHRhcmdldF9ucy5jbG9uZSgpLCBkaXIuY2xv bmUoKSk7CisgICAgICAgICAgICAgICAgaWYgbGV0IE9rKGxvY2FsX2RpcikgPSBsb2NhbF9kaXIg eworICAgICAgICAgICAgICAgICAgICBtYXRjaCBsb2NhbF9kaXIudmVyaWZ5X3N0YXRlKCkgewor ICAgICAgICAgICAgICAgICAgICAgICAgT2soU29tZShzdGF0ZSkpID0+IHsKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICBpZiBzdGF0ZSA9PSBWZXJpZnlTdGF0ZTo6RmFpbGVkIHsKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNvbWUoKGRpciwgdHJ1ZSkpOworICAg ICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAg ICAgICAgICAgICAgICAgICAgICAgIE9rKE5vbmUpID0+IHsKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAvLyBUaGUgdmVyaWZ5X3N0YXRlIGl0ZW0gd2FzIG5vdCBmb3VuZCBpbiB0aGUgbWFu aWZlc3QsIHRoaXMgbWVhbnMgdGhlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gc25h cHNob3QgaXMgbmV3LgorICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAg ICAgICAgICAgRXJyKF8pID0+IHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBUaGVy ZSB3YXMgYW4gZXJyb3IgbG9hZGluZyB0aGUgbWFuaWZlc3QsIHByb2JhYmx5IGJldHRlciBpZiB3 ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHJlc3luYy4KKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICByZXR1cm4gU29tZSgoZGlyLCB0cnVlKSk7CisgICAgICAgICAgICAgICAg ICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICB9CisgICAg ICAgICAgICB9CiAgICAgICAgICAgICAvLyBOb3RlOiB0aGUgc25hcHNob3QgcmVwcmVzZW50ZWQg YnkgYGxhc3Rfc3luY190aW1lYCBtaWdodCBiZSBtaXNzaW5nIGl0cyBiYWNrdXAgbG9nCiAgICAg ICAgICAgICAvLyBvciBwb3N0LWJhY2t1cCB2ZXJpZmljYXRpb24gc3RhdGUgaWYgdGhvc2Ugd2Vy ZSBub3QgeWV0IGF2YWlsYWJsZSBkdXJpbmcgdGhlIGxhc3QKICAgICAgICAgICAgIC8vIHN5bmMg cnVuLCBhbHdheXMgcmVzeW5jIGl0CiAgICAgICAgICAgICBpZiBsYXN0X3N5bmNfdGltZSA+IGRp ci50aW1lIHsKICAgICAgICAgICAgICAgICBhbHJlYWR5X3N5bmNlZF9za2lwX2luZm8udXBkYXRl KGRpci50aW1lKTsKLSAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgICAgICAg ICAgcmV0dXJuIE5vbmU7CiAgICAgICAgICAgICB9Ci0KICAgICAgICAgICAgIGlmIHBvcyA8IGN1 dG9mZiAmJiBsYXN0X3N5bmNfdGltZSAhPSBkaXIudGltZSB7CiAgICAgICAgICAgICAgICAgdHJh bnNmZXJfbGFzdF9za2lwX2luZm8udXBkYXRlKGRpci50aW1lKTsKLSAgICAgICAgICAgICAgICBy ZXR1cm4gZmFsc2U7CisgICAgICAgICAgICAgICAgcmV0dXJuIE5vbmU7CiAgICAgICAgICAgICB9 Ci0gICAgICAgICAgICB0cnVlCisgICAgICAgICAgICBTb21lKChkaXIsIGZhbHNlKSkKICAgICAg ICAgfSkKLSAgICAgICAgLm1hcCh8KF8sIGRpcil8IGRpcikKICAgICAgICAgLmNvbGxlY3QoKTsK IAogICAgIGlmIGFscmVhZHlfc3luY2VkX3NraXBfaW5mby5jb3VudCA+IDAgewpAQCAtNTYxLDcg KzYwMCw3IEBAIGFzeW5jIGZuIHB1bGxfZ3JvdXAoCiAKICAgICBsZXQgbXV0IHN5bmNfc3RhdHMg PSBTeW5jU3RhdHM6OmRlZmF1bHQoKTsKIAotICAgIGZvciAocG9zLCBmcm9tX3NuYXBzaG90KSBp biBsaXN0LmludG9faXRlcigpLmVudW1lcmF0ZSgpIHsKKyAgICBmb3IgKHBvcywgKGZyb21fc25h cHNob3QsIGNvcnJ1cHQpKSBpbiBsaXN0LmludG9faXRlcigpLmVudW1lcmF0ZSgpIHsKICAgICAg ICAgbGV0IHRvX3NuYXBzaG90ID0gcGFyYW1zCiAgICAgICAgICAgICAudGFyZ2V0CiAgICAgICAg ICAgICAuc3RvcmUKQEAgLTU3MSw3ICs2MTAsOCBAQCBhc3luYyBmbiBwdWxsX2dyb3VwKAogICAg ICAgICAgICAgLnNvdXJjZQogICAgICAgICAgICAgLnJlYWRlcihzb3VyY2VfbmFtZXNwYWNlLCAm ZnJvbV9zbmFwc2hvdCkKICAgICAgICAgICAgIC5hd2FpdD87Ci0gICAgICAgIGxldCByZXN1bHQg PSBwdWxsX3NuYXBzaG90X2Zyb20ocmVhZGVyLCAmdG9fc25hcHNob3QsIGRvd25sb2FkZWRfY2h1 bmtzLmNsb25lKCkpLmF3YWl0OworICAgICAgICBsZXQgcmVzdWx0ID0KKyAgICAgICAgICAgIHB1 bGxfc25hcHNob3RfZnJvbShyZWFkZXIsICZ0b19zbmFwc2hvdCwgZG93bmxvYWRlZF9jaHVua3Mu Y2xvbmUoKSwgY29ycnVwdCkuYXdhaXQ7CiAKICAgICAgICAgcHJvZ3Jlc3MuZG9uZV9zbmFwc2hv dHMgPSBwb3MgYXMgdTY0ICsgMTsKICAgICAgICAgaW5mbyEoInBlcmNlbnRhZ2UgZG9uZToge3By b2dyZXNzfSIpOwotLSAKMi4zOS41CgoKCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fCnBicy1kZXZlbCBtYWlsaW5nIGxpc3QKcGJzLWRldmVsQGxpc3RzLnBy b3htb3guY29tCmh0dHBzOi8vbGlzdHMucHJveG1veC5jb20vY2dpLWJpbi9tYWlsbWFuL2xpc3Rp bmZvL3Bicy1kZXZlbAo=