From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 243408D557 for ; Tue, 8 Nov 2022 10:24:53 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id DFC855065 for ; Tue, 8 Nov 2022 10:24:52 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Tue, 8 Nov 2022 10:24:51 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 41AF9431C5 for ; Tue, 8 Nov 2022 10:24:51 +0100 (CET) Message-ID: <0029248b-d216-edcb-51f5-d5157ab871dd@proxmox.com> Date: Tue, 8 Nov 2022 10:24:50 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:107.0) Gecko/20100101 Thunderbird/107.0 Content-Language: en-GB To: Dominik Csapak , Proxmox VE development discussion References: <20220404085416.1761268-1-d.csapak@proxmox.com> <20220404085416.1761268-2-d.csapak@proxmox.com> <4a367506-1629-69a7-b1c1-d0ea9fdccb40@proxmox.com> <84715fe7-760d-db37-9cc1-73c431533520@proxmox.com> From: Thomas Lamprecht Cc: Wolfgang Bumiller In-Reply-To: <84715fe7-760d-db37-9cc1-73c431533520@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL -0.033 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -0.001 Looks like a legit reply (A) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH access-control 1/1] add realmsync plugin for jobs and CRUD api for domainsync-jobs X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Nov 2022 09:24:53 -0000 Am 08/11/2022 um 09:20 schrieb Dominik Csapak: >> is=C2=A0this=C2=A0outdated=C2=A0due=C2=A0to=C2=A0being=C2=A0from=C2=A0= april?=C2=A0or=C2=A0do=C2=A0we=C2=A0really=C2=A0share=C2=A0the >> ID=C2=A0namespace=C2=A0between=C2=A0all=C2=A0plugin=C2=A0types? >=20 > thats=C2=A0normal=C2=A0for=C2=A0section=C2=A0configs,=C2=A0but=C2=A0usu= ally=C2=A0we=C2=A0don't=C2=A0notice=C2=A0in=C2=A0pve > since=C2=A0we=C2=A0normally=C2=A0only=C2=A0have=C2=A0a=C2=A0single=C2=A0= endpoint=C2=A0for=C2=A0listing=C2=A0all=C2=A0objects > and=C2=A0not=C2=A0per=C2=A0'type' > (e.g.=C2=A0you=C2=A0can't=C2=A0have=C2=A02=C2=A0storages=C2=A0with=C2=A0= the=C2=A0same=C2=A0ids=C2=A0but=C2=A0different=C2=A0types > either) @wolfgang didn't you improve on that somewhere by some xyz-id prefix or t= he like? >>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0foreach=C2=A0my=C2=A0= $k=C2=A0(keys=C2=A0%$param)=C2=A0{ >> >> probably=C2=A0just=C2=A0copy=C2=A0"error",=C2=A0but=C2=A0please:=C2=A0= s/foreach/for/,=C2=A0or=C2=A0even: >> >> $job->{$_}=C2=A0=3D=C2=A0$param->{$_}=C2=A0for=C2=A0keys=C2=A0$param->= %*; >=20 > mhmm..=C2=A0AFAIR=C2=A0i=C2=A0did=C2=A0not=C2=A0see=C2=A0that=C2=A0patt= ern=C2=A0anywhere=C2=A0yet=C2=A0in=C2=A0our=C2=A0codebase,=C2=A0maybe=C2=A0= we=C2=A0want > an=C2=A0example=C2=A0of=C2=A0that=C2=A0in=C2=A0our=C2=A0style=C2=A0guid= e?=C2=A0(for=C2=A0single=C2=A0line=C2=A0loops=C2=A0i=C2=A0like=C2=A0it) $ grep -r '\$_.*for ' /usr/share/perl5/PVE /usr/share/perl5/PVE/API2.pm: $res->{$_} =3D $version_info->{$_} for qw= (version release repoid); /usr/share/perl5/PVE/CLI/pve6to7.pm: $total +=3D $_ for values %$count= ers; /usr/share/perl5/PVE/API2/Ceph/Pools.pm: delete $options->{$_}->{d= efault} for keys %$options; /usr/share/perl5/PVE/API2/Ceph/MDS.pm: $mds_hash->{$name}->{$_} =3D = $d->{$_} for keys %$d; /usr/share/perl5/PVE/API2/ClusterConfig.pm: $err_hash->{"${ty= pe}$_"} =3D $arr[$_] for 0..$#arr; /usr/share/perl5/PVE/API2/Qemu.pm: $conf->{$_} =3D $crea= ted_opts->{$_} for keys $created_opts->%*; /usr/share/perl5/PVE/API2/Qemu.pm: $conf->{pending}->{$_= } =3D $created_opts->{$_} for keys $created_opts->%*; /usr/share/perl5/PVE/API2/Disks/ZFS.pm: eval { PVE::Diskmanage::w= ipe_blockdev($_) for $to_wipe->@*; }; /usr/share/perl5/PVE/API2/Cluster.pm: $conf->{$_} =3D $param->{$_} = for keys $param->%*; /usr/share/perl5/PVE/API2/Cluster.pm: delete $conf->{$_} for PVE::T= ools::split_list($delete); /usr/share/perl5/PVE/API2/Network.pm: $ifaces->{$_} =3D $vnets-= >{$_} for keys $vnets->%* /usr/share/perl5/PVE/API2/LXC.pm: $rpcenv->warn($er= rors->{$_}) for keys $errors->%*; /usr/share/perl5/PVE/Service/pvescheduler.pm: $old_workers .=3D "$type:= $_;" for keys $worker->%*; /usr/share/perl5/PVE/VZDump.pm:delete $confdesc_for_defaults->{$_}->{requ= ires} for qw(notes-template protected); /usr/share/perl5/PVE/VZDump.pm: delete $opts->{$_} for qw(notes-template = protected); /usr/share/perl5/PVE/VZDump/LXC.pm: $task->{size} +=3D $_->{size} for= @$res; /usr/share/perl5/PVE/Diskmanage.pm: $_ =3D~ s|cciss/|cciss!| for @$di= sks; /usr/share/perl5/PVE/Diskmanage.pm: $disklist->{$_} =3D $partitio= ns->{$_} for keys %{$partitions}; /usr/share/perl5/PVE/INotify.pm: $ifaces->{$_}->{autostart} =3D= 1 for split (/\s+/, $2); /usr/share/perl5/PVE/INotify.pm: $ifaces->{$_}->{autostart} =3D= 1 for split (/\s+/, $2); /usr/share/perl5/PVE/INotify.pm: $d->{"$_$suffix"} =3D $f->{$_= } for keys $f->%*; /usr/share/perl5/PVE/QemuServer/ImportDisk.pm: warn "hotplugging= imported disk '$_' failed: $errors->{$_}\n" for keys %$errors; /usr/share/perl5/PVE/ACME.pm: $self->{$_} =3D $data->{$_} for @SAVED_V= ALUES; /usr/share/perl5/PVE/ACME.pm: print("(meta): $_ : $meta->{$_}\n") for s= ort keys %$meta; /usr/share/perl5/PVE/ACME.pm: print("$_ : $methods->{$_}\n") for sort = grep {$_ ne 'meta'} keys %$methods; /usr/share/perl5/PVE/DAB.pm: $exclude->{$_} =3D 1 for split(',', $opts= ->{exclude}); /usr/share/perl5/PVE/Tools.pm: check_mail_addr($_) for $mailto->@*; /usr/share/perl5/PVE/QemuMigrate.pm: delete $conf->{$_} for keys %$tar= get_drives; >>> +package=C2=A0PVE::Jobs::RealmSync; >> >> Hmm,=C2=A0why=C2=A0not=C2=A0DomainSync,=C2=A0or=C2=A0why=C2=A0is=C2=A0= the=C2=A0other=C2=A0module=C2=A0called=C2=A0Domainsynced,=C2=A0no=C2=A0bi= ggie=C2=A0but >> slightly=C2=A0odd >=20 > i=C2=A0can't=C2=A0really=C2=A0remember,=C2=A0but=C2=A0i=C2=A0guess=C2=A0= i=C2=A0decided=C2=A0on=C2=A0a=C2=A0different=C2=A0name=C2=A0sometime=C2=A0= during > development,=C2=A0and=C2=A0forgot=C2=A0to=C2=A0update=C2=A0all=C2=A0ins= tances... >=20 > i'm=C2=A0not=C2=A0bound=C2=A0to=C2=A0any=C2=A0of=C2=A0these=C2=A0names,= =C2=A0but=C2=A0i=C2=A0also=C2=A0would=C2=A0like=C2=A0to=C2=A0have=C2=A0it= =C2=A0consistent > (so=C2=A0either=C2=A0all=C2=A0DomainSync=C2=A0or=C2=A0all=C2=A0RealmSyn= c) let's do Realm, matches the frontend and in the PVE/internet world a bit = less overused.