From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUxaS-0008S9-W6 for qemu-devel@nongnu.org; Thu, 27 Aug 2015 09:51:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUxaP-0000YW-8r for qemu-devel@nongnu.org; Thu, 27 Aug 2015 09:51:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41915) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUxaP-0000Xs-3b for qemu-devel@nongnu.org; Thu, 27 Aug 2015 09:51:25 -0400 Date: Thu, 27 Aug 2015 14:51:20 +0100 From: "Daniel P. Berrange" Message-ID: <20150827135120.GT24486@redhat.com> References: <87fv36j9j6.fsf@blackfin.pond.sub.org> <20150826172550.GJ11016@localhost.localdomain> <20150826180815.GK11016@localhost.localdomain> <20150826220151.GA2669@localhost.localdomain> <2CB0CE30-A638-4933-A1D6-F65CA4910E61@gmail.com> <20150827123234.GB2669@localhost.localdomain> <55DF09DB.2000406@redhat.com> <221424A1-B3AA-4746-BAF3-BEBCC1CA73DC@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <221424A1-B3AA-4746-BAF3-BEBCC1CA73DC@gmail.com> Subject: Re: [Qemu-devel] Should we auto-generate IDs? Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Programmingkid Cc: Kevin Wolf , jsnow@redhat.com, Jeff Cody , Markus Armbruster , qemu-devel qemu-devel , Paolo Bonzini , Andreas =?utf-8?Q?F=C3=A4rber?= On Thu, Aug 27, 2015 at 09:39:10AM -0400, Programmingkid wrote: > > > Better still might be fixing things to where we add a global command > > line option that outright fails any attempt to create an unnamed object. > > The option would be off by default for back-compat. But management > > apps like libvirt can turn it on once they are prepared to name every > > object they create (which in turn may imply fixing any remaining > > interfaces that cannot name an object to add in that ability for > > management to pass in a name). Then there would be no unnamed objects, > > no ambiguity, and no need to generate names. > > I do agree with giving every device an ID, but I don't think failing if the user > forgets to give one is necessary. If libvirt doesn't give devices and ID, it > would probably benefit from having QEMU do it for libvirt. Libvirt always gives an explicit ID. It is impossible to rely on QEMU assigning IDs, because there is no reliable way to identify what ID QEMU assigned to each device after the fact. Other management apps would have the same problem, so auto-generated IDs are pretty useless in that respect. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|