[pve-devel] [PATCH pve-common 1/1] schema: add pve-targetstorage (moved from qemu-server)

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Jun 30 09:51:30 CEST 2022


On 30/06/2022 09:30, DERUMIER, Alexandre wrote:
>> this and "qemu-server: remove json schema pve-targetstorage (moved to
>> pve-common)"
>> seems rather unrelated from the firewall series.
>>
> I haved added it, because if you remove "use Firewall.pm" from lxc,
> 
> it's doesn't find the schema anymore (because QemuServer is require in
> Firewall.pm)
> 

Ah, ok, so an implicit, "invisible" dependency from pve-container to
qemu-server, yuck. Then I understand the relation (could be more obviously
noted in a commit message though :-) - anyhow

> 
> But yes, it could be done firstly in another patch series. (and It seem
> than fabian has already send a patch some months ago)
> 
> 

I can take a look a the ones from Fabian so we can get that out of the way
first.

> BTW, Do you known why we need  in pve-firewall :> > # dynamically include PVE::QemuServer and PVE::LXC> # to avoid dependency problems> my $have_qemu_server;> eval {>     require PVE::QemuServer;>     require PVE::QemuConfig;>     $have_qemu_server = 1;> };> > my $have_lxc;> eval {>     require PVE::LXC;>     $have_lxc = 1;> };> > > > ?> > is it because PVE::Qemuserver && PVE::LXC are also using use> PVE::Firewall ?> 
Yes. It's mostly to allow solving the circular dependency issue for bootstrapping
PVE in a easy way, e.g., for a new Debian release like Bookworm next year.

I mean, we only uses it to parse the networks of VM/CTs, maybe we could reorganise
that - from top of my head: either write a simple standalone parser in firewall that
gets out the relevant info or split out the config schema stuff in separate packages
for each VM and CTs, which could be a bit more work but maybe fit in our project to
convert more of the schema from perl to rust (for datacenter manager).
Anyhow, that is probably not as important now and can stay as is with the eval'd
requires.





More information about the pve-devel mailing list