[pve-devel] applied: [PATCH common v2] SectionConfig: fix handling unknown sections

Fiona Ebner f.ebner at proxmox.com
Wed Aug 16 11:32:19 CEST 2023


Am 16.08.23 um 11:09 schrieb Dominik Csapak:
> if we're parsing an unknown section, we cannot check the schema with
> `is_array` to check if it's an array type or not, thus we have to
> handle that separately.
> 
> fix this by handling data in unknown sections like an array similar to
> "cb2646c7b4974e33f4148752deec71f0d589b0f3" in proxmox-section-config.
> This way we can write unknown section out again like we parsed it.
> 
> Add a regression test for an unknown field not in the schema.
> 
> This fixes an issue, where calling `qm destroy ID --purge` removed much
> of the configs ob backup jobs (since there we parse an 'unknown' section
> and run into the `is_array` error)
> (Reported in the forum: https://forum.proxmox.com/threads/132091)
> 
> Suggested-by: Fiona Ebner <f.ebner at proxmox.com>
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---

applied, thanks! As a follow-up, I added an actual array in the unknown
section to test for that too.





More information about the pve-devel mailing list