From alourie at redhat.com Sun Apr 1 09:09:07 2012 From: alourie at redhat.com (Alex Lourie) Date: Sun, 01 Apr 2012 05:09:07 -0400 (EDT) Subject: [Engine-devel] Please review: All In One Feature page In-Reply-To: <58134886-dd2e-4ae3-bca1-bb9c1ba23847@zmail12.collab.prod.int.phx2.redhat.com> Message-ID: <5e18cd82-6d9e-4dc3-b2e4-874053a3b8d7@zmail12.collab.prod.int.phx2.redhat.com> Hi All I've written a new wiki page [1] for a feature we've developed, called All in One. This allows configuring VDSM on the same host with rhevm (ovirt) automatically during setup. Please review and provide feedback :-) Thanks [1] http://www.ovirt.org/wiki/Feature/AllInOne From dfediuck at redhat.com Sun Apr 1 09:44:07 2012 From: dfediuck at redhat.com (Doron Fediuck) Date: Sun, 01 Apr 2012 12:44:07 +0300 Subject: [Engine-devel] Reloadable Configuration - Wiki Page In-Reply-To: <3570b600-90ed-4f30-9ea9-a9818449dadf@zmail16.collab.prod.int.phx2.redhat.com> References: <3570b600-90ed-4f30-9ea9-a9818449dadf@zmail16.collab.prod.int.phx2.redhat.com> Message-ID: <4F782367.7080008@redhat.com> Indeed you're taking it sideways. We have a concept we can improve, and this can be done in 2 ways; 1. Stop the press, break current implementation and re-write it to support instances. 2. Handle reload to help current users, and set (1) as an RFE for 3.2. I'm not sure how long the engine can wait to stabilize after (1) or several iterations of it. So gradually working toward it (such as 2 suggests) may be more user friendly. Does it makes sense? On 31/03/12 00:50, Saggi Mizrahi wrote: > I'm sorry if I'm moving the conversation sideways a bit but I was ill for a few days and missed out on all the fun :). > The whole debate about permissions is a causing my spidy sense to tingle. > > My main question is, What are the options you actually want to make as engine configuration? > At least from my experience with VDSM 99% of the configuration options we have shouldn't be VDSM configuration but instance attributes. > > To illustrate, the interval where you check liveness of hosts is not actually an Engine setting but a cluster or a host attribute. It should be set using the UI and the permissions to set it should be related to general permission on the object. > The interval in which to check for storage liveness is a data center setting, not an Engine setting as well. > > In general most options in a system are tied to object instances. The only things that I can think of that are actual Engine configurations are DB location, memory settings of the JVM and other technical details that should be accessible and set by the local root user only. This is also why I thought it shouldn't be in the DB, because if it's in the DB it's actually shared between installation and it's like sharing apache's "max thread num" setting between hosts with different capabilities. > > Technical limitations like not being able to update quartz tasks once they've been initiated should be circumvented or abstracted but not designed around. > > ----- Original Message ----- >> From: "Doron Fediuck" >> To: "Itamar Heim" >> Cc: engine-devel at ovirt.org >> Sent: Thursday, March 29, 2012 8:42:05 AM >> Subject: Re: [Engine-devel] Reloadable Configuration - Wiki Page >> >> On 29/03/12 12:13, Itamar Heim wrote: >>> On 03/29/2012 11:59 AM, Doron Fediuck wrote: >>>> On 29/03/12 10:54, Itamar Heim wrote: >>>>> On 03/29/2012 10:05 AM, Muli Salem wrote: >>>>>> Thanks for the comments, I updated the wiki page accordingly: >>>>>> http://www.ovirt.org/wiki/Features/ReloadableConfiguration >>>>>> >>>>>> 1. Instead of the new DB column is_reloadable --> Annotation >>>>>> to ConfigValues. >>>>>> 2. Found a way to update the Quartz jobs, at least basic issues >>>>>> such as interval size. >>>>>> 3. The values will be reloaded upon admin's decision to do so - >>>>>> with a new command in the engine-config CLI, since that is >>>>>> where admins make the changes. >>>>> >>>>> just wondering - how will the CLI do this at the technical level >>>>> (via REST API? signal to service, etc.)? >>>> >>>> Basically we need a script using the REST sdk to trigger >>>> re-configuration >>>> This script will need the engine's IP so it'll know where to find >>>> it. >>>> The thing is, REST also needs the admin's user and password to >>>> run... >>>> >>>> We can get it in 2 options: >>>> >>>> 1. Store Admin's user+pass in the engine's conf file. >>>> 2. Use engine-config to fetch the credentials. >>>> >>>> Once we have credentials, we can use it with a new script to >>>> trigger configuration reload. >>>> We can also incorporate this script into engine-config so admin >>>> won't need to know another >>>> script, and simply use a 'reload' verb. >>>> >>>> I'm not keen on storing the credentials in a conf' file, but >>>> (unfortunately) it wouldn't >>>> be a first time. Any better alternative is welcome (just as >>>> patches ;-). >>> >>> true. >>> >>>> >>>> A simple alternative to the whole credentials and IP need, >>>> is a simple periodic reload, as suggested initially. >>> >>> >> Any thoughts on this? >> >>> >>>> >>>> /d >>> >>> isn't there some way to send a process signal or something like >>> that (not allowing remote access, but i think it uses the db >>> crednetials from a local file anyway, and i don't think running >>> config remotely is a must) >>> >> Simply signaling a process such as "kill TRAP PID" is problematic >> since: >> - The engine core is a web-app on top of JBoss, how do we know which >> pid to trigger? >> - What happens if JBoss isn't running / using nohup / ... ? >> >>> other options: >>> 1. require user to provide user/password (kind of funny for running >>> manage-domains utility, but possible >> This will make service xxx reload pointless, unless we decide to drop >> it and reduce to a simple >> script (embedded or not in the config utility). >> >>> 2. use a way on the host to send a signal (change a file, process >>> signal, etc.) >> Great. This means we need to poll a folder or similar (DB)... sounds >> familiar? >> See above the periodic reload. We can do it better if we look for a >> key in the DB >> (enableReconfigure=true), to avoid reloading in the middle of an >> update process >> of several keys. We still need to be careful from concurrency, but I >> have solutions >> for this as well (do not allow updates to vdc_options until the key >> becomes false again, >> also set it to false on initial boot). >> >>> >> 3. Write a simple public reload servlet (maybe limit to local host >> only?), which >> we can call using simple curl http://xxx/reload? >> >> As I see it now, >> I'd go for one of the following (in this order)- >> 2: periodically poll DB, reload only when allowed. >> 3: local servlet. >> >> Thoughts? >> Better solutions? >> _______________________________________________ >> Engine-devel mailing list >> Engine-devel at ovirt.org >> http://lists.ovirt.org/mailman/listinfo/engine-devel >> From iheim at redhat.com Sun Apr 1 13:26:57 2012 From: iheim at redhat.com (Itamar Heim) Date: Sun, 01 Apr 2012 16:26:57 +0300 Subject: [Engine-devel] Please review: All In One Feature page In-Reply-To: <5e18cd82-6d9e-4dc3-b2e4-874053a3b8d7@zmail12.collab.prod.int.phx2.redhat.com> References: <5e18cd82-6d9e-4dc3-b2e4-874053a3b8d7@zmail12.collab.prod.int.phx2.redhat.com> Message-ID: <4F7857A1.5040801@redhat.com> On 04/01/2012 12:09 PM, Alex Lourie wrote: > Hi All > > I've written a new wiki page [1] for a feature we've developed, called All in One. This allows configuring VDSM on the same host with rhevm (ovirt) automatically during setup. > 1. "Plugin will wait to allow JBoss to start correctly. This is done because other steps involve using REST API (with ovirtsdk), which requires JBoss to be up. " how are you planning to perform this check? 2. "Plugin will create a local host and add it to host list." worth mentioning bootstrapping code was changed to allow to not reboot a host for this. 3. "The plugin works by providing parameters, group and sequences and adding them into the Controller object (the main object of the setup flow), which will invoke appropriate logic during the setup operation. " nice - I like it is modular code. From ovedo at redhat.com Sun Apr 1 16:01:17 2012 From: ovedo at redhat.com (Oved Ourfalli) Date: Sun, 01 Apr 2012 12:01:17 -0400 (EDT) Subject: [Engine-devel] Please review: All In One Feature page In-Reply-To: <4F7857A1.5040801@redhat.com> Message-ID: ----- Original Message ----- > From: "Itamar Heim" > To: "Alex Lourie" > Cc: engine-devel at ovirt.org > Sent: Sunday, April 1, 2012 4:26:57 PM > Subject: Re: [Engine-devel] Please review: All In One Feature page > > On 04/01/2012 12:09 PM, Alex Lourie wrote: > > Hi All > > > > I've written a new wiki page [1] for a feature we've developed, > > called All in One. This allows configuring VDSM on the same host > > with rhevm (ovirt) automatically during setup. > > > > 1. "Plugin will wait to allow JBoss to start correctly. This is done > because other steps involve using REST API (with ovirtsdk), which > requires JBoss to be up. " > > how are you planning to perform this check? > > 2. "Plugin will create a local host and add it to host list." > worth mentioning bootstrapping code was changed to allow to not > reboot a > host for this. > > 3. "The plugin works by providing parameters, group and sequences and > adding them into the Controller object (the main object of the setup > flow), which will invoke appropriate logic during the setup > operation. " > > nice - I like it is modular code. Sounds indeed modular. Not really familiar with the architecture of the setup process today, so I have a one question: How easy will it be in the future to write a plugin that performs different actions? I'm asking because of the gluster integration. They might also want such a "all in one" feature, and in their case the CPU type is irrelevant, some of the steps are similar, and some other steps will have to be performed, such as format partition, create bricks, volumes and etc. We should think about this today, as they might need this tomorrow :-) Thank you, Oved > > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel > From ykaul at redhat.com Sun Apr 1 16:14:08 2012 From: ykaul at redhat.com (Yaniv Kaul) Date: Sun, 01 Apr 2012 19:14:08 +0300 Subject: [Engine-devel] Please review: All In One Feature page In-Reply-To: <5e18cd82-6d9e-4dc3-b2e4-874053a3b8d7@zmail12.collab.prod.int.phx2.redhat.com> References: <5e18cd82-6d9e-4dc3-b2e4-874053a3b8d7@zmail12.collab.prod.int.phx2.redhat.com> Message-ID: <4F787ED0.6030203@redhat.com> On 04/01/2012 12:09 PM, Alex Lourie wrote: > Hi All > > I've written a new wiki page [1] for a feature we've developed, called All in One. This allows configuring VDSM on the same host with rhevm (ovirt) automatically during setup. > > Please review and provide feedback :-) - If the code is in code review, it's worth linking to relevant gerrit link. - How is this supported with silent installation? - What limitations, if any, exist in an all-in-one installation (for example, fencing). Y. > > Thanks > > [1] http://www.ovirt.org/wiki/Feature/AllInOne > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel From alourie at redhat.com Sun Apr 1 19:21:21 2012 From: alourie at redhat.com (Alex Lourie) Date: Sun, 01 Apr 2012 22:21:21 +0300 Subject: [Engine-devel] Fwd: Re: Please review: All In One Feature page In-Reply-To: <4F78AA51.8070603@redhat.com> References: <4F78AA51.8070603@redhat.com> Message-ID: <4F78AAB1.2020207@redhat.com> On 04/01/2012 04:26 PM, Itamar Heim wrote: > On 04/01/2012 12:09 PM, Alex Lourie wrote: >> Hi All >> >> I've written a new wiki page [1] for a feature we've developed, >> called All in One. This allows configuring VDSM on the same host with >> rhevm (ovirt) automatically during setup. >> > > 1. "Plugin will wait to allow JBoss to start correctly. This is done > because other steps involve using REST API (with ovirtsdk), which > requires JBoss to be up. " > > how are you planning to perform this check? > Currently we do not check for it. The following operations will fail though if it is not up. > 2. "Plugin will create a local host and add it to host list." > worth mentioning bootstrapping code was changed to allow to not reboot > a host for this. > Sure, I'll add a note. > 3. "The plugin works by providing parameters, group and sequences and > adding them into the Controller object (the main object of the setup > flow), which will invoke appropriate logic during the setup operation. " > > nice - I like it is modular code. > -- Alex Lourie. From alourie at redhat.com Sun Apr 1 19:22:55 2012 From: alourie at redhat.com (Alex Lourie) Date: Sun, 01 Apr 2012 22:22:55 +0300 Subject: [Engine-devel] Please review: All In One Feature page In-Reply-To: References: Message-ID: <4F78AB0F.8060405@redhat.com> On 04/01/2012 07:01 PM, Oved Ourfalli wrote: > > ----- Original Message ----- >> From: "Itamar Heim" >> To: "Alex Lourie" >> Cc: engine-devel at ovirt.org >> Sent: Sunday, April 1, 2012 4:26:57 PM >> Subject: Re: [Engine-devel] Please review: All In One Feature page >> >> On 04/01/2012 12:09 PM, Alex Lourie wrote: >>> Hi All >>> >>> I've written a new wiki page [1] for a feature we've developed, >>> called All in One. This allows configuring VDSM on the same host >>> with rhevm (ovirt) automatically during setup. >>> >> 1. "Plugin will wait to allow JBoss to start correctly. This is done >> because other steps involve using REST API (with ovirtsdk), which >> requires JBoss to be up. " >> >> how are you planning to perform this check? >> >> 2. "Plugin will create a local host and add it to host list." >> worth mentioning bootstrapping code was changed to allow to not >> reboot a >> host for this. >> >> 3. "The plugin works by providing parameters, group and sequences and >> adding them into the Controller object (the main object of the setup >> flow), which will invoke appropriate logic during the setup >> operation. " >> >> nice - I like it is modular code. > Sounds indeed modular. Not really familiar with the architecture of the setup process today, so I have a one question: > How easy will it be in the future to write a plugin that performs different actions? It's quite modular and it's very easy to create another plugin. > I'm asking because of the gluster integration. They might also want such a "all in one" feature, and in their case the CPU type is irrelevant, some of the steps are similar, and some other steps will have to be performed, such as format partition, create bricks, volumes and etc. > > We should think about this today, as they might need this tomorrow :-) > > Thank you, > Oved > >> _______________________________________________ >> Engine-devel mailing list >> Engine-devel at ovirt.org >> http://lists.ovirt.org/mailman/listinfo/engine-devel >> -- Alex Lourie. From alourie at redhat.com Sun Apr 1 21:02:32 2012 From: alourie at redhat.com (Alex Lourie) Date: Mon, 02 Apr 2012 00:02:32 +0300 Subject: [Engine-devel] Please review: All In One Feature page In-Reply-To: <4F787ED0.6030203@redhat.com> References: <5e18cd82-6d9e-4dc3-b2e4-874053a3b8d7@zmail12.collab.prod.int.phx2.redhat.com> <4F787ED0.6030203@redhat.com> Message-ID: <4F78C268.5030705@redhat.com> On 04/01/2012 07:14 PM, Yaniv Kaul wrote: > On 04/01/2012 12:09 PM, Alex Lourie wrote: >> Hi All >> >> I've written a new wiki page [1] for a feature we've developed, >> called All in One. This allows configuring VDSM on the same host with >> rhevm (ovirt) automatically during setup. >> >> Please review and provide feedback :-) > > - If the code is in code review, it's worth linking to relevant gerrit > link. http://gerrit.ovirt.org/#change,2221 > - How is this supported with silent installation? Fully. You'll have to create a new answer file, but with that it will work fine. > - What limitations, if any, exist in an all-in-one installation (for > example, fencing). > Not that I know of, maybe Ofer/Barak would know? > Y. > >> >> Thanks >> >> [1] http://www.ovirt.org/wiki/Feature/AllInOne >> _______________________________________________ >> Engine-devel mailing list >> Engine-devel at ovirt.org >> http://lists.ovirt.org/mailman/listinfo/engine-devel > -- Alex Lourie. -------------- next part -------------- An HTML attachment was scrubbed... URL: From iheim at redhat.com Sun Apr 1 22:43:01 2012 From: iheim at redhat.com (Itamar Heim) Date: Mon, 02 Apr 2012 01:43:01 +0300 Subject: [Engine-devel] Fwd: Re: Please review: All In One Feature page In-Reply-To: <4F78AAB1.2020207@redhat.com> References: <4F78AA51.8070603@redhat.com> <4F78AAB1.2020207@redhat.com> Message-ID: <4F78D9F5.1090202@redhat.com> On 04/01/2012 10:21 PM, Alex Lourie wrote: > > On 04/01/2012 04:26 PM, Itamar Heim wrote: >> On 04/01/2012 12:09 PM, Alex Lourie wrote: >>> Hi All >>> >>> I've written a new wiki page [1] for a feature we've developed, >>> called All in One. This allows configuring VDSM on the same host with >>> rhevm (ovirt) automatically during setup. >>> >> >> 1. "Plugin will wait to allow JBoss to start correctly. This is done >> because other steps involve using REST API (with ovirtsdk), which >> requires JBoss to be up. " >> >> how are you planning to perform this check? >> > > Currently we do not check for it. The following operations will fail > though if it is not up. the engine has a health check servlet. I suggets you poll it till you get HTTP 200 to determine it is up. From iheim at redhat.com Sun Apr 1 23:03:49 2012 From: iheim at redhat.com (Itamar Heim) Date: Mon, 02 Apr 2012 02:03:49 +0300 Subject: [Engine-devel] Please review: All In One Feature page In-Reply-To: <4F78C268.5030705@redhat.com> References: <5e18cd82-6d9e-4dc3-b2e4-874053a3b8d7@zmail12.collab.prod.int.phx2.redhat.com> <4F787ED0.6030203@redhat.com> <4F78C268.5030705@redhat.com> Message-ID: <4F78DED5.7090205@redhat.com> On 04/02/2012 12:02 AM, Alex Lourie wrote: > On 04/01/2012 07:14 PM, Yaniv Kaul wrote: >> On 04/01/2012 12:09 PM, Alex Lourie wrote: >>> Hi All >>> >>> I've written a new wiki page [1] for a feature we've developed, >>> called All in One. This allows configuring VDSM on the same host with >>> rhevm (ovirt) automatically during setup. >>> >>> Please review and provide feedback :-) >> >> - If the code is in code review, it's worth linking to relevant gerrit >> link. > http://gerrit.ovirt.org/#change,2221 >> - How is this supported with silent installation? > Fully. You'll have to create a new answer file, but with that it will > work fine. >> - What limitations, if any, exist in an all-in-one installation (for >> example, fencing). >> > > Not that I know of, maybe Ofer/Barak would know? from the description in the wiki, it will by default create a local storage DC/cluster and configure the host in it. fencing is not relevant for local storage, as they can currently have only a single host per DC. From iheim at redhat.com Sun Apr 1 23:12:51 2012 From: iheim at redhat.com (Itamar Heim) Date: Mon, 02 Apr 2012 02:12:51 +0300 Subject: [Engine-devel] Reloadable Configuration - Wiki Page In-Reply-To: <3570b600-90ed-4f30-9ea9-a9818449dadf@zmail16.collab.prod.int.phx2.redhat.com> References: <3570b600-90ed-4f30-9ea9-a9818449dadf@zmail16.collab.prod.int.phx2.redhat.com> Message-ID: <4F78E0F3.1070000@redhat.com> On 03/31/2012 12:50 AM, Saggi Mizrahi wrote: > I'm sorry if I'm moving the conversation sideways a bit but I was ill for a few days and missed out on all the fun :). > The whole debate about permissions is a causing my spidy sense to tingle. > > My main question is, What are the options you actually want to make as engine configuration? > At least from my experience with VDSM 99% of the configuration options we have shouldn't be VDSM configuration but instance attributes. I don't think we should start by making every config variable at instance level. the config table allows system level defaults, which are easy to handle/manage. where there is sufficient need to create an instance level tweak, it is usually done with due consideration to making it a feature, which is usually a lengthier process. > > To illustrate, the interval where you check liveness of hosts is not actually an Engine setting but a cluster or a host attribute. It should be set using the UI and the permissions to set it should be related to general permission on the object. > The interval in which to check for storage liveness is a data center setting, not an Engine setting as well. true, but apparently so far there wasn't a need to tweak it at DC or cluster level, and engine level was good enough. best is sometimes enemy of good. and adding a lot of configurable options at entity level doesn't necessarily make things simpler for admins to understand. so i agree some options should be at instance level, but only when there is a good enough reason to do so. > > In general most options in a system are tied to object instances. The only things that I can think of that are actual Engine configurations are DB location, memory settings of the JVM and other technical details that should be accessible and set by the local root user only. This is also why I thought it shouldn't be in the DB, because if it's in the DB it's actually shared between installation and it's like sharing apache's "max thread num" setting between hosts with different capabilities. > > Technical limitations like not being able to update quartz tasks once they've been initiated should be circumvented or abstracted but not designed around. > > ----- Original Message ----- >> From: "Doron Fediuck" >> To: "Itamar Heim" >> Cc: engine-devel at ovirt.org >> Sent: Thursday, March 29, 2012 8:42:05 AM >> Subject: Re: [Engine-devel] Reloadable Configuration - Wiki Page >> >> On 29/03/12 12:13, Itamar Heim wrote: >>> On 03/29/2012 11:59 AM, Doron Fediuck wrote: >>>> On 29/03/12 10:54, Itamar Heim wrote: >>>>> On 03/29/2012 10:05 AM, Muli Salem wrote: >>>>>> Thanks for the comments, I updated the wiki page accordingly: >>>>>> http://www.ovirt.org/wiki/Features/ReloadableConfiguration >>>>>> >>>>>> 1. Instead of the new DB column is_reloadable --> Annotation >>>>>> to ConfigValues. >>>>>> 2. Found a way to update the Quartz jobs, at least basic issues >>>>>> such as interval size. >>>>>> 3. The values will be reloaded upon admin's decision to do so - >>>>>> with a new command in the engine-config CLI, since that is >>>>>> where admins make the changes. >>>>> >>>>> just wondering - how will the CLI do this at the technical level >>>>> (via REST API? signal to service, etc.)? >>>> >>>> Basically we need a script using the REST sdk to trigger >>>> re-configuration >>>> This script will need the engine's IP so it'll know where to find >>>> it. >>>> The thing is, REST also needs the admin's user and password to >>>> run... >>>> >>>> We can get it in 2 options: >>>> >>>> 1. Store Admin's user+pass in the engine's conf file. >>>> 2. Use engine-config to fetch the credentials. >>>> >>>> Once we have credentials, we can use it with a new script to >>>> trigger configuration reload. >>>> We can also incorporate this script into engine-config so admin >>>> won't need to know another >>>> script, and simply use a 'reload' verb. >>>> >>>> I'm not keen on storing the credentials in a conf' file, but >>>> (unfortunately) it wouldn't >>>> be a first time. Any better alternative is welcome (just as >>>> patches ;-). >>> >>> true. >>> >>>> >>>> A simple alternative to the whole credentials and IP need, >>>> is a simple periodic reload, as suggested initially. >>> >>> >> Any thoughts on this? >> >>> >>>> >>>> /d >>> >>> isn't there some way to send a process signal or something like >>> that (not allowing remote access, but i think it uses the db >>> crednetials from a local file anyway, and i don't think running >>> config remotely is a must) >>> >> Simply signaling a process such as "kill TRAP PID" is problematic >> since: >> - The engine core is a web-app on top of JBoss, how do we know which >> pid to trigger? >> - What happens if JBoss isn't running / using nohup / ... ? >> >>> other options: >>> 1. require user to provide user/password (kind of funny for running >>> manage-domains utility, but possible >> This will make service xxx reload pointless, unless we decide to drop >> it and reduce to a simple >> script (embedded or not in the config utility). >> >>> 2. use a way on the host to send a signal (change a file, process >>> signal, etc.) >> Great. This means we need to poll a folder or similar (DB)... sounds >> familiar? >> See above the periodic reload. We can do it better if we look for a >> key in the DB >> (enableReconfigure=true), to avoid reloading in the middle of an >> update process >> of several keys. We still need to be careful from concurrency, but I >> have solutions >> for this as well (do not allow updates to vdc_options until the key >> becomes false again, >> also set it to false on initial boot). >> >>> >> 3. Write a simple public reload servlet (maybe limit to local host >> only?), which >> we can call using simple curl http://xxx/reload? >> >> As I see it now, >> I'd go for one of the following (in this order)- >> 2: periodically poll DB, reload only when allowed. >> 3: local servlet. >> >> Thoughts? >> Better solutions? >> _______________________________________________ >> Engine-devel mailing list >> Engine-devel at ovirt.org >> http://lists.ovirt.org/mailman/listinfo/engine-devel >> From lhornyak at redhat.com Mon Apr 2 06:17:19 2012 From: lhornyak at redhat.com (Laszlo Hornyak) Date: Mon, 02 Apr 2012 02:17:19 -0400 (EDT) Subject: [Engine-devel] advanced nfs options in vdsm In-Reply-To: Message-ID: <83e52b82-b02a-4451-8cee-8e073055ba36@zmail01.collab.prod.int.phx2.redhat.com> Yep, I got the link from aglitke on the vdsm irc and I copy-pasted it to the wiki page. ----- Original Message ----- > From: "Saggi Mizrahi" > To: "Laszlo Hornyak" > Cc: "engine-devel" > Sent: Friday, March 30, 2012 9:10:19 PM > Subject: Re: advanced nfs options in vdsm > > The gerrit issue is linked in the wiki. It has all the information on > when it was merged. > > ----- Original Message ----- > > From: "Laszlo Hornyak" > > To: "Saggi Mizrahi" > > Cc: "engine-devel" > > Sent: Wednesday, March 28, 2012 1:27:47 PM > > Subject: advanced nfs options in vdsm > > > > Hi Saggi, > > > > The wiki page of the Advanced NFS options says that the changes > > needed in vdsm are already done > > http://www.ovirt.org/wiki/Features/AdvancedNfsOptions > > Which VDSM release has this feature built in? Also, could you send > > me > > what changes have been done on vdsm? > > > > Thank you, > > Laszlo > > > From ykaul at redhat.com Mon Apr 2 07:00:16 2012 From: ykaul at redhat.com (Yaniv Kaul) Date: Mon, 02 Apr 2012 10:00:16 +0300 Subject: [Engine-devel] Please review: All In One Feature page In-Reply-To: <4F78C268.5030705@redhat.com> References: <5e18cd82-6d9e-4dc3-b2e4-874053a3b8d7@zmail12.collab.prod.int.phx2.redhat.com> <4F787ED0.6030203@redhat.com> <4F78C268.5030705@redhat.com> Message-ID: <4F794E80.1080703@redhat.com> On 04/02/2012 12:02 AM, Alex Lourie wrote: > On 04/01/2012 07:14 PM, Yaniv Kaul wrote: >> On 04/01/2012 12:09 PM, Alex Lourie wrote: >>> Hi All >>> >>> I've written a new wiki page [1] for a feature we've developed, >>> called All in One. This allows configuring VDSM on the same host >>> with rhevm (ovirt) automatically during setup. >>> >>> Please review and provide feedback :-) >> >> - If the code is in code review, it's worth linking to relevant >> gerrit link. > http://gerrit.ovirt.org/#change,2221 Link in the wiki, next to 'Currently in code review'. >> - How is this supported with silent installation? > Fully. You'll have to create a new answer file, but with that it will > work fine. Any new item that we need to add to the answer file? Y. >> - What limitations, if any, exist in an all-in-one installation (for >> example, fencing). >> > > Not that I know of, maybe Ofer/Barak would know? >> Y. >> >>> >>> Thanks >>> >>> [1] http://www.ovirt.org/wiki/Feature/AllInOne >>> _______________________________________________ >>> Engine-devel mailing list >>> Engine-devel at ovirt.org >>> http://lists.ovirt.org/mailman/listinfo/engine-devel >> > > > -- > Alex Lourie. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ItzikB at mellanox.com Mon Apr 2 07:45:38 2012 From: ItzikB at mellanox.com (Itzik Brown) Date: Mon, 2 Apr 2012 07:45:38 +0000 Subject: [Engine-devel] Problem with detachment of host interface using ovirt-sdk In-Reply-To: <4F6EC05A.9010209@redhat.com> References: <4488206DC085244C886DBC9E7038B68918D382CE@MTRDAG01.mtl.com>, <4F6EC05A.9010209@redhat.com> Message-ID: <4488206DC085244C886DBC9E7038B6892516DF3B@mtrdag02.mtl.com> Hi, I tried using ovirt-sdk against ovirt-engine-3.0.0_0001-1.6. I still get the same result: 10:29:26,554 WARN [org.jboss.resteasy.core.SynchronousDispatcher] (http--0.0.0.0-8080-4) failed to execute: org.ovirt.engine.api.restapi.resource.BaseBackendResource$WebFaultException at org.ovirt.engine.api.restapi.resource.BaseBackendResource.handleError(BaseBackendResource.java:207) [restapi-jaxrs-3.0.0-0001.jar:] at org.ovirt.engine.api.restapi.resource.BaseBackendResource.handleError(BaseBackendResource.java:183) [restapi-jaxrs-3.0.0-0001.jar:] at org.ovirt.engine.api.restapi.resource.BackendHostNicsResource.lookupNetwork(BackendHostNicsResource.java:242) [restapi-jaxrs-3.0.0-0001.jar:] at org.ovirt.engine.api.restapi.resource.BackendHostNicResource.doAttachAction(BackendHostNicResource.java:56) [restapi-jaxrs-3.0.0-0001.jar:] at org.ovirt.engine.api.restapi.resource.BackendHostNicResource.detach(BackendHostNicResource.java:75) [restapi-jaxrs-3.0.0-0001.jar:] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_24] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [:1.6.0_24] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.6.0_24] at java.lang.reflect.Method.invoke(Method.java:616) [:1.6.0_24] Please advise, Itzik ________________________________ From: engine-devel-bounces at ovirt.org [engine-devel-bounces at ovirt.org] on behalf of Roy Golan [rgolan at redhat.com] Sent: Sunday, March 25, 2012 8:51 AM To: engine-devel at ovirt.org Subject: Re: [Engine-devel] Problem with detachment of host interface using ovirt-sdk On 03/22/2012 10:43 AM, Itzik Brown wrote: Hi, I'm using ovirt-sdk to attach and detach a network to a host's Interface. Once the network is attached to the interface I try to detach the network from the interface using the following steps: 1.Detach the network from the cluster through the GUI. 2.Remove the network from the datacenter through the GUI. 3.Detach the network from the host's interface using the SDK: nic = api.hosts.get(name=host).nics.get(name=if_name) net = params.Network(name=net_name) act = params.Action(network=net) nic.detach(act) api.hosts.get(name=host).commitnetconfig() Then I get the error: http://pastebin.com/3Md07huE The same flow using the GUI works fine. Network removal from the Datacenter is a trigger for me to run the detachment operation therefore I use this flow. I use the following components: rhevm-3.0.2_0001-2 ovirt-sdk (Using the latest from git repository) Please advise how to proceed. Thanks, Itzik This body part will be downloaded on demand. Ovirt-sdk and rhevm don't comply (ovirt-sdk is based on the upstream version of rhevm) Use the REST api instead: curl -X POST user at domain:password -H "Content-Type: application/xml" -d@/path/to/file.xml https://rhevm:8843/api/hosts/{host-id}/nics/{nic-id}/detach file.xml: eth0 -------------- next part -------------- An HTML attachment was scrubbed... URL: From agl at us.ibm.com Mon Apr 2 13:20:58 2012 From: agl at us.ibm.com (Adam Litke) Date: Mon, 2 Apr 2012 08:20:58 -0500 Subject: [Engine-devel] Backing up the DB Message-ID: <20120402132058.GG11957@aglitke.ibm.com> Hi all, I have a working development environment for ovirt-engine and I want to verify someone else's gerrit change. Is there a documented proceedure for backing up the engine db so that, after checking out the new code and updating the db schema, I can revert to my old code and DB (schema and data). Thanks! -- Adam Litke IBM Linux Technology Center From lhornyak at redhat.com Mon Apr 2 13:37:12 2012 From: lhornyak at redhat.com (Laszlo Hornyak) Date: Mon, 02 Apr 2012 09:37:12 -0400 (EDT) Subject: [Engine-devel] Backing up the DB In-Reply-To: <20120402132058.GG11957@aglitke.ibm.com> Message-ID: Hi Adam, ----- Original Message ----- > From: "Adam Litke" > To: engine-devel at ovirt.org > Sent: Monday, April 2, 2012 3:20:58 PM > Subject: [Engine-devel] Backing up the DB > > Hi all, > > I have a working development environment for ovirt-engine and I want > to verify > someone else's gerrit change. Is there a documented proceedure for > backing up Not really documented, but at least I do this frequently You have to expect some problems as the hosts still have the old state, so I would recommend to - disable both ssl and host install http://www.ovirt.org/wiki/OVirt_-_disable_SSL_in_VDSM - you may also need to restart your hosts to flush the state (mounts, VM's, etc) the engine pushed it to after db restore And then you can just use the usual postgresql utilities. > the engine db so that, after checking out the new code and updating > the db > schema, I can revert to my old code and DB (schema and data). > Thanks! > > -- > Adam Litke > IBM Linux Technology Center > > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel > From dougsland at redhat.com Mon Apr 2 15:19:23 2012 From: dougsland at redhat.com (Douglas Landgraf) Date: Mon, 02 Apr 2012 11:19:23 -0400 Subject: [Engine-devel] Backing up the DB In-Reply-To: <20120402132058.GG11957@aglitke.ibm.com> References: <20120402132058.GG11957@aglitke.ibm.com> Message-ID: <4F79C37B.3070707@redhat.com> Hi, On 04/02/2012 09:20 AM, Adam Litke wrote: > Hi all, > > I have a working development environment for ovirt-engine and I want to verify > someone else's gerrit change. Is there a documented proceedure for backing up > the engine db so that, after checking out the new code and updating the db > schema, I can revert to my old code and DB (schema and data). Thanks! > Usually I use this tool to backup/restore db: https://github.com/dougsland/misc-rhev/blob/master/rhevm-db-tool.py However, since it's "rhevm" db tool.. need manually change the db name to "engine", I will rename it to engine-db-tool and update the code to 'engine' soon.. -- Cheers Douglas -------------- next part -------------- An HTML attachment was scrubbed... URL: From smizrahi at redhat.com Mon Apr 2 14:36:21 2012 From: smizrahi at redhat.com (Saggi Mizrahi) Date: Mon, 02 Apr 2012 10:36:21 -0400 (EDT) Subject: [Engine-devel] Reloadable Configuration - Wiki Page In-Reply-To: <4F78E0F3.1070000@redhat.com> Message-ID: I'll try and sum up while rebutting as I get confused when mail threads become to long. Your points as I understand them: 1. Moving the configuration to the instance level instead of system level is harder to implement. [A] You are right when you talk about existing codebase, the question is will future configuration be written directly as instance configuration or will we continue abusing the system configuration until it's integrated in. 2. Using the config for system level defaults. [A] Defaults are values that we as developers recommend for options. Letting the user change the defaults is actually letting the user set the value. If you are talking about configuration having a configuration hierarchy. Engine is not a parent objects to pin the hierarchy to as it's not an actual actor in the BL. 3. No need to set until there is an instance level tweak is required. [A] If you set up the configuration hierarchy properly you could have the attribute getters recognize this hierarchy and only have a setter (and the proper db scheme) written when instance level tweaking is required. This way you remove the complexity but keep object relation correctness. My opinion is usually that doing things properly might look like a lot of work now but in the long run you save more time. Further more, you can hide the fact that you are doing things wrong when you lack the time to actually do things properly. VDSM for instance hides global configuration accesses in instance getters and constructors. So even though the configuration is in the wrong place it is modeled in correctly and as we slowly move things the rest of the code isn't (for the most part) doing things like accessing objects configuration directly and other such atrocities. In more practical terms, you could have settings per class\service instead of per instance and later you can actually use this as the basis for a configuration hierarchy. IMO This will be easier to model into the current authentication model, and integrate in. Always remember that one of the pillars of OOP is encapsulation, so even if you decide to keep all the values in one table, it will be smart to still define who owns what values in code instead of having a ConfigurationManager singleton and have everyone access it directly. But again, I'm not as versed in the Engine code as you all are and this might be more complicated than it looks to an outsider. In broader strokes, my personal preference is to have an idea of how you want the configuration to work *ideally* and then start to take concessions due to resource limitations. Instead of just deciding to hack something in and worry about things later. ----- Original Message ----- > From: "Itamar Heim" > To: "Saggi Mizrahi" > Cc: "Doron Fediuck" , engine-devel at ovirt.org > Sent: Sunday, April 1, 2012 7:12:51 PM > Subject: Re: [Engine-devel] Reloadable Configuration - Wiki Page > > On 03/31/2012 12:50 AM, Saggi Mizrahi wrote: > > I'm sorry if I'm moving the conversation sideways a bit but I was > > ill for a few days and missed out on all the fun :). > > The whole debate about permissions is a causing my spidy sense to > > tingle. > > > > My main question is, What are the options you actually want to make > > as engine configuration? > > At least from my experience with VDSM 99% of the configuration > > options we have shouldn't be VDSM configuration but instance > > attributes. > > I don't think we should start by making every config variable at > instance level. > the config table allows system level defaults, which are easy to > handle/manage. > where there is sufficient need to create an instance level tweak, it > is > usually done with due consideration to making it a feature, which is > usually a lengthier process. > > > > > To illustrate, the interval where you check liveness of hosts is > > not actually an Engine setting but a cluster or a host attribute. > > It should be set using the UI and the permissions to set it should > > be related to general permission on the object. > > The interval in which to check for storage liveness is a data > > center setting, not an Engine setting as well. > > true, but apparently so far there wasn't a need to tweak it at DC or > cluster level, and engine level was good enough. > best is sometimes enemy of good. > and adding a lot of configurable options at entity level doesn't > necessarily make things simpler for admins to understand. > > so i agree some options should be at instance level, but only when > there > is a good enough reason to do so. > > > > > In general most options in a system are tied to object instances. > > The only things that I can think of that are actual Engine > > configurations are DB location, memory settings of the JVM and > > other technical details that should be accessible and set by the > > local root user only. This is also why I thought it shouldn't be > > in the DB, because if it's in the DB it's actually shared between > > installation and it's like sharing apache's "max thread num" > > setting between hosts with different capabilities. > > > > Technical limitations like not being able to update quartz tasks > > once they've been initiated should be circumvented or abstracted > > but not designed around. > > > > ----- Original Message ----- > >> From: "Doron Fediuck" > >> To: "Itamar Heim" > >> Cc: engine-devel at ovirt.org > >> Sent: Thursday, March 29, 2012 8:42:05 AM > >> Subject: Re: [Engine-devel] Reloadable Configuration - Wiki Page > >> > >> On 29/03/12 12:13, Itamar Heim wrote: > >>> On 03/29/2012 11:59 AM, Doron Fediuck wrote: > >>>> On 29/03/12 10:54, Itamar Heim wrote: > >>>>> On 03/29/2012 10:05 AM, Muli Salem wrote: > >>>>>> Thanks for the comments, I updated the wiki page accordingly: > >>>>>> http://www.ovirt.org/wiki/Features/ReloadableConfiguration > >>>>>> > >>>>>> 1. Instead of the new DB column is_reloadable --> > >>>>>> Annotation > >>>>>> to ConfigValues. > >>>>>> 2. Found a way to update the Quartz jobs, at least basic > >>>>>> issues > >>>>>> such as interval size. > >>>>>> 3. The values will be reloaded upon admin's decision to do so > >>>>>> - > >>>>>> with a new command in the engine-config CLI, since that is > >>>>>> where admins make the changes. > >>>>> > >>>>> just wondering - how will the CLI do this at the technical > >>>>> level > >>>>> (via REST API? signal to service, etc.)? > >>>> > >>>> Basically we need a script using the REST sdk to trigger > >>>> re-configuration > >>>> This script will need the engine's IP so it'll know where to > >>>> find > >>>> it. > >>>> The thing is, REST also needs the admin's user and password to > >>>> run... > >>>> > >>>> We can get it in 2 options: > >>>> > >>>> 1. Store Admin's user+pass in the engine's conf file. > >>>> 2. Use engine-config to fetch the credentials. > >>>> > >>>> Once we have credentials, we can use it with a new script to > >>>> trigger configuration reload. > >>>> We can also incorporate this script into engine-config so admin > >>>> won't need to know another > >>>> script, and simply use a 'reload' verb. > >>>> > >>>> I'm not keen on storing the credentials in a conf' file, but > >>>> (unfortunately) it wouldn't > >>>> be a first time. Any better alternative is welcome (just as > >>>> patches ;-). > >>> > >>> true. > >>> > >>>> > >>>> A simple alternative to the whole credentials and IP need, > >>>> is a simple periodic reload, as suggested initially. > >>> > >>> > >> Any thoughts on this? > >> > >>> > >>>> > >>>> /d > >>> > >>> isn't there some way to send a process signal or something like > >>> that (not allowing remote access, but i think it uses the db > >>> crednetials from a local file anyway, and i don't think running > >>> config remotely is a must) > >>> > >> Simply signaling a process such as "kill TRAP PID" is problematic > >> since: > >> - The engine core is a web-app on top of JBoss, how do we know > >> which > >> pid to trigger? > >> - What happens if JBoss isn't running / using nohup / ... ? > >> > >>> other options: > >>> 1. require user to provide user/password (kind of funny for > >>> running > >>> manage-domains utility, but possible > >> This will make service xxx reload pointless, unless we decide to > >> drop > >> it and reduce to a simple > >> script (embedded or not in the config utility). > >> > >>> 2. use a way on the host to send a signal (change a file, process > >>> signal, etc.) > >> Great. This means we need to poll a folder or similar (DB)... > >> sounds > >> familiar? > >> See above the periodic reload. We can do it better if we look for > >> a > >> key in the DB > >> (enableReconfigure=true), to avoid reloading in the middle of an > >> update process > >> of several keys. We still need to be careful from concurrency, but > >> I > >> have solutions > >> for this as well (do not allow updates to vdc_options until the > >> key > >> becomes false again, > >> also set it to false on initial boot). > >> > >>> > >> 3. Write a simple public reload servlet (maybe limit to local host > >> only?), which > >> we can call using simple curl http://xxx/reload? > >> > >> As I see it now, > >> I'd go for one of the following (in this order)- > >> 2: periodically poll DB, reload only when allowed. > >> 3: local servlet. > >> > >> Thoughts? > >> Better solutions? > >> _______________________________________________ > >> Engine-devel mailing list > >> Engine-devel at ovirt.org > >> http://lists.ovirt.org/mailman/listinfo/engine-devel > >> > > From tjelinek at redhat.com Tue Apr 3 07:17:26 2012 From: tjelinek at redhat.com (Tomas Jelinek) Date: Tue, 03 Apr 2012 03:17:26 -0400 (EDT) Subject: [Engine-devel] Storage Domain level 3 In-Reply-To: Message-ID: Hi all, this is about supporting of I18N (https://bugzilla.redhat.com/show_bug.cgi?id=786448). The VDSM already supports it, but only for storage domain level 3. >From Dan Kenigsberg's mail: "I hope ovirt-Engine learns to do storage domain upgrade, and uses level 3, so that this feature can be used." So, how is it with supporting this in the engine? Thank you, Tomas From iheim at redhat.com Tue Apr 3 09:02:37 2012 From: iheim at redhat.com (Itamar Heim) Date: Tue, 03 Apr 2012 12:02:37 +0300 Subject: [Engine-devel] Storage Domain level 3 In-Reply-To: References: Message-ID: <4F7ABCAD.20602@redhat.com> On 04/03/2012 10:17 AM, Tomas Jelinek wrote: > Hi all, > > this is about supporting of I18N (https://bugzilla.redhat.com/show_bug.cgi?id=786448). a better URL to cover this would be the wiki: http://www.ovirt.org/wiki/Features/I18N > > The VDSM already supports it, but only for storage domain level 3. > > From Dan Kenigsberg's mail: > "I hope ovirt-Engine learns to do storage domain upgrade, and uses level > 3, so that this feature can be used." > > So, how is it with supporting this in the engine? > > Thank you, > Tomas > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel From emesika at redhat.com Tue Apr 3 09:05:19 2012 From: emesika at redhat.com (Eli Mesika) Date: Tue, 03 Apr 2012 05:05:19 -0400 (EDT) Subject: [Engine-devel] Backing up the DB In-Reply-To: <4F79C37B.3070707@redhat.com> Message-ID: ----- Original Message ----- > From: "Douglas Landgraf" > To: "Adam Litke" > Cc: engine-devel at ovirt.org, "Douglas Landgraf" > Sent: Monday, April 2, 2012 6:19:23 PM > Subject: Re: [Engine-devel] Backing up the DB > > > Hi, > > On 04/02/2012 09:20 AM, Adam Litke wrote: > > Hi all, > > I have a working development environment for ovirt-engine and I want > to verify > someone else's gerrit change. Is there a documented proceedure for > backing up > the engine db so that, after checking out the new code and updating > the db > schema, I can revert to my old code and DB (schema and data). You can use pg_dump for backup and psql for restore : backup: pg_dump -C -E UTF8 --column-inserts --disable-dollar-quoting --disable-triggers -U postgres --format=p -f restore: psql -U postgres -f template1 > Thanks! Usually I use this tool to backup/restore db: > https://github.com/dougsland/misc-rhev/blob/master/rhevm-db-tool.py > > However, since it's "rhevm" db tool.. need manually change the db > name to "engine", > I will rename it to engine-db-tool and update the code to 'engine' > soon.. > > -- > Cheers > Douglas > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel > From lpeer at redhat.com Tue Apr 3 09:10:57 2012 From: lpeer at redhat.com (Livnat Peer) Date: Tue, 03 Apr 2012 12:10:57 +0300 Subject: [Engine-devel] Backing up the DB In-Reply-To: References: Message-ID: <4F7ABEA1.6030409@redhat.com> On 03/04/12 12:05, Eli Mesika wrote: > > > ----- Original Message ----- >> From: "Douglas Landgraf" >> To: "Adam Litke" >> Cc: engine-devel at ovirt.org, "Douglas Landgraf" >> Sent: Monday, April 2, 2012 6:19:23 PM >> Subject: Re: [Engine-devel] Backing up the DB >> >> >> Hi, >> >> On 04/02/2012 09:20 AM, Adam Litke wrote: >> >> Hi all, >> >> I have a working development environment for ovirt-engine and I want >> to verify >> someone else's gerrit change. Is there a documented proceedure for >> backing up >> the engine db so that, after checking out the new code and updating >> the db >> schema, I can revert to my old code and DB (schema and data). > > You can use pg_dump for backup and psql for restore : > > backup: > pg_dump -C -E UTF8 --column-inserts --disable-dollar-quoting --disable-triggers -U postgres --format=p -f > > restore: > psql -U postgres -f template1 > > Eli, Can we have a script for backup and restore DB in the repo? I see we have backup_db.sql any use of it? Thanks, Livnat > >> Thanks! Usually I use this tool to backup/restore db: >> https://github.com/dougsland/misc-rhev/blob/master/rhevm-db-tool.py >> >> However, since it's "rhevm" db tool.. need manually change the db >> name to "engine", >> I will rename it to engine-db-tool and update the code to 'engine' >> soon.. >> >> -- >> Cheers >> Douglas >> _______________________________________________ >> Engine-devel mailing list >> Engine-devel at ovirt.org >> http://lists.ovirt.org/mailman/listinfo/engine-devel >> > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel From dfediuck at redhat.com Tue Apr 3 15:10:44 2012 From: dfediuck at redhat.com (Doron Fediuck) Date: Tue, 03 Apr 2012 18:10:44 +0300 Subject: [Engine-devel] Please review: All In One Feature page In-Reply-To: <5e18cd82-6d9e-4dc3-b2e4-874053a3b8d7@zmail12.collab.prod.int.phx2.redhat.com> References: <5e18cd82-6d9e-4dc3-b2e4-874053a3b8d7@zmail12.collab.prod.int.phx2.redhat.com> Message-ID: <4F7B12F4.5020805@redhat.com> On 01/04/12 12:09, Alex Lourie wrote: > Hi All > > I've written a new wiki page [1] for a feature we've developed, called All in One. This allows configuring VDSM on the same host with rhevm (ovirt) automatically during setup. > > Please review and provide feedback :-) > > Thanks > > [1] http://www.ovirt.org/wiki/Feature/AllInOne > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel One thing I noticed is that you plan to install engine-core, and then add the host using REST (sdk). Please note that prior to starting JBoss you need to create the ovirtmgmt bridge. If it doesn't exist when you add the host, then it'll be created and network may be corrupted, especially with JBoss up & running over it. From dougsland at redhat.com Tue Apr 3 20:10:46 2012 From: dougsland at redhat.com (Douglas Landgraf) Date: Tue, 03 Apr 2012 16:10:46 -0400 Subject: [Engine-devel] Backing up the DB In-Reply-To: <4F7ABEA1.6030409@redhat.com> References: <4F7ABEA1.6030409@redhat.com> Message-ID: <4F7B5946.7010108@redhat.com> On 04/03/2012 05:10 AM, Livnat Peer wrote: > On 03/04/12 12:05, Eli Mesika wrote: >> >> ----- Original Message ----- >>> From: "Douglas Landgraf" >>> To: "Adam Litke" >>> Cc: engine-devel at ovirt.org, "Douglas Landgraf" >>> Sent: Monday, April 2, 2012 6:19:23 PM >>> Subject: Re: [Engine-devel] Backing up the DB >>> >>> >>> Hi, >>> >>> On 04/02/2012 09:20 AM, Adam Litke wrote: >>> >>> Hi all, >>> >>> I have a working development environment for ovirt-engine and I want >>> to verify >>> someone else's gerrit change. Is there a documented proceedure for >>> backing up >>> the engine db so that, after checking out the new code and updating >>> the db >>> schema, I can revert to my old code and DB (schema and data). >> You can use pg_dump for backup and psql for restore : >> >> backup: >> pg_dump -C -E UTF8 --column-inserts --disable-dollar-quoting --disable-triggers -U postgres --format=p -f >> >> restore: >> psql -U postgres -f template1 >> >> > Eli, > Can we have a script for backup and restore DB in the repo? > > I see we have backup_db.sql any use of it? > If you guys are interested, I have updated the tool to work with systemctl/enginedb and tested under Fedora 16: Here my use: # mkdir /engine-backup-db # chmod +x engine-db-tool.py backup manually ============= ./engine-db-tool.py --backup --path=/engine-db-backup Stopping jboss-as service... Backuping database: /engine-db-backup/dump_RHEVDB_BACKUP_2012-04-03-15:05.sql Starting jboss-as service... Done restore manually ============= # ./engine-db-tool.py --restore --path=/engine-db-backup/dump_RHEVDB_BACKUP_2012-04-03-15:05.sql Stopping jboss-as service... Restoring database: /engine-db-backup/dump_RHEVDB_BACKUP_2012-04-03-15:05.sql Starting jboss-as service... Done Crontab ======= # crontab -e (adding to my crontab user) # Every day 18:00 backup db 00 18 * * * /path-to/engine-db-tool.py --backup --path=/engine-backup-db Download: https://raw.github.com/dougsland/misc-rhev/master/engine-db-tool.py Thanks! -- Cheers Douglas -------------- next part -------------- An HTML attachment was scrubbed... URL: From agl at us.ibm.com Tue Apr 3 22:03:26 2012 From: agl at us.ibm.com (Adam Litke) Date: Tue, 3 Apr 2012 17:03:26 -0500 Subject: [Engine-devel] VDSM REST API Message-ID: <20120403220326.GC10117@aglitke> Hi all, At the oVirt Workshop in Beijing I learned about how the ovirt-shell dynamically discovers: the collections, resource schemas, and allowed actions based on an RSDL file and API xsd schema. I am working on a REST API for vdsm and would like to make my API compatible with the ovirt-engine api such that the same ovirt-shell program could work with either the engine api or the vdsm api. There are many differences between ovirt-engine and vdsm (namely that one is implemented in Java and the other in Python). I think the easiest way to test whether this is possible is to try and create a new, minimalist REST service with python Cherrypy. Such a service would have a root URL with no collections or actions. From my understanding I will need to write the following files: /api - A basic XML representation of the API root resource /api?schema - An xsd that describes the simple API /api?rsdl - An rsdl (XML file) that describes the available links for /api, I want to start with something dead-simple: Hello from vdsm! Once I can use ovirt-shell to list messages and show messages I will be happy to build on it. Can anyone help me figure out the minimal xsd and rsdl that would be needed for such an API to be consumable by ovirt-shell? Thanks for your help! -- Adam Litke IBM Linux Technology Center From yzaslavs at redhat.com Wed Apr 4 06:16:15 2012 From: yzaslavs at redhat.com (Yair Zaslavsky) Date: Wed, 04 Apr 2012 09:16:15 +0300 Subject: [Engine-devel] Backing up the DB In-Reply-To: <4F7B5946.7010108@redhat.com> References: <4F7ABEA1.6030409@redhat.com> <4F7B5946.7010108@redhat.com> Message-ID: <4F7BE72F.4000204@redhat.com> On 04/03/2012 11:10 PM, Douglas Landgraf wrote: > On 04/03/2012 05:10 AM, Livnat Peer wrote: >> On 03/04/12 12:05, Eli Mesika wrote: Eli - maybe we can take the script of Douglas and add it to the git repo? >>> >>> ----- Original Message ----- >>>> From: "Douglas Landgraf" >>>> To: "Adam Litke" >>>> Cc: engine-devel at ovirt.org, "Douglas Landgraf" >>>> Sent: Monday, April 2, 2012 6:19:23 PM >>>> Subject: Re: [Engine-devel] Backing up the DB >>>> >>>> >>>> Hi, >>>> >>>> On 04/02/2012 09:20 AM, Adam Litke wrote: >>>> >>>> Hi all, >>>> >>>> I have a working development environment for ovirt-engine and I want >>>> to verify >>>> someone else's gerrit change. Is there a documented proceedure for >>>> backing up >>>> the engine db so that, after checking out the new code and updating >>>> the db >>>> schema, I can revert to my old code and DB (schema and data). >>> You can use pg_dump for backup and psql for restore : >>> >>> backup: >>> pg_dump -C -E UTF8 --column-inserts --disable-dollar-quoting --disable-triggers -U postgres --format=p -f >>> >>> restore: >>> psql -U postgres -f template1 >>> >>> >> Eli, >> Can we have a script for backup and restore DB in the repo? >> >> I see we have backup_db.sql any use of it? >> > If you guys are interested, I have updated the tool to work with > systemctl/enginedb and tested under Fedora 16: > > Here my use: > > # mkdir /engine-backup-db > # chmod +x engine-db-tool.py > > backup manually > ============= > ./engine-db-tool.py --backup --path=/engine-db-backup > Stopping jboss-as service... > Backuping database: > /engine-db-backup/dump_RHEVDB_BACKUP_2012-04-03-15:05.sql > Starting jboss-as service... > Done > > > restore manually > ============= > # ./engine-db-tool.py --restore > --path=/engine-db-backup/dump_RHEVDB_BACKUP_2012-04-03-15:05.sql > Stopping jboss-as service... > Restoring database: > /engine-db-backup/dump_RHEVDB_BACKUP_2012-04-03-15:05.sql > Starting jboss-as service... > Done > > > Crontab > ======= > # crontab -e (adding to my crontab user) > > # Every day 18:00 backup db > 00 18 * * * /path-to/engine-db-tool.py --backup --path=/engine-backup-db > > > Download: > https://raw.github.com/dougsland/misc-rhev/master/engine-db-tool.py > > Thanks! > > -- > Cheers > Douglas > > > > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel From yzaslavs at redhat.com Wed Apr 4 06:18:00 2012 From: yzaslavs at redhat.com (Yair Zaslavsky) Date: Wed, 04 Apr 2012 09:18:00 +0300 Subject: [Engine-devel] Backing up the DB In-Reply-To: <4F7BE72F.4000204@redhat.com> References: <4F7ABEA1.6030409@redhat.com> <4F7B5946.7010108@redhat.com> <4F7BE72F.4000204@redhat.com> Message-ID: <4F7BE798.8090705@redhat.com> On 04/04/2012 09:16 AM, Yair Zaslavsky wrote: > On 04/03/2012 11:10 PM, Douglas Landgraf wrote: >> On 04/03/2012 05:10 AM, Livnat Peer wrote: >>> On 03/04/12 12:05, Eli Mesika wrote: > > Eli - maybe we can take the script of Douglas and add it to the git repo? Actually, I'll correct myself - I think we should produce a bash version of it. What do you think? > >>>> >>>> ----- Original Message ----- >>>>> From: "Douglas Landgraf" >>>>> To: "Adam Litke" >>>>> Cc: engine-devel at ovirt.org, "Douglas Landgraf" >>>>> Sent: Monday, April 2, 2012 6:19:23 PM >>>>> Subject: Re: [Engine-devel] Backing up the DB >>>>> >>>>> >>>>> Hi, >>>>> >>>>> On 04/02/2012 09:20 AM, Adam Litke wrote: >>>>> >>>>> Hi all, >>>>> >>>>> I have a working development environment for ovirt-engine and I want >>>>> to verify >>>>> someone else's gerrit change. Is there a documented proceedure for >>>>> backing up >>>>> the engine db so that, after checking out the new code and updating >>>>> the db >>>>> schema, I can revert to my old code and DB (schema and data). >>>> You can use pg_dump for backup and psql for restore : >>>> >>>> backup: >>>> pg_dump -C -E UTF8 --column-inserts --disable-dollar-quoting --disable-triggers -U postgres --format=p -f >>>> >>>> restore: >>>> psql -U postgres -f template1 >>>> >>>> >>> Eli, >>> Can we have a script for backup and restore DB in the repo? >>> >>> I see we have backup_db.sql any use of it? >>> >> If you guys are interested, I have updated the tool to work with >> systemctl/enginedb and tested under Fedora 16: >> >> Here my use: >> >> # mkdir /engine-backup-db >> # chmod +x engine-db-tool.py >> >> backup manually >> ============= >> ./engine-db-tool.py --backup --path=/engine-db-backup >> Stopping jboss-as service... >> Backuping database: >> /engine-db-backup/dump_RHEVDB_BACKUP_2012-04-03-15:05.sql >> Starting jboss-as service... >> Done >> >> >> restore manually >> ============= >> # ./engine-db-tool.py --restore >> --path=/engine-db-backup/dump_RHEVDB_BACKUP_2012-04-03-15:05.sql >> Stopping jboss-as service... >> Restoring database: >> /engine-db-backup/dump_RHEVDB_BACKUP_2012-04-03-15:05.sql >> Starting jboss-as service... >> Done >> >> >> Crontab >> ======= >> # crontab -e (adding to my crontab user) >> >> # Every day 18:00 backup db >> 00 18 * * * /path-to/engine-db-tool.py --backup --path=/engine-backup-db >> >> >> Download: >> https://raw.github.com/dougsland/misc-rhev/master/engine-db-tool.py >> >> Thanks! >> >> -- >> Cheers >> Douglas >> >> >> >> _______________________________________________ >> Engine-devel mailing list >> Engine-devel at ovirt.org >> http://lists.ovirt.org/mailman/listinfo/engine-devel > > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel From eedri at redhat.com Wed Apr 4 06:54:46 2012 From: eedri at redhat.com (Eyal Edri) Date: Wed, 04 Apr 2012 02:54:46 -0400 (EDT) Subject: [Engine-devel] [Jenkins] Warning - the following commits inserted 2 new HIGH priority bugs into into engine code In-Reply-To: <80e5a292-81a7-45fa-8e01-ccddbaf8dbdd@zmail17.collab.prod.int.phx2.redhat.com> Message-ID: <1c5e2b63-a538-4f04-95c4-e1aa1df8a226@zmail17.collab.prod.int.phx2.redhat.com> core: Ovirt-engin-backend: Run Once does not send Attach CD/Floppy (detail / gitweb) webadmin: Changing a call at webamin from UpdateVmDiskCommand to HotPlug/HotUnPlugCommand (detail / gitweb) core : Changes for required error messages in order to supposrt a new commands (detail / gitweb) core : Introducing HotPlug and HotUnplug commands (detail / gitweb) url: http://jenkins.ovirt.org/job/ovirt_engine_find_bugs/491/ Both in class: VmInfoBuilder.java http://jenkins.ovirt.org/job/ovirt_engine_find_bugs/491/findbugsResult/new/HIGH/? Please check, Eyal Edri oVirt Infra Team From alourie at redhat.com Wed Apr 4 08:00:18 2012 From: alourie at redhat.com (Alex Lourie) Date: Wed, 04 Apr 2012 11:00:18 +0300 Subject: [Engine-devel] Please review: All In One Feature page In-Reply-To: <4F7B12F4.5020805@redhat.com> References: <5e18cd82-6d9e-4dc3-b2e4-874053a3b8d7@zmail12.collab.prod.int.phx2.redhat.com> <4F7B12F4.5020805@redhat.com> Message-ID: <4F7BFF92.3010004@redhat.com> On Tue 03 Apr 2012 06:10:44 PM IDT, Doron Fediuck wrote: > On 01/04/12 12:09, Alex Lourie wrote: >> Hi All >> >> I've written a new wiki page [1] for a feature we've developed, called All in One. This allows configuring VDSM on the same host with rhevm (ovirt) automatically during setup. >> >> Please review and provide feedback :-) >> >> Thanks >> >> [1] http://www.ovirt.org/wiki/Feature/AllInOne >> _______________________________________________ >> Engine-devel mailing list >> Engine-devel at ovirt.org >> http://lists.ovirt.org/mailman/listinfo/engine-devel > > One thing I noticed is that you plan to install engine-core, > and then add the host using REST (sdk). Please note that > prior to starting JBoss you need to create the ovirtmgmt > bridge. If it doesn't exist when you add the host, then > it'll be created and network may be corrupted, especially > with JBoss up& running over it. As far as I've seen in testing, the creation of the bridge was working fine. And why would it be different between automatic and manual creation of the host? -- Alex Lourie. From dfediuck at redhat.com Wed Apr 4 11:10:59 2012 From: dfediuck at redhat.com (Doron Fediuck) Date: Wed, 04 Apr 2012 14:10:59 +0300 Subject: [Engine-devel] Please review: All In One Feature page In-Reply-To: <4F7BFF92.3010004@redhat.com> References: <5e18cd82-6d9e-4dc3-b2e4-874053a3b8d7@zmail12.collab.prod.int.phx2.redhat.com> <4F7B12F4.5020805@redhat.com> <4F7BFF92.3010004@redhat.com> Message-ID: <4F7C2C43.8070606@redhat.com> So far, no one created a bridge under JBoss' legs while it's up & running. Bridge creation happens on hosts and not in the engine-core machine. So up until now we had JBoss up & running in his machine, and when it installed a new host, a script would run on that new host to change networking for the new bridge to be created. During this time JBoss is monitoring the process from a (safe) distance. Now, an web-app running on top of JBoss (you may know it as engine-core) is doing network changes while the app-server (JBoss...) is running and listens to 0.0.0.0 and maybe locally as well to specific ports. In this situation network changes should happen only if you /know/ it's safe, or even better- do it /before/ starting JBoss. So when JBoss starts network should be stable. On 04/04/12 11:00, Alex Lourie wrote: > On Tue 03 Apr 2012 06:10:44 PM IDT, Doron Fediuck wrote: >> On 01/04/12 12:09, Alex Lourie wrote: >>> Hi All >>> >>> I've written a new wiki page [1] for a feature we've developed, called All in One. This allows configuring VDSM on the same host with rhevm (ovirt) automatically during setup. >>> >>> Please review and provide feedback :-) >>> >>> Thanks >>> >>> [1] http://www.ovirt.org/wiki/Feature/AllInOne >>> _______________________________________________ >>> Engine-devel mailing list >>> Engine-devel at ovirt.org >>> http://lists.ovirt.org/mailman/listinfo/engine-devel >> >> One thing I noticed is that you plan to install engine-core, >> and then add the host using REST (sdk). Please note that >> prior to starting JBoss you need to create the ovirtmgmt >> bridge. If it doesn't exist when you add the host, then >> it'll be created and network may be corrupted, especially >> with JBoss up& running over it. > > As far as I've seen in testing, the creation of the bridge was working fine. And why would it be different between automatic and manual creation of the host? > > -- > Alex Lourie. > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel -- /d Why doesn't DOS ever say "EXCELLENT command or filename!" From dfediuck at redhat.com Wed Apr 4 11:47:44 2012 From: dfediuck at redhat.com (Doron Fediuck) Date: Wed, 04 Apr 2012 14:47:44 +0300 Subject: [Engine-devel] VDSM REST API In-Reply-To: <20120403220326.GC10117@aglitke> References: <20120403220326.GC10117@aglitke> Message-ID: <4F7C34E0.70003@redhat.com> Hi Adam, Just adding vdsm devel list, so vdsm folks will be apart of this thread. On 04/04/12 01:03, Adam Litke wrote: > Hi all, > > At the oVirt Workshop in Beijing I learned about how the ovirt-shell dynamically > discovers: the collections, resource schemas, and allowed actions based on an > RSDL file and API xsd schema. I am working on a REST API for vdsm and would > like to make my API compatible with the ovirt-engine api such that the same > ovirt-shell program could work with either the engine api or the vdsm api. > > There are many differences between ovirt-engine and vdsm (namely that one is > implemented in Java and the other in Python). I think the easiest way to test > whether this is possible is to try and create a new, minimalist REST service with > python Cherrypy. Such a service would have a root URL with no collections or > actions. From my understanding I will need to write the following files: > > /api - A basic XML representation of the API root resource > /api?schema - An xsd that describes the simple API > /api?rsdl - An rsdl (XML file) that describes the available links > > for /api, I want to start with something dead-simple: > > > > > > Hello from vdsm! > > > > > Once I can use ovirt-shell to list messages and show messages I will be happy to > build on it. Can anyone help me figure out the minimal xsd and rsdl that would > be needed for such an API to be consumable by ovirt-shell? Thanks for your > help! > -- /d Why doesn't DOS ever say "EXCELLENT command or filename!" From dougsland at redhat.com Wed Apr 4 13:07:06 2012 From: dougsland at redhat.com (Douglas Landgraf) Date: Wed, 04 Apr 2012 09:07:06 -0400 Subject: [Engine-devel] Backing up the DB In-Reply-To: <4F7BE798.8090705@redhat.com> References: <4F7ABEA1.6030409@redhat.com> <4F7B5946.7010108@redhat.com> <4F7BE72F.4000204@redhat.com> <4F7BE798.8090705@redhat.com> Message-ID: <4F7C477A.4060301@redhat.com> On 04/04/2012 02:18 AM, Yair Zaslavsky wrote: > On 04/04/2012 09:16 AM, Yair Zaslavsky wrote: >> On 04/03/2012 11:10 PM, Douglas Landgraf wrote: >>> On 04/03/2012 05:10 AM, Livnat Peer wrote: >>>> On 03/04/12 12:05, Eli Mesika wrote: >> Eli - maybe we can take the script of Douglas and add it to the git repo? > Actually, I'll correct myself - I think we should produce a bash version > of it. What do you think? IMHO, it's not required to convert to bash since we have others oVirt tools already in python. Anyway, I have documented all steps here (with or without tool): http://ovirt.org/w/index.php?title=Backup_engine_db Would be nice to have such tool available when we install a ovirt engine system. Thanks! -- Cheers Douglas -------------- next part -------------- An HTML attachment was scrubbed... URL: From oschreib at redhat.com Thu Apr 5 08:27:50 2012 From: oschreib at redhat.com (Ofer Schreiber) Date: Thu, 05 Apr 2012 04:27:50 -0400 (EDT) Subject: [Engine-devel] Backing up the DB In-Reply-To: <4F7C477A.4060301@redhat.com> Message-ID: <8e265a23-419d-417e-9a11-a7547f9f6c91@zmail14.collab.prod.int.phx2.redhat.com> We already have the backup code in python - under engine-cleanup What about using the same code-base? or adding --backup-db-only to engine-cleaup? ----- Original Message ----- > On 04/04/2012 02:18 AM, Yair Zaslavsky wrote: > > On 04/04/2012 09:16 AM, Yair Zaslavsky wrote: > > > > On 04/03/2012 11:10 PM, Douglas Landgraf wrote: > > > > > > > On 04/03/2012 05:10 AM, Livnat Peer wrote: > > > > > > > > > > > On 03/04/12 12:05, Eli Mesika wrote: > > > > > > > > > > > > > Eli - maybe we can take the script of Douglas and add it to the > > > git > > > repo? > > > > > Actually, I'll correct myself - I think we should produce a bash > > version > > > of it. What do you think? > > IMHO, it's not required to convert to bash since we have others oVirt > tools already in python. > Anyway, I have documented all steps here (with or without tool): > http://ovirt.org/w/index.php?title=Backup_engine_db > Would be nice to have such tool available when we install a ovirt > engine system. > Thanks! > -- > Cheers > Douglas > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryanh at us.ibm.com Thu Apr 5 15:27:19 2012 From: ryanh at us.ibm.com (Ryan Harper) Date: Thu, 5 Apr 2012 10:27:19 -0500 Subject: [Engine-devel] qemu machine type / datacenter machine version Message-ID: <20120405152719.GB25807@us.ibm.com> I was playing around with ovirt-engine datacenter definitions and I seems that the capatibility version in the gui controls the qemu machine type specified (3.0 -> pc-0.14). I was wondering where that's configured setup. I grepped through my deployed system and saw a hit here: [root at f16-engine ovirt-engine]# rpm -qf /usr/share/ovirt-engine ovirt-engine-3.0.0_0001-1.2.fc16.x86_64 [root at f16-engine ovirt-engine]# grep -nri "pc-0.14" * db-backups/tmprN1EDt.sql:12119:INSERT INTO vdc_options (option_id, option_name, option_value, version) VALUES (236, 'EmulatedMachine', 'pc-0.14', '3.0'); db-backups/tmpj4XRCI.sql:12138:INSERT INTO vdc_options (option_id, option_name, option_value, version) VALUES (236, 'EmulatedMachine', 'pc-0.14', '3.0'); dbscripts/upgrade/03_00_0530_update_EmulatedMachine_config_to_pc.sql:2:select fn_db_update_config_value('EmulatedMachine','pc-0.14','3.0'); dbscripts/create_db.sh.log:7571:select fn_db_update_config_value('EmulatedMachine','pc-0.14','3.0'); dbscripts/create_db.sh.log:25529:select fn_db_update_config_value('EmulatedMachine','pc-0.14','3.0'); dbscripts/create_db.sh.log:43487:select fn_db_update_config_value('EmulatedMachine','pc-0.14','3.0'); Is there any way to define different compatibiilty versions or edit that? If I've got a new end-point running qemu-kvm that doesn't have pc-0.14 defined (Say RHEL6.x) the machines won't lauch when you specific -M pc-0.14. Thoughts? -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx ryanh at us.ibm.com From iheim at redhat.com Thu Apr 5 17:14:26 2012 From: iheim at redhat.com (Itamar Heim) Date: Thu, 05 Apr 2012 20:14:26 +0300 Subject: [Engine-devel] qemu machine type / datacenter machine version In-Reply-To: <20120405152719.GB25807@us.ibm.com> References: <20120405152719.GB25807@us.ibm.com> Message-ID: <4F7DD2F2.303@redhat.com> On 04/05/2012 06:27 PM, Ryan Harper wrote: > I was playing around with ovirt-engine datacenter definitions and I > seems that the capatibility version in the gui controls the qemu machine > type specified (3.0 -> pc-0.14). I was wondering where that's > configured setup. > > I grepped through my deployed system and saw a hit here: > > [root at f16-engine ovirt-engine]# rpm -qf /usr/share/ovirt-engine > ovirt-engine-3.0.0_0001-1.2.fc16.x86_64 > [root at f16-engine ovirt-engine]# grep -nri "pc-0.14" * > db-backups/tmprN1EDt.sql:12119:INSERT INTO vdc_options (option_id, option_name, option_value, version) VALUES (236, 'EmulatedMachine', 'pc-0.14', '3.0'); > db-backups/tmpj4XRCI.sql:12138:INSERT INTO vdc_options (option_id, option_name, option_value, version) VALUES (236, 'EmulatedMachine', 'pc-0.14', '3.0'); > dbscripts/upgrade/03_00_0530_update_EmulatedMachine_config_to_pc.sql:2:select fn_db_update_config_value('EmulatedMachine','pc-0.14','3.0'); > dbscripts/create_db.sh.log:7571:select fn_db_update_config_value('EmulatedMachine','pc-0.14','3.0'); > dbscripts/create_db.sh.log:25529:select fn_db_update_config_value('EmulatedMachine','pc-0.14','3.0'); > dbscripts/create_db.sh.log:43487:select fn_db_update_config_value('EmulatedMachine','pc-0.14','3.0'); > > Is there any way to define different compatibiilty versions or edit that? If I've got a new end-point running qemu-kvm that doesn't have pc-0.14 defined (Say RHEL6.x) the machines won't lauch when you specific -M pc-0.14. > > Thoughts? > > check this and reply to it: http://lists.ovirt.org/pipermail/users/2012-March/001439.html From dougsland at redhat.com Thu Apr 5 19:57:15 2012 From: dougsland at redhat.com (Douglas Landgraf) Date: Thu, 05 Apr 2012 15:57:15 -0400 Subject: [Engine-devel] Backing up the DB In-Reply-To: <8e265a23-419d-417e-9a11-a7547f9f6c91@zmail14.collab.prod.int.phx2.redhat.com> References: <8e265a23-419d-417e-9a11-a7547f9f6c91@zmail14.collab.prod.int.phx2.redhat.com> Message-ID: <4F7DF91B.1020006@redhat.com> Hi, On 04/05/2012 04:27 AM, Ofer Schreiber wrote: > We already have the backup code in python - under engine-cleanup > What about using the same code-base? > or adding --backup-db-only to engine-cleaup? From my point of view, it's ok. If we are going to use engine-cleanup, let's keep in mind the restore mode too. For while, I will use engine-db-tool that's already ready. -- Cheers Douglas -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlaor at redhat.com Thu Apr 5 21:43:23 2012 From: dlaor at redhat.com (Dor Laor) Date: Fri, 06 Apr 2012 00:43:23 +0300 Subject: [Engine-devel] qemu machine type / datacenter machine version In-Reply-To: <4F7DD2F2.303@redhat.com> References: <20120405152719.GB25807@us.ibm.com> <4F7DD2F2.303@redhat.com> Message-ID: <4F7E11FB.9080403@redhat.com> On 04/05/2012 08:14 PM, Itamar Heim wrote: > On 04/05/2012 06:27 PM, Ryan Harper wrote: >> I was playing around with ovirt-engine datacenter definitions and I >> seems that the capatibility version in the gui controls the qemu machine >> type specified (3.0 -> pc-0.14). I was wondering where that's >> configured setup. >> >> I grepped through my deployed system and saw a hit here: >> >> [root at f16-engine ovirt-engine]# rpm -qf /usr/share/ovirt-engine >> ovirt-engine-3.0.0_0001-1.2.fc16.x86_64 >> [root at f16-engine ovirt-engine]# grep -nri "pc-0.14" * >> db-backups/tmprN1EDt.sql:12119:INSERT INTO vdc_options (option_id, >> option_name, option_value, version) VALUES (236, 'EmulatedMachine', >> 'pc-0.14', '3.0'); >> db-backups/tmpj4XRCI.sql:12138:INSERT INTO vdc_options (option_id, >> option_name, option_value, version) VALUES (236, 'EmulatedMachine', >> 'pc-0.14', '3.0'); >> dbscripts/upgrade/03_00_0530_update_EmulatedMachine_config_to_pc.sql:2:select >> fn_db_update_config_value('EmulatedMachine','pc-0.14','3.0'); >> dbscripts/create_db.sh.log:7571:select >> fn_db_update_config_value('EmulatedMachine','pc-0.14','3.0'); >> dbscripts/create_db.sh.log:25529:select >> fn_db_update_config_value('EmulatedMachine','pc-0.14','3.0'); >> dbscripts/create_db.sh.log:43487:select >> fn_db_update_config_value('EmulatedMachine','pc-0.14','3.0'); >> >> Is there any way to define different compatibiilty versions or edit >> that? If I've got a new end-point running qemu-kvm that doesn't have >> pc-0.14 defined (Say RHEL6.x) the machines won't lauch when you >> specific -M pc-0.14. >> >> Thoughts? >> >> > > > > check this and reply to it: > http://lists.ovirt.org/pipermail/users/2012-March/001439.html Since the topic was brought up, I have a long going request that oVirt will enable users to run multiple machine type versions on the same host (using the same qemu binary but providing a different -M compatibility level per VM). Is that on the roadmap? Thanks, Dor > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel From emesika at redhat.com Fri Apr 6 01:51:56 2012 From: emesika at redhat.com (Eli Mesika) Date: Thu, 05 Apr 2012 21:51:56 -0400 (EDT) Subject: [Engine-devel] Backing up the DB In-Reply-To: <4F7DF91B.1020006@redhat.com> Message-ID: <7f8d5819-fdcf-45e2-a14d-ee37eecee2da@zmail13.collab.prod.int.phx2.redhat.com> ----- Original Message ----- > From: "Douglas Landgraf" > To: "Ofer Schreiber" > Cc: engine-devel at ovirt.org > Sent: Thursday, April 5, 2012 10:57:15 PM > Subject: Re: [Engine-devel] Backing up the DB > > > Hi, > > On 04/05/2012 04:27 AM, Ofer Schreiber wrote: > > > We already have the backup code in python - under engine-cleanup > What about using the same code-base? > or adding --backup-db-only to engine-cleaup? I think that we should do simple bash wrapper scripts for backup/restore that calls pg_dump/pg_restore , put those scripts in dbscripts where all db stuff is located and print a message that other options are available using the original pg_dump/pg_restore > > From my point of view, it's ok. If we are going to use > engine-cleanup, let's keep in mind the restore mode too. > For while, I will use engine-db-tool that's already ready. > > -- > Cheers > Douglas > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel > From iheim at redhat.com Fri Apr 6 03:00:58 2012 From: iheim at redhat.com (Itamar Heim) Date: Fri, 06 Apr 2012 06:00:58 +0300 Subject: [Engine-devel] qemu machine type / datacenter machine version In-Reply-To: <4F7E11FB.9080403@redhat.com> References: <20120405152719.GB25807@us.ibm.com> <4F7DD2F2.303@redhat.com> <4F7E11FB.9080403@redhat.com> Message-ID: <4F7E5C6A.7030904@redhat.com> On 04/06/2012 12:43 AM, Dor Laor wrote: > On 04/05/2012 08:14 PM, Itamar Heim wrote: >> On 04/05/2012 06:27 PM, Ryan Harper wrote: >>> I was playing around with ovirt-engine datacenter definitions and I >>> seems that the capatibility version in the gui controls the qemu machine >>> type specified (3.0 -> pc-0.14). I was wondering where that's >>> configured setup. >>> >>> I grepped through my deployed system and saw a hit here: >>> >>> [root at f16-engine ovirt-engine]# rpm -qf /usr/share/ovirt-engine >>> ovirt-engine-3.0.0_0001-1.2.fc16.x86_64 >>> [root at f16-engine ovirt-engine]# grep -nri "pc-0.14" * >>> db-backups/tmprN1EDt.sql:12119:INSERT INTO vdc_options (option_id, >>> option_name, option_value, version) VALUES (236, 'EmulatedMachine', >>> 'pc-0.14', '3.0'); >>> db-backups/tmpj4XRCI.sql:12138:INSERT INTO vdc_options (option_id, >>> option_name, option_value, version) VALUES (236, 'EmulatedMachine', >>> 'pc-0.14', '3.0'); >>> dbscripts/upgrade/03_00_0530_update_EmulatedMachine_config_to_pc.sql:2:select >>> >>> fn_db_update_config_value('EmulatedMachine','pc-0.14','3.0'); >>> dbscripts/create_db.sh.log:7571:select >>> fn_db_update_config_value('EmulatedMachine','pc-0.14','3.0'); >>> dbscripts/create_db.sh.log:25529:select >>> fn_db_update_config_value('EmulatedMachine','pc-0.14','3.0'); >>> dbscripts/create_db.sh.log:43487:select >>> fn_db_update_config_value('EmulatedMachine','pc-0.14','3.0'); >>> >>> Is there any way to define different compatibiilty versions or edit >>> that? If I've got a new end-point running qemu-kvm that doesn't have >>> pc-0.14 defined (Say RHEL6.x) the machines won't lauch when you >>> specific -M pc-0.14. >>> >>> Thoughts? >>> >>> >> >> >> >> check this and reply to it: >> http://lists.ovirt.org/pipermail/users/2012-March/001439.html > > Since the topic was brought up, I have a long going request that oVirt > will enable users to run multiple machine type versions on the same host > (using the same qemu binary but providing a different -M compatibility > level per VM). > > Is that on the roadmap? I assume once will start with cluster level enumeration/monitoring first which is the bug which i asked to open around this thread. then look at per vm level (I'm guessing best way to make this easy to manage at per-vm level would be to use 'cluster default' for most vm's) I understand choosing cpu model per vm may (mainly for -cpu best) also be desirable in some cases. From mpastern at redhat.com Fri Apr 6 09:17:58 2012 From: mpastern at redhat.com (Michael Pasternak) Date: Fri, 06 Apr 2012 12:17:58 +0300 Subject: [Engine-devel] VDSM REST API In-Reply-To: <20120403220326.GC10117@aglitke> References: <20120403220326.GC10117@aglitke> Message-ID: <4F7EB4C6.1060402@redhat.com> Hey Adam, to make it work you need two things: 1. xsd schema 2. RSDL then you will be able to generate SDK which is the key to shell. 1. xsd schema, basically this is a /standard/ for restful application to have it, so consuming application will be able to generate bindings to your api in different languages, in ovirt-sdk i'm using generateDS to generate python bindings from our schema, of course since your api written in python, you can bypass this, but i still strongly recommend you exposing xsd schema, and as about format - nothing special. just should compile with lxml 2. RSDL - i'm in a middle of writing spec for it, but in general you can see RSDL structure in our xsd schema and can easlly figure out how to use it (let me know if you have questions) once you have these two, you can generate SDK, see src/codegen/README in sdk repo, and after you'll have sdk, all is left is to point it from cli, and as you mentioned cli will dynamically discover it at runtime. On 04/04/2012 01:03 AM, Adam Litke wrote: > Hi all, > > At the oVirt Workshop in Beijing I learned about how the ovirt-shell dynamically > discovers: the collections, resource schemas, and allowed actions based on an > RSDL file and API xsd schema. I am working on a REST API for vdsm and would > like to make my API compatible with the ovirt-engine api such that the same > ovirt-shell program could work with either the engine api or the vdsm api. > > There are many differences between ovirt-engine and vdsm (namely that one is > implemented in Java and the other in Python). I think the easiest way to test > whether this is possible is to try and create a new, minimalist REST service with > python Cherrypy. Such a service would have a root URL with no collections or > actions. From my understanding I will need to write the following files: > > /api - A basic XML representation of the API root resource > /api?schema - An xsd that describes the simple API > /api?rsdl - An rsdl (XML file) that describes the available links > > for /api, I want to start with something dead-simple: > > > > > > Hello from vdsm! > > > > > Once I can use ovirt-shell to list messages and show messages I will be happy to > build on it. Can anyone help me figure out the minimal xsd and rsdl that would > be needed for such an API to be consumable by ovirt-shell? Thanks for your > help! > -- Michael Pasternak RedHat, ENG-Virtualization R&D From acathrow at redhat.com Fri Apr 6 09:50:36 2012 From: acathrow at redhat.com (Andrew Cathrow) Date: Fri, 06 Apr 2012 05:50:36 -0400 (EDT) Subject: [Engine-devel] qemu machine type / datacenter machine version Message-ID: It is only configured in the database today. A good short term solution would be exposing this in the engine-config tool to save users having to hack the database, and potentially set this during setup. But long term we need to incorporate the notion of per VM config versions, right now we take the config version from the cluster, which isn't the best approach. We need to merge the two concepts - host/cluster capabilities and VM config version. Itamar Heim wrote: On 04/05/2012 06:27 PM, Ryan Harper wrote: > I was playing around with ovirt-engine datacenter definitions and I > seems that the capatibility version in the gui controls the qemu machine > type specified (3.0 -> pc-0.14). I was wondering where that's > configured setup. > > I grepped through my deployed system and saw a hit here: > > [root at f16-engine ovirt-engine]# rpm -qf /usr/share/ovirt-engine > ovirt-engine-3.0.0_0001-1.2.fc16.x86_64 > [root at f16-engine ovirt-engine]# grep -nri "pc-0.14" * > db-backups/tmprN1EDt.sql:12119:INSERT INTO vdc_options (option_id, option_name, option_value, version) VALUES (236, 'EmulatedMachine', 'pc-0.14', '3.0'); > db-backups/tmpj4XRCI.sql:12138:INSERT INTO vdc_options (option_id, option_name, option_value, version) VALUES (236, 'EmulatedMachine', 'pc-0.14', '3.0'); > dbscripts/upgrade/03_00_0530_update_EmulatedMachine_config_to_pc.sql:2:select fn_db_update_config_value('EmulatedMachine','pc-0.14','3.0'); > dbscripts/create_db.sh.log:7571:select fn_db_update_config_value('EmulatedMachine','pc-0.14','3.0'); > dbscripts/create_db.sh.log:25529:select fn_db_update_config_value('EmulatedMachine','pc-0.14','3.0'); > dbscripts/create_db.sh.log:43487:select fn_db_update_config_value('EmulatedMachine','pc-0.14','3.0'); > > Is there any way to define different compatibiilty versions or edit that? If I've got a new end-point running qemu-kvm that doesn't have pc-0.14 defined (Say RHEL6.x) the machines won't lauch when you specific -M pc-0.14. > > Thoughts? > > check this and reply to it: http://lists.ovirt.org/pipermail/users/2012-March/001439.html _______________________________________________ Engine-devel mailing list Engine-devel at ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel From djasa at redhat.com Fri Apr 6 14:28:02 2012 From: djasa at redhat.com (David =?UTF-8?Q?Ja=C5=A1a?=) Date: Fri, 06 Apr 2012 16:28:02 +0200 Subject: [Engine-devel] Purpose of Attached Inactive/Maintenance state of export domain? Message-ID: <1333722482.18597.7.camel@dhcp-29-7.brq.redhat.com> Hi, As I'm using export domain to shove VMs and templates betweend RHEV setups pretty often lately, I'm wondering about $SUBJ. What is it good for? Is it just for situation when main Data storage domain goes down? If so, I'll probably file a RFE to be able to get the domain from Unattached to Active state and vice versa via single click as having to wait half minute before I can do a successive click is quite a big annoyance. David -- David Ja?a, RHCE SPICE QE based in Brno GPG Key: 22C33E24 Fingerprint: 513A 060B D1B4 2A72 7F0D 0278 B125 CD00 22C3 3E24 From ryanh at us.ibm.com Fri Apr 6 14:58:09 2012 From: ryanh at us.ibm.com (Ryan Harper) Date: Fri, 6 Apr 2012 09:58:09 -0500 Subject: [Engine-devel] upstream/downstream compat Message-ID: <20120406145809.GL25807@us.ibm.com> I've submitted some changes to start some of the work of removing the RHEV/RHEVM names throughout the vdsm code. In one of the patches, there's a good discussion on compatibility with downstream[1] And I wanted to continue that on the mailing list so we could have more eyes; it's not clear to me if everyone is able to see/participate in an inline thread to just one of my patches. To the point; as we look at moving toward an upstream vdsm which may be used stand-alone; ie, it may or may not having ovirt-engine/RHEVM driving actions. I'm interested in hearing details what our requirements for compatibility are and which parts of the tree might be affected. I'd like to posit that downstream compat is the responsibility of the distro versus the upstream community; though that's not a license to make things difficult. IMHO, this means we can do things that help clean up the code or move the project in a particular direction without having to always worry about what the package looks like in a particular distro. The other aspect to compatibility I'd like to hear details/discussion on the interfaces (explicit or implicit) between vdsm and ovirt-engine. I rekindled a discussion[2] on at least one known issue around engine including the qemu machine type in the database; Any pointers to other places would be helpful as I'm wrapping my head around the back and forth between vdsm and engine. 1. http://gerrit.ovirt.org/#patch,unified,3287,1,vds_bootstrap/vds_bootstrap.py 2. http://lists.ovirt.org/pipermail/engine-devel/2012-April/001209.html -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx ryanh at us.ibm.com From yzaslavs at redhat.com Sat Apr 7 08:49:14 2012 From: yzaslavs at redhat.com (Yair Zaslavsky) Date: Sat, 07 Apr 2012 11:49:14 +0300 Subject: [Engine-devel] Backing up the DB In-Reply-To: <7f8d5819-fdcf-45e2-a14d-ee37eecee2da@zmail13.collab.prod.int.phx2.redhat.com> References: <7f8d5819-fdcf-45e2-a14d-ee37eecee2da@zmail13.collab.prod.int.phx2.redhat.com> Message-ID: <4F7FFF8A.9040003@redhat.com> On 04/06/2012 04:51 AM, Eli Mesika wrote: > > > ----- Original Message ----- >> From: "Douglas Landgraf" >> To: "Ofer Schreiber" >> Cc: engine-devel at ovirt.org >> Sent: Thursday, April 5, 2012 10:57:15 PM >> Subject: Re: [Engine-devel] Backing up the DB >> >> >> Hi, >> >> On 04/05/2012 04:27 AM, Ofer Schreiber wrote: >> >> >> We already have the backup code in python - under engine-cleanup >> What about using the same code-base? >> or adding --backup-db-only to engine-cleaup? > > I think that we should do simple bash wrapper scripts for backup/restore that calls pg_dump/pg_restore , put those scripts in dbscripts where all db stuff is located and print a message that other options are available using the original pg_dump/pg_restore +1 - the scripts should use the options for pg_dump as specified in the script provided by Douglas (the py version) > > >> >> From my point of view, it's ok. If we are going to use >> engine-cleanup, let's keep in mind the restore mode too. >> For while, I will use engine-db-tool that's already ready. >> >> -- >> Cheers >> Douglas >> _______________________________________________ >> Engine-devel mailing list >> Engine-devel at ovirt.org >> http://lists.ovirt.org/mailman/listinfo/engine-devel >> > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel From lyarwood at redhat.com Sat Apr 7 15:10:01 2012 From: lyarwood at redhat.com (Lee Yarwood) Date: Sat, 07 Apr 2012 16:10:01 +0100 Subject: [Engine-devel] Is there a preferred workflow when adding additional error messages to VDSM _and_ Engine? Message-ID: <4F8058C9.8010808@redhat.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello all, I'm currently working on a patch to correct the logic used by vdsm when reviewing the logical and physical block size of physical volumes [1]. Once/If this is approved I'd like to look into making the exceptions thrown from vdsm and the errors displayed within engine more descriptive. Before I start throwing patches into gerrit I was wondering *if* there is a preferred workflow when adding additional exceptions and error messages across both projects. For example, committing changes to vdsm before engine, engine before vdsm or both at the same time. I'm also wondering if there is a way to say that vdsm gerrit changeid x relies on engine gerrit changeid y etc? Thanks in advance, Lee - -- Lee Yarwood Software Maintenance Engineer Red Hat UK Ltd 200 Fowler Avenue IQ Farnborough, Farnborough, Hants GU14 7JP Registered in England and Wales under Company Registration No. 03798903 Directors: Michael Cunningham (USA), Brendan Lane (Ireland), Matt Parson(USA), Charlie Peters (USA) GPG fingerprint : A5D1 9385 88CB 7E5F BE64 6618 BCA6 6E33 F672 2D76 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJPgFjGAAoJELymbjP2ci12MScIANRBXgWPSjeSZvSM2+bZmDrD FefJfxMcCQFtTqWYePXIxFgqeeRcFc57+6alExBRU2g9nKZJEIPn2vj640XSTGlt n5T4ItED1IVydzuEXFOAvgaTmZfKzTQkxQWp8QgL6pC7cYgnp2nL7gkbkedx1JyI gCgCGomrHeWP2++vUS8UjtCccZdTJiOiWqoH2sBCKgEVcmFMgvYREK6hTou4DHU4 DcpureWuLvM4HWUlyfl37eXQOmy66A7uHGp3xF5sykQZ9aozaiMFjSoCqQOEVqO6 jHRnsQB6FfF/xU+F/UQK5PKZOm7e+KvrMjhIDfR+/DX3t0rkrtc69gg2O6duy4o= =vdud -----END PGP SIGNATURE----- From mkenneth at redhat.com Sun Apr 8 06:50:20 2012 From: mkenneth at redhat.com (Miki Kenneth) Date: Sun, 08 Apr 2012 02:50:20 -0400 (EDT) Subject: [Engine-devel] qemu machine type / datacenter machine version In-Reply-To: Message-ID: <83c25d38-ad2a-4928-93f1-504418159448@mkenneth.csb> ----- Original Message ----- > From: "Andrew Cathrow" > To: engine-devel at ovirt.org, "Ryan Harper" > Sent: Friday, April 6, 2012 12:50:36 PM > Subject: Re: [Engine-devel] qemu machine type / datacenter machine version > > It is only configured in the database today. > A good short term solution would be exposing this in the > engine-config tool to save users having to hack the database, and > potentially set this during setup. > But long term we need to incorporate the notion of per VM config > versions, right now we take the config version from the cluster, > which isn't the best approach. We need to merge the two concepts - > host/cluster capabilities and VM config version. and combined that with the "deployment profile" and "configuration profile" per VM (as was mentioned at Foreman/Ovirt presentation) > > > Itamar Heim wrote: > > On 04/05/2012 06:27 PM, Ryan Harper wrote: > > I was playing around with ovirt-engine datacenter definitions and I > > seems that the capatibility version in the gui controls the qemu > > machine > > type specified (3.0 -> pc-0.14). I was wondering where that's > > configured setup. > > > > I grepped through my deployed system and saw a hit here: > > > > [root at f16-engine ovirt-engine]# rpm -qf /usr/share/ovirt-engine > > ovirt-engine-3.0.0_0001-1.2.fc16.x86_64 > > [root at f16-engine ovirt-engine]# grep -nri "pc-0.14" * > > db-backups/tmprN1EDt.sql:12119:INSERT INTO vdc_options (option_id, > > option_name, option_value, version) VALUES (236, > > 'EmulatedMachine', 'pc-0.14', '3.0'); > > db-backups/tmpj4XRCI.sql:12138:INSERT INTO vdc_options (option_id, > > option_name, option_value, version) VALUES (236, > > 'EmulatedMachine', 'pc-0.14', '3.0'); > > dbscripts/upgrade/03_00_0530_update_EmulatedMachine_config_to_pc.sql:2:select > > fn_db_update_config_value('EmulatedMachine','pc-0.14','3.0'); > > dbscripts/create_db.sh.log:7571:select > > fn_db_update_config_value('EmulatedMachine','pc-0.14','3.0'); > > dbscripts/create_db.sh.log:25529:select > > fn_db_update_config_value('EmulatedMachine','pc-0.14','3.0'); > > dbscripts/create_db.sh.log:43487:select > > fn_db_update_config_value('EmulatedMachine','pc-0.14','3.0'); > > > > Is there any way to define different compatibiilty versions or edit > > that? If I've got a new end-point running qemu-kvm that doesn't > > have pc-0.14 defined (Say RHEL6.x) the machines won't lauch when > > you specific -M pc-0.14. > > > > Thoughts? > > > > > > > > check this and reply to it: > http://lists.ovirt.org/pipermail/users/2012-March/001439.html > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel > From lpeer at redhat.com Sun Apr 8 09:03:20 2012 From: lpeer at redhat.com (Livnat Peer) Date: Sun, 08 Apr 2012 12:03:20 +0300 Subject: [Engine-devel] Purpose of Attached Inactive/Maintenance state of export domain? In-Reply-To: <1333722482.18597.7.camel@dhcp-29-7.brq.redhat.com> References: <1333722482.18597.7.camel@dhcp-29-7.brq.redhat.com> Message-ID: <4F815458.5070109@redhat.com> On 06/04/12 17:28, David Ja?a wrote: > Hi, > > As I'm using export domain to shove VMs and templates betweend RHEV > setups pretty often lately, I'm wondering about $SUBJ. What is it good > for? Is it just for situation when main Data storage domain goes down? > Hi David, - Attached Inactive export SD indicates that there is some problem with this SD, we added a feature to auto recover from this state (automatically activating the SD on a periodical basis) - Attached maintenance means that the domain is going through some kind of manual handling procedure and the system should not access this domain, this state is initiate only upon user explicit request. Having said the above there is no good reason, IMO, not to expose attach and activate in a single command/UI action (I think we had RFE on this). For example when working with floating disks (another new feature) you can attach a disk to VM and activate it in a single command. Livna > If so, I'll probably file a RFE to be able to get the domain from > Unattached to Active state and vice versa via single click as having to > wait half minute before I can do a successive click is quite a big > annoyance. > > David > From dlaor at redhat.com Sun Apr 8 09:47:27 2012 From: dlaor at redhat.com (Dor Laor) Date: Sun, 08 Apr 2012 12:47:27 +0300 Subject: [Engine-devel] qemu machine type / datacenter machine version In-Reply-To: <4F7E5C6A.7030904@redhat.com> References: <20120405152719.GB25807@us.ibm.com> <4F7DD2F2.303@redhat.com> <4F7E11FB.9080403@redhat.com> <4F7E5C6A.7030904@redhat.com> Message-ID: <4F815EAF.9080205@redhat.com> On 04/06/2012 06:00 AM, Itamar Heim wrote: >>> >>> >>> check this and reply to it: >>> http://lists.ovirt.org/pipermail/users/2012-March/001439.html >> >> Since the topic was brought up, I have a long going request that oVirt >> will enable users to run multiple machine type versions on the same host >> (using the same qemu binary but providing a different -M compatibility >> level per VM). >> >> Is that on the roadmap? > > I assume once will start with cluster level enumeration/monitoring first > which is the bug which i asked to open around this thread. > then look at per vm level (I'm guessing best way to make this easy to > manage at per-vm level would be to use 'cluster default' for most vm's) > I understand choosing cpu model per vm may (mainly for -cpu best) also > be desirable in some cases. Cpu model is a VM property. Setting anything beyond the least common denominator of your set of hardware hosts, may restrict using some of the older hosts as expected. btw: -cpu best is less flexible for non homogeneous set of hosts. Better use an explicit model for such environment. In theory the newest models should perform just as good as -best From abaron at redhat.com Sun Apr 8 14:10:32 2012 From: abaron at redhat.com (Ayal Baron) Date: Sun, 08 Apr 2012 10:10:32 -0400 (EDT) Subject: [Engine-devel] [vdsm] Is there a preferred workflow when adding additional error messages to VDSM _and_ Engine? In-Reply-To: <4F8058C9.8010808@redhat.com> Message-ID: <3cc5290e-2ea3-484f-9449-57eb58305155@zmail13.collab.prod.int.phx2.redhat.com> ----- Original Message ----- > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hello all, > > I'm currently working on a patch to correct the logic used by vdsm > when > reviewing the logical and physical block size of physical volumes > [1]. > Once/If this is approved I'd like to look into making the exceptions > thrown from vdsm and the errors displayed within engine more > descriptive. > > Before I start throwing patches into gerrit I was wondering *if* > there > is a preferred workflow when adding additional exceptions and error > messages across both projects. For example, committing changes to > vdsm > before engine, engine before vdsm or both at the same time. > > I'm also wondering if there is a way to say that vdsm gerrit changeid > x > relies on engine gerrit changeid y etc? Adding in engine does not rely on vdsm actually throwing the exception. Adding in vdsm without corresponding code in engine would just mean that a generic message is displayed to user, so either way is ok as long as you make sure to submit both. There is no need for a dependency between gerrits (and I'm not sure how that would work either, but I'm not aware of any such mechanism at the moment). > > Thanks in advance, > > Lee > - -- > > Lee Yarwood > Software Maintenance Engineer > Red Hat UK Ltd > 200 Fowler Avenue IQ Farnborough, Farnborough, Hants GU14 7JP > > Registered in England and Wales under Company Registration No. > 03798903 > Directors: Michael Cunningham (USA), Brendan Lane (Ireland), Matt > Parson(USA), Charlie Peters (USA) > > GPG fingerprint : A5D1 9385 88CB 7E5F BE64 6618 BCA6 6E33 F672 2D76 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.12 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iQEcBAEBAgAGBQJPgFjGAAoJELymbjP2ci12MScIANRBXgWPSjeSZvSM2+bZmDrD > FefJfxMcCQFtTqWYePXIxFgqeeRcFc57+6alExBRU2g9nKZJEIPn2vj640XSTGlt > n5T4ItED1IVydzuEXFOAvgaTmZfKzTQkxQWp8QgL6pC7cYgnp2nL7gkbkedx1JyI > gCgCGomrHeWP2++vUS8UjtCccZdTJiOiWqoH2sBCKgEVcmFMgvYREK6hTou4DHU4 > DcpureWuLvM4HWUlyfl37eXQOmy66A7uHGp3xF5sykQZ9aozaiMFjSoCqQOEVqO6 > jHRnsQB6FfF/xU+F/UQK5PKZOm7e+KvrMjhIDfR+/DX3t0rkrtc69gg2O6duy4o= > =vdud > -----END PGP SIGNATURE----- > _______________________________________________ > vdsm-devel mailing list > vdsm-devel at lists.fedorahosted.org > https://fedorahosted.org/mailman/listinfo/vdsm-devel > From rgolan at redhat.com Mon Apr 9 08:42:59 2012 From: rgolan at redhat.com (Roy Golan) Date: Mon, 09 Apr 2012 11:42:59 +0300 Subject: [Engine-devel] deprecating auto-detection of Ldap provider types Message-ID: <4F82A113.8040409@redhat.com> auto-detection featured few bugs lately which convinced me that it must be deprecated/removed from the code in favor of adding manual set of the provider type. main reasons for that: a. the provider is type is known by the user b. identifying a provider by the rootDSE attributes is error-prone, not reliable etc... specially if the support matrix is growing c. auto-detection logic is duplicated (and not shared) between the backend code and the manage-domains tool (nevermind the reasons now) A manual set of the provider type requires a new configuration field for a domain and the question is the upgrade path which may look like * set the provider type to default Active Directory (because its more likely to be the provider type) * things not working - use the engine-manage-domains and choose the provider type. * optionally - keep the auto-detection (of the tool only!) if user wants to use it. your suggestion and thoughts... Thanks, Roy From yzaslavs at redhat.com Mon Apr 9 08:50:53 2012 From: yzaslavs at redhat.com (Yair Zaslavsky) Date: Mon, 09 Apr 2012 11:50:53 +0300 Subject: [Engine-devel] deprecating auto-detection of Ldap provider types In-Reply-To: <4F82A113.8040409@redhat.com> References: <4F82A113.8040409@redhat.com> Message-ID: <4F82A2ED.4060509@redhat.com> On 04/09/2012 11:42 AM, Roy Golan wrote: > auto-detection featured few bugs lately which convinced me that it must > be deprecated/removed from > the code in favor of adding manual set of the provider type. > > main reasons for that: > a. the provider is type is known by the user > b. identifying a provider by the rootDSE attributes is error-prone, not > reliable etc... specially if the support matrix is growing > c. auto-detection logic is duplicated (and not shared) between the > backend code and the manage-domains tool (nevermind the reasons now) > > A manual set of the provider type requires a new configuration field for > a domain and the > question is the upgrade path which may look like > > * set the provider type to default Active Directory (because its more > likely to be the provider type) I think we should not have this assumption -for new environments ldap provider type MUST be set via manage domains. > * things not working - use the engine-manage-domains and choose the > provider type. > * optionally - keep the auto-detection (of the tool only!) if user > wants to use it. > > your suggestion and thoughts... +1 in general about the idea. We have to handle upgrades though (providing ldap provider type data in DB in already-installed environments). > > Thanks, > Roy > > > From lpeer at redhat.com Mon Apr 9 09:11:55 2012 From: lpeer at redhat.com (Livnat Peer) Date: Mon, 09 Apr 2012 12:11:55 +0300 Subject: [Engine-devel] deprecating auto-detection of Ldap provider types In-Reply-To: <4F82A113.8040409@redhat.com> References: <4F82A113.8040409@redhat.com> Message-ID: <4F82A7DB.7020304@redhat.com> On 09/04/12 11:42, Roy Golan wrote: > auto-detection featured few bugs lately which convinced me that it must > be deprecated/removed from > the code in favor of adding manual set of the provider type. > > main reasons for that: > a. the provider is type is known by the user > b. identifying a provider by the rootDSE attributes is error-prone, not > reliable etc... specially if the support matrix is growing > c. auto-detection logic is duplicated (and not shared) between the > backend code and the manage-domains tool (nevermind the reasons now) > +1 for removing this 'feature' > A manual set of the provider type requires a new configuration field for > a domain and the > question is the upgrade path which may look like > > * set the provider type to default Active Directory (because its more > likely to be the provider type) > * things not working - use the engine-manage-domains and choose the > provider type. > * optionally - keep the auto-detection (of the tool only!) if user > wants to use it. I think we should require that the user specifies the provider type (from now on), and enable editing this field of course. Another upgrade proposal is to populate the provider type only upon the first time we need to use this domain (and it is not populated) by using the current 'auto-detect' mechanism. By taking the above approach we don't break behavior for the user and we enable manually fixing of the domain provider type (which is a bypass for all current bugs in the auto-detect). Livnat > > your suggestion and thoughts... > > Thanks, > Roy > > > > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel From danken at redhat.com Mon Apr 9 09:21:19 2012 From: danken at redhat.com (Dan Kenigsberg) Date: Mon, 9 Apr 2012 12:21:19 +0300 Subject: [Engine-devel] [vdsm] upstream/downstream compat In-Reply-To: <20120406145809.GL25807@us.ibm.com> References: <20120406145809.GL25807@us.ibm.com> Message-ID: <20120409092118.GK31983@redhat.com> On Fri, Apr 06, 2012 at 09:58:09AM -0500, Ryan Harper wrote: > I've submitted some changes to start some of the work of removing the > RHEV/RHEVM names throughout the vdsm code. In one of the patches, > there's a good discussion on compatibility with downstream[1] > And I wanted to continue that on the mailing list so we could have more > eyes; it's not clear to me if everyone is able to see/participate in an > inline thread to just one of my patches. > > To the point; as we look at moving toward an upstream vdsm which may be > used stand-alone; ie, it may or may not having ovirt-engine/RHEVM > driving actions. I'm interested in hearing details what our > requirements for compatibility are and which parts of the tree might be > affected. > > I'd like to posit that downstream compat is the responsibility of the > distro versus the upstream community; though that's not a license to > make things difficult. IMHO, this means we can do things that help > clean up the code or move the project in a particular direction without > having to always worry about what the package looks like in a particular > distro. Blissful upstream development is great for upstream maintainer (me), but it leads to serious headaches for downstream maintainer with considerable installed base (me). We have a lot of Fedoraisms and RHELisms and RHEVisms in our code. Removing them is noble, probably legally required, and I truly thank whomever cleans up the code. But since there are so many of them, blind removal can add significant burden on yours truly and his colleagues. I would like to ask upstream to think twice before breaking downstream compatibility. Downstream can always revert your patch, but let's make it easier on them^Wus - have a configurable value, so that downstream patch is a oneliner, for example. If an API must be broken, let's file a bug on the adjacent component, so as not to surprise it. So please, worry about how the package would look in particular distros with considerable installed base. Discuss upgrade paths. Help make Vdsm easily downstreamable. > > The other aspect to compatibility I'd like to hear details/discussion on > the interfaces (explicit or implicit) between vdsm and ovirt-engine. > I rekindled a discussion[2] on at least one known issue around engine > including the qemu machine type in the database; Any pointers to other > places would be helpful as I'm wrapping my head around the back and > forth between vdsm and engine. > > > > 1. http://gerrit.ovirt.org/#patch,unified,3287,1,vds_bootstrap/vds_bootstrap.py > 2. http://lists.ovirt.org/pipermail/engine-devel/2012-April/001209.html > > -- > Ryan Harper > Software Engineer; Linux Technology Center > IBM Corp., Austin, Tx > ryanh at us.ibm.com From ovedo at redhat.com Mon Apr 9 09:23:31 2012 From: ovedo at redhat.com (Oved Ourfalli) Date: Mon, 09 Apr 2012 05:23:31 -0400 (EDT) Subject: [Engine-devel] deprecating auto-detection of Ldap provider types In-Reply-To: <4F82A7DB.7020304@redhat.com> Message-ID: <02703f83-8d68-4d37-ac32-99589be03461@zmail02.collab.prod.int.phx2.redhat.com> ----- Original Message ----- > From: "Livnat Peer" > To: "Roy Golan" > Cc: "Oved Ourfalli" , engine-devel at ovirt.org > Sent: Monday, April 9, 2012 12:11:55 PM > Subject: Re: [Engine-devel] deprecating auto-detection of Ldap provider types > > On 09/04/12 11:42, Roy Golan wrote: > > auto-detection featured few bugs lately which convinced me that it > > must > > be deprecated/removed from > > the code in favor of adding manual set of the provider type. > > > > main reasons for that: > > a. the provider is type is known by the user > > b. identifying a provider by the rootDSE attributes is error-prone, > > not > > reliable etc... specially if the support matrix is growing > > c. auto-detection logic is duplicated (and not shared) between the > > backend code and the manage-domains tool (nevermind the reasons > > now) > > > > +1 for removing this 'feature' > +1 for that as well. > > A manual set of the provider type requires a new configuration > > field for > > a domain and the > > question is the upgrade path which may look like > > > > * set the provider type to default Active Directory (because its > > more > > likely to be the provider type) > > * things not working - use the engine-manage-domains and choose > > the > > provider type. > > > * optionally - keep the auto-detection (of the tool only!) if user > > wants to use it. > > I think we should require that the user specifies the provider type > (from now on), and enable editing this field of course. > > Another upgrade proposal is to populate the provider type only upon > the > first time we need to use this domain (and it is not populated) by > using > the current 'auto-detect' mechanism. > > By taking the above approach we don't break behavior for the user and > we > enable manually fixing of the domain provider type (which is a bypass > for all current bugs in the auto-detect). > > > Livnat > > > > > > your suggestion and thoughts... > > > > Thanks, > > Roy > > > > > > > > _______________________________________________ > > Engine-devel mailing list > > Engine-devel at ovirt.org > > http://lists.ovirt.org/mailman/listinfo/engine-devel > > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel > From rgolan at redhat.com Mon Apr 9 11:42:24 2012 From: rgolan at redhat.com (Roy Golan) Date: Mon, 09 Apr 2012 14:42:24 +0300 Subject: [Engine-devel] deprecating auto-detection of Ldap provider types In-Reply-To: <4F82A7DB.7020304@redhat.com> References: <4F82A113.8040409@redhat.com> <4F82A7DB.7020304@redhat.com> Message-ID: <4F82CB20.5010607@redhat.com> On 04/09/2012 12:11 PM, Livnat Peer wrote: > On 09/04/12 11:42, Roy Golan wrote: >> auto-detection featured few bugs lately which convinced me that it must >> be deprecated/removed from >> the code in favor of adding manual set of the provider type. >> >> main reasons for that: >> a. the provider is type is known by the user >> b. identifying a provider by the rootDSE attributes is error-prone, not >> reliable etc... specially if the support matrix is growing >> c. auto-detection logic is duplicated (and not shared) between the >> backend code and the manage-domains tool (nevermind the reasons now) >> > +1 for removing this 'feature' > >> A manual set of the provider type requires a new configuration field for >> a domain and the >> question is the upgrade path which may look like >> >> * set the provider type to default Active Directory (because its more >> likely to be the provider type) >> * things not working - use the engine-manage-domains and choose the >> provider type. >> * optionally - keep the auto-detection (of the tool only!) if user >> wants to use it. > I think we should require that the user specifies the provider type > (from now on), and enable editing this field of course. > > Another upgrade proposal is to populate the provider type only upon the > first time we need to use this domain (and it is not populated) by using > the current 'auto-detect' mechanism. and remove it the next version? this means the auto-detection code remains in the backend code. I think its the best to remove it totally but If we want to keep this functionality I rather just leave it in manage-domains alone,although if its another step for the user. > > By taking the above approach we don't break behavior for the user and we > enable manually fixing of the domain provider type (which is a bypass > for all current bugs in the auto-detect). > > > Livnat > > >> your suggestion and thoughts... >> >> Thanks, >> Roy >> >> >> >> _______________________________________________ >> Engine-devel mailing list >> Engine-devel at ovirt.org >> http://lists.ovirt.org/mailman/listinfo/engine-devel From lpeer at redhat.com Mon Apr 9 11:47:50 2012 From: lpeer at redhat.com (Livnat Peer) Date: Mon, 09 Apr 2012 14:47:50 +0300 Subject: [Engine-devel] deprecating auto-detection of Ldap provider types In-Reply-To: <4F82CB20.5010607@redhat.com> References: <4F82A113.8040409@redhat.com> <4F82A7DB.7020304@redhat.com> <4F82CB20.5010607@redhat.com> Message-ID: <4F82CC66.3040908@redhat.com> On 09/04/12 14:42, Roy Golan wrote: > On 04/09/2012 12:11 PM, Livnat Peer wrote: >> On 09/04/12 11:42, Roy Golan wrote: >>> auto-detection featured few bugs lately which convinced me that it must >>> be deprecated/removed from >>> the code in favor of adding manual set of the provider type. >>> >>> main reasons for that: >>> a. the provider is type is known by the user >>> b. identifying a provider by the rootDSE attributes is error-prone, not >>> reliable etc... specially if the support matrix is growing >>> c. auto-detection logic is duplicated (and not shared) between the >>> backend code and the manage-domains tool (nevermind the reasons now) >>> >> +1 for removing this 'feature' >> >>> A manual set of the provider type requires a new configuration field for >>> a domain and the >>> question is the upgrade path which may look like >>> >>> * set the provider type to default Active Directory (because its more >>> likely to be the provider type) >>> * things not working - use the engine-manage-domains and choose the >>> provider type. >>> * optionally - keep the auto-detection (of the tool only!) if user >>> wants to use it. >> I think we should require that the user specifies the provider type >> (from now on), and enable editing this field of course. >> >> Another upgrade proposal is to populate the provider type only upon the >> first time we need to use this domain (and it is not populated) by using >> the current 'auto-detect' mechanism. > and remove it the next version? yes > this means the auto-detection code remains in the backend code. only until next version > I think its the best to remove it totally but If we want to keep this > functionality I rather just leave it in manage-domains alone,although if > its another step for the user. I don't *want* to keep it but unless we want to set it hard coded during upgrade I don't see how can we remove it. BTW if we have to leave it in I would say to remove it from the tool and leave in the backend (you have to have it in the backend for transparent upgrade) >> >> By taking the above approach we don't break behavior for the user and we >> enable manually fixing of the domain provider type (which is a bypass >> for all current bugs in the auto-detect). >> >> >> Livnat >> >> >>> your suggestion and thoughts... >>> >>> Thanks, >>> Roy >>> >>> >>> >>> _______________________________________________ >>> Engine-devel mailing list >>> Engine-devel at ovirt.org >>> http://lists.ovirt.org/mailman/listinfo/engine-devel > From mkenneth at redhat.com Mon Apr 9 12:12:30 2012 From: mkenneth at redhat.com (Miki Kenneth) Date: Mon, 09 Apr 2012 08:12:30 -0400 (EDT) Subject: [Engine-devel] deprecating auto-detection of Ldap provider types In-Reply-To: <4F82CC66.3040908@redhat.com> Message-ID: Excuse my ignorance... but I would like to understand the "new" behavior on: - clean install? POC? - How do I change the provider, after installation? - upgrade path. Miki ----- Original Message ----- > From: "Livnat Peer" > To: "Roy Golan" > Cc: "Oved Ourfalli" , engine-devel at ovirt.org > Sent: Monday, April 9, 2012 2:47:50 PM > Subject: Re: [Engine-devel] deprecating auto-detection of Ldap provider types > > On 09/04/12 14:42, Roy Golan wrote: > > On 04/09/2012 12:11 PM, Livnat Peer wrote: > >> On 09/04/12 11:42, Roy Golan wrote: > >>> auto-detection featured few bugs lately which convinced me that > >>> it must > >>> be deprecated/removed from > >>> the code in favor of adding manual set of the provider type. > >>> > >>> main reasons for that: > >>> a. the provider is type is known by the user > >>> b. identifying a provider by the rootDSE attributes is > >>> error-prone, not > >>> reliable etc... specially if the support matrix is growing > >>> c. auto-detection logic is duplicated (and not shared) between > >>> the > >>> backend code and the manage-domains tool (nevermind the reasons > >>> now) > >>> > >> +1 for removing this 'feature' > >> > >>> A manual set of the provider type requires a new configuration > >>> field for > >>> a domain and the > >>> question is the upgrade path which may look like > >>> > >>> * set the provider type to default Active Directory (because its > >>> more > >>> likely to be the provider type) > >>> * things not working - use the engine-manage-domains and choose > >>> the > >>> provider type. > >>> * optionally - keep the auto-detection (of the tool only!) if > >>> user > >>> wants to use it. > >> I think we should require that the user specifies the provider > >> type > >> (from now on), and enable editing this field of course. > >> > >> Another upgrade proposal is to populate the provider type only > >> upon the > >> first time we need to use this domain (and it is not populated) by > >> using > >> the current 'auto-detect' mechanism. > > and remove it the next version? > > yes > > > this means the auto-detection code remains in the backend code. > > only until next version > > > I think its the best to remove it totally but If we want to keep > > this > > functionality I rather just leave it in manage-domains > > alone,although if > > its another step for the user. > > I don't *want* to keep it but unless we want to set it hard coded > during > upgrade I don't see how can we remove it. > > BTW if we have to leave it in I would say to remove it from the tool > and > leave in the backend (you have to have it in the backend for > transparent > upgrade) > > > >> > >> By taking the above approach we don't break behavior for the user > >> and we > >> enable manually fixing of the domain provider type (which is a > >> bypass > >> for all current bugs in the auto-detect). > >> > >> > >> Livnat > >> > >> > >>> your suggestion and thoughts... > >>> > >>> Thanks, > >>> Roy > >>> > >>> > >>> > >>> _______________________________________________ > >>> Engine-devel mailing list > >>> Engine-devel at ovirt.org > >>> http://lists.ovirt.org/mailman/listinfo/engine-devel > > > > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel > From lpeer at redhat.com Mon Apr 9 12:17:27 2012 From: lpeer at redhat.com (Livnat Peer) Date: Mon, 09 Apr 2012 15:17:27 +0300 Subject: [Engine-devel] Is there a preferred workflow when adding additional error messages to VDSM _and_ Engine? In-Reply-To: <4F8058C9.8010808@redhat.com> References: <4F8058C9.8010808@redhat.com> Message-ID: <4F82D357.5070009@redhat.com> On 07/04/12 18:10, Lee Yarwood wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hello all, > > I'm currently working on a patch to correct the logic used by vdsm when > reviewing the logical and physical block size of physical volumes [1]. > Once/If this is approved I'd like to look into making the exceptions > thrown from vdsm and the errors displayed within engine more descriptive. > > Before I start throwing patches into gerrit I was wondering *if* there > is a preferred workflow when adding additional exceptions and error > messages across both projects. For example, committing changes to vdsm > before engine, engine before vdsm or both at the same time. > Hi Lee, We had a Jenkins Job to give warning if there is a new error code in VDSM that is not covered in the backend. I see this job is disabled in ovirt Jenkins, http://jenkins.ovirt.org/job/vdsm_verify_error_codes/ Eyal, any specific reason this is disabled? Livnat > I'm also wondering if there is a way to say that vdsm gerrit changeid x > relies on engine gerrit changeid y etc? > > Thanks in advance, > > Lee > - -- > > Lee Yarwood > Software Maintenance Engineer > Red Hat UK Ltd > 200 Fowler Avenue IQ Farnborough, Farnborough, Hants GU14 7JP > > Registered in England and Wales under Company Registration No. 03798903 > Directors: Michael Cunningham (USA), Brendan Lane (Ireland), Matt > Parson(USA), Charlie Peters (USA) > > GPG fingerprint : A5D1 9385 88CB 7E5F BE64 6618 BCA6 6E33 F672 2D76 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.12 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iQEcBAEBAgAGBQJPgFjGAAoJELymbjP2ci12MScIANRBXgWPSjeSZvSM2+bZmDrD > FefJfxMcCQFtTqWYePXIxFgqeeRcFc57+6alExBRU2g9nKZJEIPn2vj640XSTGlt > n5T4ItED1IVydzuEXFOAvgaTmZfKzTQkxQWp8QgL6pC7cYgnp2nL7gkbkedx1JyI > gCgCGomrHeWP2++vUS8UjtCccZdTJiOiWqoH2sBCKgEVcmFMgvYREK6hTou4DHU4 > DcpureWuLvM4HWUlyfl37eXQOmy66A7uHGp3xF5sykQZ9aozaiMFjSoCqQOEVqO6 > jHRnsQB6FfF/xU+F/UQK5PKZOm7e+KvrMjhIDfR+/DX3t0rkrtc69gg2O6duy4o= > =vdud > -----END PGP SIGNATURE----- > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel From ryanh at us.ibm.com Mon Apr 9 12:25:24 2012 From: ryanh at us.ibm.com (Ryan Harper) Date: Mon, 9 Apr 2012 07:25:24 -0500 Subject: [Engine-devel] [vdsm] upstream/downstream compat In-Reply-To: <20120409092118.GK31983@redhat.com> References: <20120406145809.GL25807@us.ibm.com> <20120409092118.GK31983@redhat.com> Message-ID: <20120409122524.GR25807@us.ibm.com> * Dan Kenigsberg [2012-04-09 04:21]: > On Fri, Apr 06, 2012 at 09:58:09AM -0500, Ryan Harper wrote: > > I've submitted some changes to start some of the work of removing the > > RHEV/RHEVM names throughout the vdsm code. In one of the patches, > > there's a good discussion on compatibility with downstream[1] > > And I wanted to continue that on the mailing list so we could have more > > eyes; it's not clear to me if everyone is able to see/participate in an > > inline thread to just one of my patches. > > > > To the point; as we look at moving toward an upstream vdsm which may be > > used stand-alone; ie, it may or may not having ovirt-engine/RHEVM > > driving actions. I'm interested in hearing details what our > > requirements for compatibility are and which parts of the tree might be > > affected. > > > > I'd like to posit that downstream compat is the responsibility of the > > distro versus the upstream community; though that's not a license to > > make things difficult. IMHO, this means we can do things that help > > clean up the code or move the project in a particular direction without > > having to always worry about what the package looks like in a particular > > distro. > > Blissful upstream development is great for upstream maintainer (me), but > it leads to serious headaches for downstream maintainer with > considerable installed base (me). We have a lot of Fedoraisms and > RHELisms and RHEVisms in our code. Removing them is noble, probably > legally required, and I truly thank whomever cleans up the code. But > since there are so many of them, blind removal can add significant > burden on yours truly and his colleagues. > > I would like to ask upstream to think twice before breaking downstream > compatibility. Downstream can always revert your patch, but let's make > it easier on them^Wus - have a configurable value, so that downstream > patch is a oneliner, for example. If an API must be broken, let's file a > bug on the adjacent component, so as not to surprise it. > > So please, worry about how the package would look in particular distros > with considerable installed base. Discuss upgrade paths. Help make Vdsm > easily downstreamable. Indeed, I wasn't suggesting we just completely ignore downstream, and I think since you're both upstream and downstream maintainer you have valuable insight on how best to make these changes. Looking forward to hearing details on how best to make upstream progress while retaining downstream compat! > > > > > The other aspect to compatibility I'd like to hear details/discussion on > > the interfaces (explicit or implicit) between vdsm and ovirt-engine. > > I rekindled a discussion[2] on at least one known issue around engine > > including the qemu machine type in the database; Any pointers to other > > places would be helpful as I'm wrapping my head around the back and > > forth between vdsm and engine. > > > > > > > > 1. http://gerrit.ovirt.org/#patch,unified,3287,1,vds_bootstrap/vds_bootstrap.py > > 2. http://lists.ovirt.org/pipermail/engine-devel/2012-April/001209.html > > > > -- > > Ryan Harper > > Software Engineer; Linux Technology Center > > IBM Corp., Austin, Tx > > ryanh at us.ibm.com -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx ryanh at us.ibm.com From rgolan at redhat.com Mon Apr 9 13:12:36 2012 From: rgolan at redhat.com (Roy Golan) Date: Mon, 09 Apr 2012 16:12:36 +0300 Subject: [Engine-devel] deprecating auto-detection of Ldap provider types In-Reply-To: References: Message-ID: <4F82E044.4080407@redhat.com> On 04/09/2012 03:12 PM, Miki Kenneth wrote: > Excuse my ignorance... but I would like to understand the "new" behavior on: > - clean install? POC? when using the mangage domains, specify which provider type you want along with the domain > - How do I change the provider, after installation? run manage domains, alternatively engine-config > - upgrade path. when the backend starts it will auto-detect and keep the value in the DB for next time (so auto-detecting once per domain) adding more domains via manage-domains requires the user to set the provider type > > Miki > > ----- Original Message ----- >> From: "Livnat Peer" >> To: "Roy Golan" >> Cc: "Oved Ourfalli", engine-devel at ovirt.org >> Sent: Monday, April 9, 2012 2:47:50 PM >> Subject: Re: [Engine-devel] deprecating auto-detection of Ldap provider types >> >> On 09/04/12 14:42, Roy Golan wrote: >>> On 04/09/2012 12:11 PM, Livnat Peer wrote: >>>> On 09/04/12 11:42, Roy Golan wrote: >>>>> auto-detection featured few bugs lately which convinced me that >>>>> it must >>>>> be deprecated/removed from >>>>> the code in favor of adding manual set of the provider type. >>>>> >>>>> main reasons for that: >>>>> a. the provider is type is known by the user >>>>> b. identifying a provider by the rootDSE attributes is >>>>> error-prone, not >>>>> reliable etc... specially if the support matrix is growing >>>>> c. auto-detection logic is duplicated (and not shared) between >>>>> the >>>>> backend code and the manage-domains tool (nevermind the reasons >>>>> now) >>>>> >>>> +1 for removing this 'feature' >>>> >>>>> A manual set of the provider type requires a new configuration >>>>> field for >>>>> a domain and the >>>>> question is the upgrade path which may look like >>>>> >>>>> * set the provider type to default Active Directory (because its >>>>> more >>>>> likely to be the provider type) >>>>> * things not working - use the engine-manage-domains and choose >>>>> the >>>>> provider type. >>>>> * optionally - keep the auto-detection (of the tool only!) if >>>>> user >>>>> wants to use it. >>>> I think we should require that the user specifies the provider >>>> type >>>> (from now on), and enable editing this field of course. >>>> >>>> Another upgrade proposal is to populate the provider type only >>>> upon the >>>> first time we need to use this domain (and it is not populated) by >>>> using >>>> the current 'auto-detect' mechanism. >>> and remove it the next version? >> yes >> >>> this means the auto-detection code remains in the backend code. >> only until next version >> >>> I think its the best to remove it totally but If we want to keep >>> this >>> functionality I rather just leave it in manage-domains >>> alone,although if >>> its another step for the user. >> I don't *want* to keep it but unless we want to set it hard coded >> during >> upgrade I don't see how can we remove it. >> >> BTW if we have to leave it in I would say to remove it from the tool >> and >> leave in the backend (you have to have it in the backend for >> transparent >> upgrade) >> >> >>>> By taking the above approach we don't break behavior for the user >>>> and we >>>> enable manually fixing of the domain provider type (which is a >>>> bypass >>>> for all current bugs in the auto-detect). >>>> >>>> >>>> Livnat >>>> >>>> >>>>> your suggestion and thoughts... >>>>> >>>>> Thanks, >>>>> Roy >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Engine-devel mailing list >>>>> Engine-devel at ovirt.org >>>>> http://lists.ovirt.org/mailman/listinfo/engine-devel >> _______________________________________________ >> Engine-devel mailing list >> Engine-devel at ovirt.org >> http://lists.ovirt.org/mailman/listinfo/engine-devel >> From Dustin.Schoenbrun at netapp.com Mon Apr 9 14:48:00 2012 From: Dustin.Schoenbrun at netapp.com (Schoenbrun, Dustin) Date: Mon, 9 Apr 2012 14:48:00 +0000 Subject: [Engine-devel] Unable to Run 'make install-tools' Message-ID: <0A1534657992624AACDCA570F1D3E2000D3CBA@SACEXCMBX03-PRD.hq.netapp.com> Greetings, I'm running into an issue at the "Deploying engine-config and engine-manage-domains" section of the "Building oVirt Engine" article on the wiki. Building from the source using maven2 has completed successfully and I'm stuck on the series of commands listed below: # cd $OVIRT_HOME # make create_dirs # make install_tools # make install_config My build fails on the 'make install-tools' command. The output of the command is below: [root at ovirt ovirt-engine]# make install_tools *** Installing Common Tools cp -f /root/ovirt-engine/rpmbuild/SOURCES/engine-tools-common-3.1.0-0001.jar /usr/share/java/ cp: cannot stat `/root/ovirt-engine/rpmbuild/SOURCES/engine-tools-common-3.1.0-0001.jar': No such file or directory make: *** [install_tools] Error 1 [root at ovirt ovirt-engine]# pwd /root/ovirt-engine [root at ovirt ovirt-engine]# ls backend build-tools deployment frontend Makefile pom.xml build_mvn config ear LICENSE packaging [root at ovirt ovirt-engine]# Any insight into how to proceed would be greatly appreciated. Thanks! -- Dustin Schoenbrun Software Engineer NetApp - Data Center Platforms 919-476-5919 (office) dustin.schoenbrun at netapp.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From oliel at redhat.com Mon Apr 9 15:14:24 2012 From: oliel at redhat.com (Ori Liel) Date: Mon, 09 Apr 2012 11:14:24 -0400 (EDT) Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: <067bcf26-cb34-447a-a2ab-09b636059f8e@zmail17.collab.prod.int.phx2.redhat.com> Message-ID: <22dc9594-9420-4c67-b982-2ecd9a0c2403@zmail17.collab.prod.int.phx2.redhat.com> The "Floating Disks" feature makes disks into stand-alone entities: a given disk may be attached to a VM (as all disks are today), or it may be not attached to any VM, which makes it a floating disk (http://www.ovirt.org/wiki/Features/FloatingDisk) To implement attach/detach of disk to/from VM in REST-API, we intend to introduce two new actions: POST .../api/vms/{vm:id}/disks/{disk:id}/attach POST .../api/vms/{vm:id}/disks/{disk:id}/detach Since we try not to add new actions unless we have to, I want to explain why I believe that these actions are necessary. The other implementation would use existing add/remove flows: POST .../api/vms/{vm:id}/disks - if the disk was passed with an ID, attach it to this VM. If no id - create a new disk. DELETE .../api/vms/{vm:id}/disks/{disk:id} - *ambiguity problem, need to add a flag* We can't break existing API, so regular DELETE must remove the disk, as it does today. To detach a disk using DELETE we'd have to add a flag to the DETELE command. This is quite risky, because if the user forgets to pass this flag, the disk which he wanted to detach will actually be deleted. Theoretically, if we could break the API, the following modelling would resolve the ambiguity and perhaps be ideal: - POST/DELETE disk in root context means create or delete it. - POST/DELETE disk in VM context means attach or detach it. But we don't have the privilege of breaking the API. Considering all of the above - and the fact that attach/detach nics to/from host is also implemented using actions - I believe that the new actions are justifiable. Any comments? Thanks, Ori From mkolesni at redhat.com Tue Apr 10 07:20:03 2012 From: mkolesni at redhat.com (Mike Kolesnik) Date: Tue, 10 Apr 2012 03:20:03 -0400 (EDT) Subject: [Engine-devel] Is there a preferred workflow when adding additional error messages to VDSM _and_ Engine? In-Reply-To: <4F82D357.5070009@redhat.com> Message-ID: <9e6427cb-5cd9-4d0c-a984-5fb9bcfdcae9@zmail14.collab.prod.int.phx2.redhat.com> > On 07/04/12 18:10, Lee Yarwood wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > Hello all, > > > > I'm currently working on a patch to correct the logic used by vdsm > > when > > reviewing the logical and physical block size of physical volumes > > [1]. > > Once/If this is approved I'd like to look into making the > > exceptions > > thrown from vdsm and the errors displayed within engine more > > descriptive. > > > > Before I start throwing patches into gerrit I was wondering *if* > > there > > is a preferred workflow when adding additional exceptions and error > > messages across both projects. For example, committing changes to > > vdsm > > before engine, engine before vdsm or both at the same time. Hi, There is a wiki describing how to add errors & their descriptions to the engine: http://www.ovirt.org/wiki/Engine_Adding_Messages The relevant parts there are the VdsmErrors related (the other type of error is the one you get for illegal actions/states/etc before any call to VDSM is made). Hope you find it helpful. Regards, Mike > > > > Hi Lee, > We had a Jenkins Job to give warning if there is a new error code in > VDSM that is not covered in the backend. > > I see this job is disabled in ovirt Jenkins, > > http://jenkins.ovirt.org/job/vdsm_verify_error_codes/ > > Eyal, any specific reason this is disabled? > > Livnat > > > > I'm also wondering if there is a way to say that vdsm gerrit > > changeid x > > relies on engine gerrit changeid y etc? > > > > Thanks in advance, > > > > Lee > > - -- > > > > Lee Yarwood > > Software Maintenance Engineer > > Red Hat UK Ltd > > 200 Fowler Avenue IQ Farnborough, Farnborough, Hants GU14 7JP > > > > Registered in England and Wales under Company Registration No. > > 03798903 > > Directors: Michael Cunningham (USA), Brendan Lane (Ireland), Matt > > Parson(USA), Charlie Peters (USA) > > > > GPG fingerprint : A5D1 9385 88CB 7E5F BE64 6618 BCA6 6E33 F672 > > 2D76 > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v1.4.12 (GNU/Linux) > > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > > > iQEcBAEBAgAGBQJPgFjGAAoJELymbjP2ci12MScIANRBXgWPSjeSZvSM2+bZmDrD > > FefJfxMcCQFtTqWYePXIxFgqeeRcFc57+6alExBRU2g9nKZJEIPn2vj640XSTGlt > > n5T4ItED1IVydzuEXFOAvgaTmZfKzTQkxQWp8QgL6pC7cYgnp2nL7gkbkedx1JyI > > gCgCGomrHeWP2++vUS8UjtCccZdTJiOiWqoH2sBCKgEVcmFMgvYREK6hTou4DHU4 > > DcpureWuLvM4HWUlyfl37eXQOmy66A7uHGp3xF5sykQZ9aozaiMFjSoCqQOEVqO6 > > jHRnsQB6FfF/xU+F/UQK5PKZOm7e+KvrMjhIDfR+/DX3t0rkrtc69gg2O6duy4o= > > =vdud > > -----END PGP SIGNATURE----- From eglynn at redhat.com Tue Apr 10 10:42:04 2012 From: eglynn at redhat.com (Eoghan Glynn) Date: Tue, 10 Apr 2012 06:42:04 -0400 (EDT) Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: <22dc9594-9420-4c67-b982-2ecd9a0c2403@zmail17.collab.prod.int.phx2.redhat.com> Message-ID: <87b17518-a58a-46a8-b73b-ec335cb59be0@zmail11.collab.prod.int.phx2.redhat.com> > The "Floating Disks" feature makes disks into stand-alone entities: a > given disk may be attached to a VM (as all disks are today), or it > may be not attached to any VM, which makes it a floating disk > (http://www.ovirt.org/wiki/Features/FloatingDisk) > > To implement attach/detach of disk to/from VM in REST-API, we intend > to introduce two new actions: > > POST .../api/vms/{vm:id}/disks/{disk:id}/attach > POST .../api/vms/{vm:id}/disks/{disk:id}/detach > > Since we try not to add new actions unless we have to, I want to > explain why I believe that these actions are necessary. > The other implementation would use existing add/remove flows: > > POST .../api/vms/{vm:id}/disks - if the disk was > passed with an ID, attach it to this VM. If no id - create a new > disk. > DELETE .../api/vms/{vm:id}/disks/{disk:id} - *ambiguity > problem, need to add a flag* > > We can't break existing API, so regular DELETE must remove the disk, > as it does today. To detach a disk using DELETE we'd have to add a > flag to the DETELE command. This is quite risky, because if the user > forgets to pass this flag, the disk which he wanted to detach will > actually be deleted. > > Theoretically, if we could break the API, the following modelling > would resolve the ambiguity and perhaps be ideal: > - POST/DELETE disk in root context means create or delete it. > - POST/DELETE disk in VM context means attach or detach it. > But we don't have the privilege of breaking the API. > > Considering all of the above - and the fact that attach/detach nics > to/from host is also implemented using actions - I believe that the > new actions are justifiable. > > Any comments? Hi Ori, I tend to agree that overloading the DELETE verb to either delete or detach the disk is error-prone, and justifies the addition of new detach action in this case. However, I'm wondering whether it would be better, if somewhat asymmetric, to still avoid the attach action, e.g. instead use: POST /api/vms/{vm:id}/disks => attach disk POST /api/vms/{vm:id}/disks/{disk:id}/detach => detach disk The reasoning here would be that: POST /api/vms/{vm:id}/disks/{disk:id}/attach would tend to break the sub-collection idiom in my mind (as the disk in question is not yet part of the disks sub-collection of that VM, prior to the attachment actually occuring). Cheers, Eoghan From gjansen at redhat.com Tue Apr 10 11:35:09 2012 From: gjansen at redhat.com (Geert Jansen) Date: Tue, 10 Apr 2012 13:35:09 +0200 Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: <22dc9594-9420-4c67-b982-2ecd9a0c2403@zmail17.collab.prod.int.phx2.redhat.com> References: <22dc9594-9420-4c67-b982-2ecd9a0c2403@zmail17.collab.prod.int.phx2.redhat.com> Message-ID: <4F841AED.7090407@redhat.com> On 04/09/2012 05:14 PM, Ori Liel wrote: > The "Floating Disks" feature makes disks into stand-alone entities: a given disk may be attached to a VM (as all disks are today), or it may be not attached to any VM, which makes it a floating disk (http://www.ovirt.org/wiki/Features/FloatingDisk) > > To implement attach/detach of disk to/from VM in REST-API, we intend to introduce two new actions: > > POST .../api/vms/{vm:id}/disks/{disk:id}/attach > POST .../api/vms/{vm:id}/disks/{disk:id}/detach > > Since we try not to add new actions unless we have to, I want to explain why I believe that these actions are necessary. > The other implementation would use existing add/remove flows: > > POST .../api/vms/{vm:id}/disks - if the disk was passed with an ID, attach it to this VM. If no id - create a new disk. > DELETE .../api/vms/{vm:id}/disks/{disk:id} - *ambiguity problem, need to add a flag* > > We can't break existing API, so regular DELETE must remove the disk, as it does today. To detach a disk using DELETE we'd have to add a flag to the DETELE command. This is quite risky, because if the user forgets to pass this flag, the disk which he wanted to detach will actually be deleted. > > Theoretically, if we could break the API, the following modelling would resolve the ambiguity and perhaps be ideal: > - POST/DELETE disk in root context means create or delete it. > - POST/DELETE disk in VM context means attach or detach it. > But we don't have the privilege of breaking the API. > > Considering all of the above - and the fact that attach/detach nics to/from host is also implemented using actions - I believe that the new actions are justifiable. > > Any comments? I assume that a floating disk can be attached to 0 VMs as well, right? So i would assume we get a top-level /disks collection correct?? And I assume that collection would only list floating disks? In my view, backwards compatible DELETE semantics for a floating disk aren't that bad: DELETE /vms/{vm:id}/disks/{disk:id} => Accept a true|false argument. => Defaults to "false" for compatibility. This means that DELETE will by default really DELETE any non-floating disk. That is compatibility with today. For safety, implement this: => When deleting a disk that is floating, fail unless is also set to "true". And always fail if one of the other VMs is running (obviously). To attach a disk and make it float, use POST and you and Eoghan described. To detach a disk, use DELETE with true. To delete a non-attached, floating disks, use: DELETE /disks/{disk:id} To delete an attached, floating disk, use: DELETE /vm/{vm:id}/disks/{disk:id} with true; OR DELETE /disks/{disk:id} To create a non-attached, floating, disk, use: POST /disks Regards, Geert From jhernand at redhat.com Tue Apr 10 11:54:51 2012 From: jhernand at redhat.com (Juan Hernandez) Date: Tue, 10 Apr 2012 13:54:51 +0200 Subject: [Engine-devel] Issue with XML namespaces in engine-setup Message-ID: <4F841F8B.8090008@redhat.com> Hello, The code that we use in engine-setup to modify JBoss AS XML configuration files uses the following pattern: datasourceStr = ''' ... ''' xmlObj.addNodes("//datasource:subsystem/datasource:datasources", datasourceStr) This looks correct but is in fact generating a incorrect XML document, as the tags being added are not associated to a namespace. The resulting XML file will be correct, but the temporary representation in memory is not. This causes problems if you later, before writing out the modified file, try to use xpath expressions matching the added nodes: there will be no match. I would suggest that we change the pattern to something like this: datasourceStr = ''' ... ''' datasourceNodes = libxml2.parseDoc(datasourceStr).getRootElement().children xmlObje.addNodes("//datasource:subsystem/datasource:datasources", datasourceNodes) This way both the representation in memory and the resulting file are correct. Le me know what you think. Regards, Juan Hernandez -- Direcci?n Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta 3?D, 28016 Madrid, Spain Inscrita en el Reg. Mercantil de Madrid ? C.I.F. B82657941 - Red Hat S.L. From lpeer at redhat.com Tue Apr 10 12:30:15 2012 From: lpeer at redhat.com (Livnat Peer) Date: Tue, 10 Apr 2012 15:30:15 +0300 Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: <4F841AED.7090407@redhat.com> References: <22dc9594-9420-4c67-b982-2ecd9a0c2403@zmail17.collab.prod.int.phx2.redhat.com> <4F841AED.7090407@redhat.com> Message-ID: <4F8427D7.60707@redhat.com> On 10/04/12 14:35, Geert Jansen wrote: > > > On 04/09/2012 05:14 PM, Ori Liel wrote: >> The "Floating Disks" feature makes disks into stand-alone entities: a >> given disk may be attached to a VM (as all disks are today), or it may >> be not attached to any VM, which makes it a floating disk >> (http://www.ovirt.org/wiki/Features/FloatingDisk) >> >> To implement attach/detach of disk to/from VM in REST-API, we intend >> to introduce two new actions: >> >> POST .../api/vms/{vm:id}/disks/{disk:id}/attach >> POST .../api/vms/{vm:id}/disks/{disk:id}/detach >> >> Since we try not to add new actions unless we have to, I want to >> explain why I believe that these actions are necessary. >> The other implementation would use existing add/remove flows: >> >> POST .../api/vms/{vm:id}/disks - if the disk was >> passed with an ID, attach it to this VM. If no id - create a new disk. >> DELETE .../api/vms/{vm:id}/disks/{disk:id} - *ambiguity >> problem, need to add a flag* >> >> We can't break existing API, so regular DELETE must remove the disk, >> as it does today. To detach a disk using DELETE we'd have to add a >> flag to the DETELE command. This is quite risky, because if the user >> forgets to pass this flag, the disk which he wanted to detach will >> actually be deleted. >> >> Theoretically, if we could break the API, the following modelling >> would resolve the ambiguity and perhaps be ideal: >> - POST/DELETE disk in root context means create or delete it. >> - POST/DELETE disk in VM context means attach or detach it. >> But we don't have the privilege of breaking the API. >> >> Considering all of the above - and the fact that attach/detach nics >> to/from host is also implemented using actions - I believe that the >> new actions are justifiable. >> >> Any comments? > > I assume that a floating disk can be attached to 0 VMs as well, right? floating == attached to 0 VMs > So i would assume we get a top-level /disks collection correct?? Yes > And I assume that collection would only list floating disks? IMO the /disks collection includes all disks in the setup regardless if they are floating or attached to VM/s > > In my view, backwards compatible DELETE semantics for a floating disk > aren't that bad: > > DELETE /vms/{vm:id}/disks/{disk:id} > > => Accept a true|false argument. > => Defaults to "false" for compatibility. > I think that ideally : Detach a disk from VM (becomes floating): DELETE api/vms/{vm:id}/disks/{disk:id} Delete a disk ('real' delete)" DELETE api/disks/{disk:id} I understand that it is changing the current API behavior, it means that a user who deleted disks in 3.0 will end up only detaching them in 3.1, is that something we can't 'live' with? For attach, I would go with Eoghan approach: POST /api/vms/{vm:id}/disks => attach disk > This means that DELETE will by default really DELETE any non-floating > disk. That is compatibility with today. For safety, implement this: > > => When deleting a disk that is floating, fail unless is also > set to "true". And always fail if one of the other VMs is running > (obviously). > > To attach a disk and make it float, use POST and you and Eoghan described. > > To detach a disk, use DELETE with true. > > To delete a non-attached, floating disks, use: > > DELETE /disks/{disk:id} > > To delete an attached, floating disk, use: > > DELETE /vm/{vm:id}/disks/{disk:id} with true; OR ^^ isn't that considered breaking the API? we require force flag for deleting disk which we did not require before. > DELETE /disks/{disk:id} > > To create a non-attached, floating, disk, use: > > POST /disks > > Regards, > Geert > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel From eglynn at redhat.com Tue Apr 10 12:44:09 2012 From: eglynn at redhat.com (Eoghan Glynn) Date: Tue, 10 Apr 2012 08:44:09 -0400 (EDT) Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: <4F841AED.7090407@redhat.com> Message-ID: <986c9ea0-d27d-4ed0-9f53-3894500575f2@zmail11.collab.prod.int.phx2.redhat.com> > In my view, backwards compatible DELETE semantics for a floating disk > aren't that bad: > > DELETE /vms/{vm:id}/disks/{disk:id} > > => Accept a true|false argument. > => Defaults to "false" for compatibility. > > This means that DELETE will by default really DELETE any non-floating > disk. That is compatibility with today. For safety, implement this: > > => When deleting a disk that is floating, fail unless is also > set to "true". And always fail if one of the other VMs is running > (obviously). > > To attach a disk and make it float, use POST and you and Eoghan > described. > > To detach a disk, use DELETE with true. > > To delete a non-attached, floating disks, use: > > DELETE /disks/{disk:id} > > To delete an attached, floating disk, use: > > DELETE /vm/{vm:id}/disks/{disk:id} with true; OR > DELETE /disks/{disk:id} While keeping to the DELETE pattern for detach is attractive, the use of two separate flags (detach and force), plus the requirement to special-case deletion logic in the floating disk case, seems to outweigh the benefit. This scenario would seem to fit in with the critera we applied when choosing actions over standard verbs in the first place - i.e. a case where a standard verb leads to awkward, counter-intuitive or unnatural usage. In this case, the client-side logic to select the force flag and the error handling for an inadvertent DELETE-delete when a DELETE-detach was intended (409 status, I guess?), would seem to me to justify going the action route. Just my 2 cents ... Cheers, Eoghan From oschreib at redhat.com Tue Apr 10 13:48:02 2012 From: oschreib at redhat.com (Ofer Schreiber) Date: Tue, 10 Apr 2012 09:48:02 -0400 (EDT) Subject: [Engine-devel] Unable to Run 'make install-tools' In-Reply-To: <0A1534657992624AACDCA570F1D3E2000D3CBA@SACEXCMBX03-PRD.hq.netapp.com> Message-ID: <0874149a-e5d2-4d53-af37-f7c676e675e5@zmail14.collab.prod.int.phx2.redhat.com> As the Makefile isn't used very often, it need some changes. it seems that you need to run 'make pre_copy' before the `make install-x' ----- Original Message ----- > Greetings, > I?m running into an issue at the ?Deploying engine-config and > engine-manage-domains? section of the ?Building oVirt Engine? > article on the wiki. Building from the source using maven2 has > completed successfully and I?m stuck on the series of commands > listed below: > # cd $OVIRT_HOME > # make create_dirs > # make install_tools > # make install_config > My build fails on the ?make install-tools? command. The output of the > command is below: > [root at ovirt ovirt-engine]# make install_tools > *** Installing Common Tools > cp -f > /root/ovirt-engine/rpmbuild/SOURCES/engine-tools-common-3.1.0-0001.jar > /usr/share/java/ > cp: cannot stat > `/root/ovirt-engine/rpmbuild/SOURCES/engine-tools-common-3.1.0-0001.jar': > No such file or directory > make: *** [install_tools] Error 1 > [root at ovirt ovirt-engine]# pwd > /root/ovirt-engine > [root at ovirt ovirt-engine]# ls > backend build-tools deployment frontend Makefile pom.xml > build_mvn config ear LICENSE packaging > [root at ovirt ovirt-engine]# > Any insight into how to proceed would be greatly appreciated. Thanks! > -- > Dustin Schoenbrun > Software Engineer > NetApp ? Data Center Platforms > 919-476-5919 (office) > dustin.schoenbrun at netapp.com > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From ykaul at redhat.com Tue Apr 10 14:14:27 2012 From: ykaul at redhat.com (Yaniv Kaul) Date: Tue, 10 Apr 2012 17:14:27 +0300 Subject: [Engine-devel] VM Payload feature In-Reply-To: <138723b0-43ed-4271-a4ef-1eaecf5807e4@zmail02.collab.prod.int.phx2.redhat.com> References: <138723b0-43ed-4271-a4ef-1eaecf5807e4@zmail02.collab.prod.int.phx2.redhat.com> Message-ID: <4F844043.6060709@redhat.com> On 01/18/2012 05:41 PM, Oved Ourfalli wrote: > Hey all, > > Continuing the discussion about Aeolus instance data injection to a VM (http://lists.ovirt.org/pipermail/engine-devel/2012-January/000423.html) we propose a new VM Payload feature. > > The following wiki page contains a description page of the feature. > http://www.ovirt.org/wiki/Features/VMPayload > > Please read and review. > There are several approaches there, and we wish to head your opinions and thoughts about them. > > Once we agree on an approach, we will start designing. If the approach has been agreed upon, where is the design Wiki? Specifically, I'm missing GUI mock up and more importantly, API. Y. > > Thank you, > Oved > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel From oliel at redhat.com Tue Apr 10 14:46:11 2012 From: oliel at redhat.com (Ori Liel) Date: Tue, 10 Apr 2012 10:46:11 -0400 (EDT) Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: <4F841AED.7090407@redhat.com> Message-ID: <8c43bc6b-dbe6-4f4b-9b05-ccdd5c9fc0ec@zmail17.collab.prod.int.phx2.redhat.com> > > >On 04/09/2012 05:14 PM, Ori Liel wrote: >> The "Floating Disks" feature makes disks into stand-alone entities: a given disk may be attached to a VM (as all disks are today), or it may be not attached to any VM, which makes it a floating disk (http://www.ovirt.org/wiki/Features/FloatingDisk) >> >> To implement attach/detach of disk to/from VM in REST-API, we intend to introduce two new actions: >> >> POST .../api/vms/{vm:id}/disks/{disk:id}/attach >> POST .../api/vms/{vm:id}/disks/{disk:id}/detach >> >> Since we try not to add new actions unless we have to, I want to explain why I believe that these actions are necessary. >> The other implementation would use existing add/remove flows: >> >> POST .../api/vms/{vm:id}/disks - if the disk was passed with an ID, attach it to this VM. If no id - create a new disk. >> DELETE .../api/vms/{vm:id}/disks/{disk:id} - *ambiguity problem, need to add a flag* >> >> We can't break existing API, so regular DELETE must remove the disk, as it does today. To detach a disk using DELETE we'd have to add a flag to the DETELE command. This is quite risky, because if the user forgets to pass this flag, the disk which he wanted to detach will actually be deleted. >> >> Theoretically, if we could break the API, the following modelling would resolve the ambiguity and perhaps be ideal: >> - POST/DELETE disk in root context means create or delete it. >> - POST/DELETE disk in VM context means attach or detach it. >> But we don't have the privilege of breaking the API. >> >> Considering all of the above - and the fact that attach/detach nics to/from host is also implemented using actions - I believe that the new actions are justifiable. >> >> Any comments? > >I assume that a floating disk can be attached to 0 VMs as well, right? >So i would assume we get a top-level /disks collection correct?? And I >assume that collection would only list floating disks? Indeed, there will be a root collection. but I do not see a reason why this collection should only show floating disks. I tend to think it should show all disks in the system. Keep in mind that we're going towards Shared disks, meaning the same disk may be used by two VMs, so it makes sense to show such a disk in the root collection, along with the information of which VMs it's attached to. > >In my view, backwards compatible DELETE semantics for a floating disk >aren't that bad: > > DELETE /vms/{vm:id}/disks/{disk:id} > >=> Accept a true|false argument. >=> Defaults to "false" for compatibility. > >This means that DELETE will by default really DELETE any non-floating >disk. That is compatibility with today. For safety, implement this: > >=> When deleting a disk that is floating, fail unless is also >set to "true". And always fail if one of the other VMs is running >(obviously). > I Agree with Eoghan that the drawbacks outweigh the benefits in this case, for the reasons Eoghan said. >To attach a disk and make it float, use POST and you and Eoghan described. > >To detach a disk, use DELETE with true. > >To delete a non-attached, floating disks, use: > > DELETE /disks/{disk:id} > >To delete an attached, floating disk, use: > > DELETE /vm/{vm:id}/disks/{disk:id} with true; OR > DELETE /disks/{disk:id} > >To create a non-attached, floating, disk, use: > > POST /disks Worth mentioning that creation of disk that is attached to a VM is still possible by POST to /vms/{vm:id}/disks/ without supplying disk-Id. > >Regards, >Geert Ori From Dustin.Schoenbrun at netapp.com Tue Apr 10 17:21:26 2012 From: Dustin.Schoenbrun at netapp.com (Schoenbrun, Dustin) Date: Tue, 10 Apr 2012 17:21:26 +0000 Subject: [Engine-devel] Unable to Run 'make install-tools' In-Reply-To: <0874149a-e5d2-4d53-af37-f7c676e675e5@zmail14.collab.prod.int.phx2.redhat.com> References: <0A1534657992624AACDCA570F1D3E2000D3CBA@SACEXCMBX03-PRD.hq.netapp.com> <0874149a-e5d2-4d53-af37-f7c676e675e5@zmail14.collab.prod.int.phx2.redhat.com> Message-ID: <0A1534657992624AACDCA570F1D3E2000D7DE8@SACEXCMBX03-PRD.hq.netapp.com> Hey Ofer, The ?make pre_copy? didn?t work either, but adding the line ?mkdir ?p $(SOURCE_DIR)? after the ?echo $(SOURCE_DIR)? in the Makefile made it work! Is there a way that I can contribute this back to the community? Or, since the Makefile isn?t used often, is there something I should be using in its stead? Thanks, Ofer! -- Dustin From: Ofer Schreiber [mailto:oschreib at redhat.com] Sent: Tuesday, April 10, 2012 9:48 AM To: Schoenbrun, Dustin Cc: engine-devel at ovirt.org Subject: Re: [Engine-devel] Unable to Run 'make install-tools' As the Makefile isn't used very often, it need some changes. it seems that you need to run 'make pre_copy' before the `make install-x' ________________________________ Greetings, I?m running into an issue at the ?Deploying engine-config and engine-manage-domains? section of the ?Building oVirt Engine? article on the wiki. Building from the source using maven2 has completed successfully and I?m stuck on the series of commands listed below: # cd $OVIRT_HOME # make create_dirs # make install_tools # make install_config My build fails on the ?make install-tools? command. The output of the command is below: [root at ovirt ovirt-engine]# make install_tools *** Installing Common Tools cp -f /root/ovirt-engine/rpmbuild/SOURCES/engine-tools-common-3.1.0-0001.jar /usr/share/java/ cp: cannot stat `/root/ovirt-engine/rpmbuild/SOURCES/engine-tools-common-3.1.0-0001.jar': No such file or directory make: *** [install_tools] Error 1 [root at ovirt ovirt-engine]# pwd /root/ovirt-engine [root at ovirt ovirt-engine]# ls backend build-tools deployment frontend Makefile pom.xml build_mvn config ear LICENSE packaging [root at ovirt ovirt-engine]# Any insight into how to proceed would be greatly appreciated. Thanks! -- Dustin Schoenbrun Software Engineer NetApp ? Data Center Platforms 919-476-5919 (office) dustin.schoenbrun at netapp.com _______________________________________________ Engine-devel mailing list Engine-devel at ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From oschreib at redhat.com Tue Apr 10 17:51:16 2012 From: oschreib at redhat.com (Ofer Schreiber) Date: Tue, 10 Apr 2012 13:51:16 -0400 (EDT) Subject: [Engine-devel] Unable to Run 'make install-tools' In-Reply-To: <0A1534657992624AACDCA570F1D3E2000D7DE8@SACEXCMBX03-PRD.hq.netapp.com> References: <0A1534657992624AACDCA570F1D3E2000D3CBA@SACEXCMBX03-PRD.hq.netapp.com> <0874149a-e5d2-4d53-af37-f7c676e675e5@zmail14.collab.prod.int.phx2.redhat.com> <0A1534657992624AACDCA570F1D3E2000D7DE8@SACEXCMBX03-PRD.hq.netapp.com> Message-ID: In order to send the patch, please follow instructions at http://www.ovirt.org/wiki/Working_with_oVirt_Gerrit and put me as a reviewer I'll be glad to review it. Since I don't know exactly what you're doing, its a bit hard for me to help you or tell you the right way to do it. Ofer On 10 Apr 2012, at 20:21, "Schoenbrun, Dustin" wrote: > Hey Ofer, > > The ?make pre_copy? didn?t work either, but adding the line ?mkdir ?p $(SOURCE_DIR)? after the ?echo $(SOURCE_DIR)? in the Makefile made it work! Is there a way that I can contribute this back to the community? Or, since the Makefile isn?t used often, is there something I should be using in its stead? Thanks, Ofer! > > -- Dustin > > From: Ofer Schreiber [mailto:oschreib at redhat.com] > Sent: Tuesday, April 10, 2012 9:48 AM > To: Schoenbrun, Dustin > Cc: engine-devel at ovirt.org > Subject: Re: [Engine-devel] Unable to Run 'make install-tools' > > As the Makefile isn't used very often, it need some changes. > it seems that you need to run 'make pre_copy' before the `make install-x' > > > Greetings, > > I?m running into an issue at the ?Deploying engine-config and engine-manage-domains? section of the ?Building oVirt Engine? article on the wiki. Building from the source using maven2 has completed successfully and I?m stuck on the series of commands listed below: > > # cd $OVIRT_HOME > # make create_dirs > # make install_tools > # make install_config > > My build fails on the ?make install-tools? command. The output of the command is below: > > [root at ovirt ovirt-engine]# make install_tools > *** Installing Common Tools > cp -f /root/ovirt-engine/rpmbuild/SOURCES/engine-tools-common-3.1.0-0001.jar /usr/share/java/ > cp: cannot stat `/root/ovirt-engine/rpmbuild/SOURCES/engine-tools-common-3.1.0-0001.jar': No such file or directory > make: *** [install_tools] Error 1 > [root at ovirt ovirt-engine]# pwd > /root/ovirt-engine > [root at ovirt ovirt-engine]# ls > backend build-tools deployment frontend Makefile pom.xml > build_mvn config ear LICENSE packaging > [root at ovirt ovirt-engine]# > > Any insight into how to proceed would be greatly appreciated. Thanks! > > -- > Dustin Schoenbrun > Software Engineer > NetApp ? Data Center Platforms > 919-476-5919 (office) > dustin.schoenbrun at netapp.com > > > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Dustin.Schoenbrun at netapp.com Tue Apr 10 17:57:51 2012 From: Dustin.Schoenbrun at netapp.com (Schoenbrun, Dustin) Date: Tue, 10 Apr 2012 17:57:51 +0000 Subject: [Engine-devel] Unable to Run 'make install-tools' In-Reply-To: References: <0A1534657992624AACDCA570F1D3E2000D3CBA@SACEXCMBX03-PRD.hq.netapp.com> <0874149a-e5d2-4d53-af37-f7c676e675e5@zmail14.collab.prod.int.phx2.redhat.com> <0A1534657992624AACDCA570F1D3E2000D7DE8@SACEXCMBX03-PRD.hq.netapp.com> Message-ID: <0A1534657992624AACDCA570F1D3E2000D7E96@SACEXCMBX03-PRD.hq.netapp.com> Will do. I?ll submit a patch here shortly. Thanks for the help, Ofer! -- Dustin From: Ofer Schreiber [mailto:oschreib at redhat.com] Sent: Tuesday, April 10, 2012 1:51 PM To: Schoenbrun, Dustin Cc: engine-devel at ovirt.org Subject: Re: [Engine-devel] Unable to Run 'make install-tools' In order to send the patch, please follow instructions at http://www.ovirt.org/wiki/Working_with_oVirt_Gerrit and put me as a reviewer I'll be glad to review it. Since I don't know exactly what you're doing, its a bit hard for me to help you or tell you the right way to do it. Ofer On 10 Apr 2012, at 20:21, "Schoenbrun, Dustin" > wrote: Hey Ofer, The ?make pre_copy? didn?t work either, but adding the line ?mkdir ?p $(SOURCE_DIR)? after the ?echo $(SOURCE_DIR)? in the Makefile made it work! Is there a way that I can contribute this back to the community? Or, since the Makefile isn?t used often, is there something I should be using in its stead? Thanks, Ofer! -- Dustin From: Ofer Schreiber [mailto:oschreib at redhat.com] Sent: Tuesday, April 10, 2012 9:48 AM To: Schoenbrun, Dustin Cc: engine-devel at ovirt.org Subject: Re: [Engine-devel] Unable to Run 'make install-tools' As the Makefile isn't used very often, it need some changes. it seems that you need to run 'make pre_copy' before the `make install-x' ________________________________ Greetings, I?m running into an issue at the ?Deploying engine-config and engine-manage-domains? section of the ?Building oVirt Engine? article on the wiki. Building from the source using maven2 has completed successfully and I?m stuck on the series of commands listed below: # cd $OVIRT_HOME # make create_dirs # make install_tools # make install_config My build fails on the ?make install-tools? command. The output of the command is below: [root at ovirt ovirt-engine]# make install_tools *** Installing Common Tools cp -f /root/ovirt-engine/rpmbuild/SOURCES/engine-tools-common-3.1.0-0001.jar /usr/share/java/ cp: cannot stat `/root/ovirt-engine/rpmbuild/SOURCES/engine-tools-common-3.1.0-0001.jar': No such file or directory make: *** [install_tools] Error 1 [root at ovirt ovirt-engine]# pwd /root/ovirt-engine [root at ovirt ovirt-engine]# ls backend build-tools deployment frontend Makefile pom.xml build_mvn config ear LICENSE packaging [root at ovirt ovirt-engine]# Any insight into how to proceed would be greatly appreciated. Thanks! -- Dustin Schoenbrun Software Engineer NetApp ? Data Center Platforms 919-476-5919 (office) dustin.schoenbrun at netapp.com _______________________________________________ Engine-devel mailing list Engine-devel at ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From ecohen at redhat.com Tue Apr 10 19:27:15 2012 From: ecohen at redhat.com (Einav Cohen) Date: Tue, 10 Apr 2012 15:27:15 -0400 (EDT) Subject: [Engine-devel] "add permission to user" dialog - nothing shown by default In-Reply-To: Message-ID: <79288bbf-eda3-491d-84c7-9d42cb04d2b3@zmail04.collab.prod.int.phx2.redhat.com> [https://bugzilla.redhat.com/show_bug.cgi?id=810287] When opening the "add permission to user" dialog, no user is shown in the grid by default; user has to enter something in the search text-box within the dialog (or leave it empty) and hit "Go"; only then the list of users is being filled (according to the search text-box contents). This behavior is by design. Do you think that this behavior should change? i.e. do you think that the users grid should be filled right after opening the dialog with a list of all users? Please consider the following: - calling to the search query and rendering its results may take a while, so user may open the dialog, but will be able to do something only after waiting a while (when originally, all he intended to do was to search a very particular user, which would have taken a short time). - we may have several domains, so grid will be filled with results of the first domain selected (which might not be the domain that the user intended to search originally), so this may be annoying. Due to the reasons above, my personal take is that the current behavior is OK and shouldn't be changed (i.e. BZ should be closed). Any comments? From acathrow at redhat.com Wed Apr 11 02:04:20 2012 From: acathrow at redhat.com (Andrew Cathrow) Date: Tue, 10 Apr 2012 22:04:20 -0400 (EDT) Subject: [Engine-devel] "add permission to user" dialog - nothing shown by default In-Reply-To: <79288bbf-eda3-491d-84c7-9d42cb04d2b3@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: ----- Original Message ----- > From: "Einav Cohen" > To: "Miki Kenneth" , "Andrew Cathrow" , "Simon Grinberg" > > Cc: "Avihai Shoham" , engine-devel at ovirt.org > Sent: Tuesday, April 10, 2012 3:27:15 PM > Subject: "add permission to user" dialog - nothing shown by default > > [https://bugzilla.redhat.com/show_bug.cgi?id=810287] > > When opening the "add permission to user" dialog, no user is shown in > the grid by default; user has to enter something in the search > text-box within the dialog (or leave it empty) and hit "Go"; only > then the list of users is being filled (according to the search > text-box contents). > > This behavior is by design. > > Do you think that this behavior should change? i.e. do you think that > the users grid should be filled right after opening the dialog with > a list of all users? > Please consider the following: > > - calling to the search query and rendering its results may take a > while, so user may open the dialog, but will be able to do something > only after waiting a while (when originally, all he intended to do > was to search a very particular user, which would have taken a short > time). > > - we may have several domains, so grid will be filled with results of > the first domain selected (which might not be the domain that the > user intended to search originally), so this may be annoying. > > Due to the reasons above, my personal take is that the current > behavior is OK and shouldn't be changed (i.e. BZ should be closed). > > Any comments? Agree, I've commented and closed it. > > From eedri at redhat.com Wed Apr 11 07:25:04 2012 From: eedri at redhat.com (Eyal Edri) Date: Wed, 11 Apr 2012 03:25:04 -0400 (EDT) Subject: [Engine-devel] Jenkins Support next week 15/04-18/04 In-Reply-To: <5596b014-d80c-4267-9434-4f5c26ead245@zmail17.collab.prod.int.phx2.redhat.com> Message-ID: I will be OOO next week, for any urgent issues with jenkins.ovirt.org, please contact infra at ovirt.org. Eyal Edri oVirt Infra Team From oschreib at redhat.com Wed Apr 11 07:51:37 2012 From: oschreib at redhat.com (Ofer Schreiber) Date: Wed, 11 Apr 2012 03:51:37 -0400 (EDT) Subject: [Engine-devel] Issue with XML namespaces in engine-setup In-Reply-To: <4F841F8B.8090008@redhat.com> Message-ID: <1fb55ffa-288e-4dd0-863d-810f99481760@zmail14.collab.prod.int.phx2.redhat.com> ----- Original Message ----- > Hello, > > The code that we use in engine-setup to modify JBoss AS XML > configuration files uses the following pattern: > > datasourceStr = ''' > > ... > > ''' > > xmlObj.addNodes("//datasource:subsystem/datasource:datasources", > datasourceStr) > > This looks correct but is in fact generating a incorrect XML > document, > as the tags being added are not associated to a namespace. The > resulting > XML file will be correct, but the temporary representation in memory > is > not. This causes problems if you later, before writing out the > modified > file, try to use xpath expressions matching the added nodes: there > will > be no match. > > I would suggest that we change the pattern to something like this: > > datasourceStr = ''' > > > ... > > > ''' > datasourceNodes = > libxml2.parseDoc(datasourceStr).getRootElement().children > > xmlObje.addNodes("//datasource:subsystem/datasource:datasources", > datasourceNodes) > > This way both the representation in memory and the resulting file are > correct. > > Le me know what you think. As long as it work, I have no problem with that, sounds the right thing to do. btw- why would you want to use xpath on the "in memory" xml? (In your specific case I mean, not in general) > > Regards, > Juan Hernandez > -- > Direcci?n Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta > 3?D, 28016 Madrid, Spain > Inscrita en el Reg. Mercantil de Madrid ? C.I.F. B82657941 - Red Hat > S.L. > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel > From jhernand at redhat.com Wed Apr 11 07:57:29 2012 From: jhernand at redhat.com (Juan Hernandez) Date: Wed, 11 Apr 2012 09:57:29 +0200 Subject: [Engine-devel] Issue with XML namespaces in engine-setup In-Reply-To: <1fb55ffa-288e-4dd0-863d-810f99481760@zmail14.collab.prod.int.phx2.redhat.com> References: <1fb55ffa-288e-4dd0-863d-810f99481760@zmail14.collab.prod.int.phx2.redhat.com> Message-ID: <4F853969.2050509@redhat.com> On 04/11/2012 09:51 AM, Ofer Schreiber wrote: > > > ----- Original Message ----- >> Hello, >> >> The code that we use in engine-setup to modify JBoss AS XML >> configuration files uses the following pattern: >> >> datasourceStr = ''' >> >> ... >> >> ''' >> >> xmlObj.addNodes("//datasource:subsystem/datasource:datasources", >> datasourceStr) >> >> This looks correct but is in fact generating a incorrect XML >> document, >> as the tags being added are not associated to a namespace. The >> resulting >> XML file will be correct, but the temporary representation in memory >> is >> not. This causes problems if you later, before writing out the >> modified >> file, try to use xpath expressions matching the added nodes: there >> will >> be no match. >> >> I would suggest that we change the pattern to something like this: >> >> datasourceStr = ''' >> >> >> ... >> >> >> ''' >> datasourceNodes = >> libxml2.parseDoc(datasourceStr).getRootElement().children >> >> xmlObje.addNodes("//datasource:subsystem/datasource:datasources", >> datasourceNodes) >> >> This way both the representation in memory and the resulting file are >> correct. >> >> Le me know what you think. > > As long as it work, I have no problem with that, sounds the right thing to do. > btw- why would you want to use xpath on the "in memory" xml? (In your specific case I mean, not in general) The specific case is that in the Fedora 17 JBoss AS RPM the default standaonle.xml file doesn't contain a tag, so I wanted to do something like this: 1. Check if the datasources tag is there, if not add it. 2. Add the new datasource tag, like we do now. Step 2 fails: the xpath that we use in xmlObj.addNodes doesn't match the datasources tag added in step 1 because the in memory XML is not using the right namespace. -- Direcci?n Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta 3?D, 28016 Madrid, Spain Inscrita en el Reg. Mercantil de Madrid ? C.I.F. B82657941 - Red Hat S.L. From oliel at redhat.com Wed Apr 11 08:32:51 2012 From: oliel at redhat.com (Ori Liel) Date: Wed, 11 Apr 2012 04:32:51 -0400 (EDT) Subject: [Engine-devel] Hot-plug of disks and nics In-Reply-To: <33beba9e-adc4-4f8f-a685-3e2de398fc61@zmail17.collab.prod.int.phx2.redhat.com> Message-ID: On the subject of activate/deactivate disks and nics ("hot-plug"), I'd like to hear opinions about the correct modelling. I see two possible options (I will use disks as an example, but the chosen modelling should be the same for nics and disks). Option 1 - update: ================= PUT .../api/vms/{vm:id}/disks/{disk:id} true Pros: ----- * RESTful, no need for new action Cons: ----- * Inconsistent with other flows. We do not normally update status fields to perform actions. For example to run a VM, we do not update it's status to 'activated', we run an action (start). * Enables user to update disk properties AND activate/deactivate in the same operation. Updating certain disk properties is forbidden while the VM is up, but activating/deactivating the disk is allowed always. This requires business-logic in REST-API: if the user activates the disk and changes properties on it - REST-API must first change the properties and then activate the disk (if disk is activated first, update properties will fail). If, on the other hand, the user *deactivates* the disk and changes properties on it - REST-API must first deactivate the disk and then change the properties (changing properties while disk is still active will fail). This bug-prone logic is only necessary because when activate/deactivate is merged with update. Option 2 - action ================= .../api/vms/{vm:id}/disks/{disk:id}/attach Pros: ---- * Less RESTful Cons: ----- * Consistent with other flows * Does not have the drawback of the additional business-logic described above Opinions? Thanks, Ori. From oliel at redhat.com Wed Apr 11 08:34:32 2012 From: oliel at redhat.com (Ori Liel) Date: Wed, 11 Apr 2012 04:34:32 -0400 (EDT) Subject: [Engine-devel] Hot-plug of disks and nics In-Reply-To: Message-ID: > > >----- Original Message ----- >From: "Ori Liel" >To: engine-devel at ovirt.org >Cc: meyering at redhat.com, eglynn at redhat.com, gjansen at redhat.com, jhernand at redhat.com, "Einav Cohen" , "Roy Golan" , "Michael Kublin" >Sent: Wednesday, April 11, 2012 11:32:51 AM >Subject: Hot-plug of disks and nics > >On the subject of activate/deactivate disks and nics ("hot-plug"), I'd like to hear opinions about the correct modelling. I see two possible options (I will use disks as an example, but the chosen modelling should be the same for nics and disks). > >Option 1 - update: >================= >PUT >.../api/vms/{vm:id}/disks/{disk:id} > > true > > >Pros: >----- >* RESTful, no need for new action > >Cons: >----- >* Inconsistent with other flows. We do not normally update status fields to perform actions. For example to run a VM, we do not update it's status to 'activated', we run an action (start). >* Enables user to update disk properties AND activate/deactivate in the same operation. Updating certain disk properties is forbidden while the VM is up, but activating/deactivating the disk is allowed always. This requires business-logic in REST-API: if the user activates the disk and changes properties on it - REST-API must first change the properties and then activate the disk (if disk is activated first, update properties will fail). If, on the other hand, the user *deactivates* the disk and changes properties on it - REST-API must first deactivate the disk and then change the properties (changing properties while disk is still active will fail). This bug-prone logic is only necessary because when activate/deactivate is merged with update. > > > >Option 2 - action >================= > >.../api/vms/{vm:id}/disks/{disk:id}/attach Minor correction, I meant .../api/vms/{vm:id}/disks/{disk:id}/activate (not .../attach) > >Pros: >---- >* Less RESTful > >Cons: >----- >* Consistent with other flows >* Does not have the drawback of the additional business-logic described above > > >Opinions? > >Thanks, > >Ori. From abaron at redhat.com Wed Apr 11 08:50:58 2012 From: abaron at redhat.com (Ayal Baron) Date: Wed, 11 Apr 2012 04:50:58 -0400 (EDT) Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: <4F8427D7.60707@redhat.com> Message-ID: <03e10fcb-1fa7-4762-b5db-0eeb369f2de5@zmail13.collab.prod.int.phx2.redhat.com> ----- Original Message ----- > On 10/04/12 14:35, Geert Jansen wrote: > > > > > > On 04/09/2012 05:14 PM, Ori Liel wrote: > >> The "Floating Disks" feature makes disks into stand-alone > >> entities: a > >> given disk may be attached to a VM (as all disks are today), or it > >> may > >> be not attached to any VM, which makes it a floating disk > >> (http://www.ovirt.org/wiki/Features/FloatingDisk) > >> > >> To implement attach/detach of disk to/from VM in REST-API, we > >> intend > >> to introduce two new actions: > >> > >> POST .../api/vms/{vm:id}/disks/{disk:id}/attach > >> POST .../api/vms/{vm:id}/disks/{disk:id}/detach > >> > >> Since we try not to add new actions unless we have to, I want to > >> explain why I believe that these actions are necessary. > >> The other implementation would use existing add/remove flows: > >> > >> POST .../api/vms/{vm:id}/disks - if the disk > >> was > >> passed with an ID, attach it to this VM. If no id - create a new > >> disk. > >> DELETE .../api/vms/{vm:id}/disks/{disk:id} - *ambiguity > >> problem, need to add a flag* > >> > >> We can't break existing API, so regular DELETE must remove the > >> disk, > >> as it does today. To detach a disk using DELETE we'd have to add a > >> flag to the DETELE command. This is quite risky, because if the > >> user > >> forgets to pass this flag, the disk which he wanted to detach will > >> actually be deleted. > >> > >> Theoretically, if we could break the API, the following modelling > >> would resolve the ambiguity and perhaps be ideal: > >> - POST/DELETE disk in root context means create or delete it. > >> - POST/DELETE disk in VM context means attach or detach it. > >> But we don't have the privilege of breaking the API. > >> > >> Considering all of the above - and the fact that attach/detach > >> nics > >> to/from host is also implemented using actions - I believe that > >> the > >> new actions are justifiable. > >> > >> Any comments? > > > > I assume that a floating disk can be attached to 0 VMs as well, > > right? > > floating == attached to 0 VMs > > > So i would assume we get a top-level /disks collection correct?? > > Yes > > > And I assume that collection would only list floating disks? > > IMO the /disks collection includes all disks in the setup regardless > if > they are floating or attached to VM/s > > > > > In my view, backwards compatible DELETE semantics for a floating > > disk > > aren't that bad: > > > > DELETE /vms/{vm:id}/disks/{disk:id} > > > > => Accept a true|false argument. > > => Defaults to "false" for compatibility. > > > > I think that ideally : > > Detach a disk from VM (becomes floating): > DELETE api/vms/{vm:id}/disks/{disk:id} > > Delete a disk ('real' delete)" > DELETE api/disks/{disk:id} Assuming this also works when the disk is attached to a VM then the above seems to me like the simplest and clearest path. i.e. DELETE in VM context detaches DELETE in DISKS context really deletes POST in VM context attaches (and creates if does not yet exist) POST in DISKS context creates floating. Only thing is that to create and attach you post to VM but the complementary detach and delete is delete from disks (i.e. not symmetrical). > > I understand that it is changing the current API behavior, it means > that > a user who deleted disks in 3.0 will end up only detaching them in > 3.1, > is that something we can't 'live' with? > > For attach, I would go with Eoghan approach: > > POST /api/vms/{vm:id}/disks > => attach disk > > > > > This means that DELETE will by default really DELETE any > > non-floating > > disk. That is compatibility with today. For safety, implement this: > > > > => When deleting a disk that is floating, fail unless is > > also > > set to "true". And always fail if one of the other VMs is running > > (obviously). > > > > To attach a disk and make it float, use POST and you and Eoghan > > described. > > > > To detach a disk, use DELETE with true. > > > > To delete a non-attached, floating disks, use: > > > > DELETE /disks/{disk:id} > > > > To delete an attached, floating disk, use: > > > > DELETE /vm/{vm:id}/disks/{disk:id} with true; OR > > ^^ isn't that considered breaking the API? we require force flag for > deleting disk which we did not require before. > > > DELETE /disks/{disk:id} > > > > To create a non-attached, floating, disk, use: > > > > POST /disks > > > > Regards, > > Geert > > _______________________________________________ > > Engine-devel mailing list > > Engine-devel at ovirt.org > > http://lists.ovirt.org/mailman/listinfo/engine-devel > > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel > From eglynn at redhat.com Wed Apr 11 09:02:37 2012 From: eglynn at redhat.com (Eoghan Glynn) Date: Wed, 11 Apr 2012 05:02:37 -0400 (EDT) Subject: [Engine-devel] Hot-plug of disks and nics In-Reply-To: Message-ID: <42673a31-5f7b-4842-b32a-77aed4113cf9@zmail11.collab.prod.int.phx2.redhat.com> > * Inconsistent with other flows. We do not normally update status > fields to perform actions. For example to run a VM, we do not update > it's status to 'activated', we run an action (start). I think this point is the crux of the matter. IMO the consistency between activation implemented as direct state manipulation versus the state change occurring as a side-effect of an action, would be a deal-breaker. IIRC one of the reasons we avoided that kind of direct state manipulation first time round is that it doesn't lend itself to multi-state transitions, e.g. activation that traversed multiple intermediate states, say: quiescent->pending->activating->activated That example is a bit contrived and unrealistic, but in any case the principal is that the client-visible state machine for a resource may not necessarily transition directly from the initial to the terminal state. Also an action as opposed to a direct state manipulation makes it more natural to express side-effects of the activation, and to implement in-progress status querying or cancelation. For those reasons, I'm thinking that using actions consistently accross the board is better than exposing an action in one case while allowing a direct state manipulation in another. So my vote would be for option #2. Cheers, Eoghan From oliel at redhat.com Wed Apr 11 09:06:23 2012 From: oliel at redhat.com (Ori Liel) Date: Wed, 11 Apr 2012 05:06:23 -0400 (EDT) Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: <87b17518-a58a-46a8-b73b-ec335cb59be0@zmail11.collab.prod.int.phx2.redhat.com> Message-ID: <80a657f3-dc74-4b3d-a1e5-43fc84e8590d@zmail17.collab.prod.int.phx2.redhat.com> > > >----- Original Message ----- >From: "Eoghan Glynn" >To: "Ori Liel" >Cc: meyering at redhat.com, jhernand at redhat.com, "Geert Jansen" , "Einav Cohen" , "Michael Pasternak" , "Michael Kublin" , engine-devel at ovirt.org >Sent: Tuesday, April 10, 2012 1:42:04 PM >Subject: Re: Floating Disks implementation in REST-API > > > >> The "Floating Disks" feature makes disks into stand-alone entities: a >> given disk may be attached to a VM (as all disks are today), or it >> may be not attached to any VM, which makes it a floating disk >> (http://www.ovirt.org/wiki/Features/FloatingDisk) >> >> To implement attach/detach of disk to/from VM in REST-API, we intend >> to introduce two new actions: >> >> POST .../api/vms/{vm:id}/disks/{disk:id}/attach >> POST .../api/vms/{vm:id}/disks/{disk:id}/detach >> >> Since we try not to add new actions unless we have to, I want to >> explain why I believe that these actions are necessary. >> The other implementation would use existing add/remove flows: >> >> POST .../api/vms/{vm:id}/disks - if the disk was >> passed with an ID, attach it to this VM. If no id - create a new >> disk. >> DELETE .../api/vms/{vm:id}/disks/{disk:id} - *ambiguity >> problem, need to add a flag* >> >> We can't break existing API, so regular DELETE must remove the disk, >> as it does today. To detach a disk using DELETE we'd have to add a >> flag to the DETELE command. This is quite risky, because if the user >> forgets to pass this flag, the disk which he wanted to detach will >> actually be deleted. >> >> Theoretically, if we could break the API, the following modelling >> would resolve the ambiguity and perhaps be ideal: >> - POST/DELETE disk in root context means create or delete it. >> - POST/DELETE disk in VM context means attach or detach it. >> But we don't have the privilege of breaking the API. >> >> Considering all of the above - and the fact that attach/detach nics >> to/from host is also implemented using actions - I believe that the >> new actions are justifiable. >> >> Any comments? > >Hi Ori, > >I tend to agree that overloading the DELETE verb to either delete or detach >the disk is error-prone, and justifies the addition of new detach action >in this case. > >However, I'm wondering whether it would be better, if somewhat asymmetric, >to still avoid the attach action, e.g. instead use: > > POST /api/vms/{vm:id}/disks > => attach disk > > POST /api/vms/{vm:id}/disks/{disk:id}/detach => detach disk > >The reasoning here would be that: > > POST /api/vms/{vm:id}/disks/{disk:id}/attach > >would tend to break the sub-collection idiom in my mind (as the disk in question >is not yet part of the disks sub-collection of that VM, prior to the attachment >actually occuring). Eoghan, I agree with you; this is actually a crushing argument against 'attach' action, which I overlooked. But I dislike the asymmetry of detaching using an action, and attaching using POST. So I'm now actually advocating: POST /api/vms/{vm:id}/disks => attach disk DELETE .../api/vms/{vm:id}/disks/{disk:id} true => detach disk If you can agree to this then Geert, you and myself would be aligned (right Geert?), and I can go forward with implementation. Thanks, Ori. > >Cheers, >Eoghan From jhernand at redhat.com Wed Apr 11 09:25:01 2012 From: jhernand at redhat.com (Juan Hernandez) Date: Wed, 11 Apr 2012 11:25:01 +0200 Subject: [Engine-devel] Problem with detachment of host interface using ovirt-sdk In-Reply-To: <4488206DC085244C886DBC9E7038B6892516DF3B@mtrdag02.mtl.com> References: <4488206DC085244C886DBC9E7038B68918D382CE@MTRDAG01.mtl.com>, <4F6EC05A.9010209@redhat.com> <4488206DC085244C886DBC9E7038B6892516DF3B@mtrdag02.mtl.com> Message-ID: <4F854DED.2050900@redhat.com> Itzik, can you provide the complete python script that is generating that fault? I will try to reproduce it in my environment. It will be also helpful to know the exact version of ovirt-engine-sdk that you are using. If you cloned the git repository just tell me what is the commit. On 04/02/2012 09:45 AM, Itzik Brown wrote: > Hi, > > I tried using ovirt-sdk against ovirt-engine-3.0.0_0001-1.6. > I still get the same result: > > 10:29:26,554 WARN [org.jboss.resteasy.core.SynchronousDispatcher] (http--0.0.0.0-8080-4) failed to execute: org.ovirt.engine.api.restapi.resource.BaseBackendResource$WebFaultException > at org.ovirt.engine.api.restapi.resource.BaseBackendResource.handleError(BaseBackendResource.java:207) [restapi-jaxrs-3.0.0-0001.jar:] > at org.ovirt.engine.api.restapi.resource.BaseBackendResource.handleError(BaseBackendResource.java:183) [restapi-jaxrs-3.0.0-0001.jar:] > at org.ovirt.engine.api.restapi.resource.BackendHostNicsResource.lookupNetwork(BackendHostNicsResource.java:242) [restapi-jaxrs-3.0.0-0001.jar:] > at org.ovirt.engine.api.restapi.resource.BackendHostNicResource.doAttachAction(BackendHostNicResource.java:56) [restapi-jaxrs-3.0.0-0001.jar:] > at org.ovirt.engine.api.restapi.resource.BackendHostNicResource.detach(BackendHostNicResource.java:75) [restapi-jaxrs-3.0.0-0001.jar:] > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_24] > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [:1.6.0_24] > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.6.0_24] > at java.lang.reflect.Method.invoke(Method.java:616) [:1.6.0_24] > > Please advise, > Itzik > > ________________________________ > From: engine-devel-bounces at ovirt.org [engine-devel-bounces at ovirt.org] on behalf of Roy Golan [rgolan at redhat.com] > Sent: Sunday, March 25, 2012 8:51 AM > To: engine-devel at ovirt.org > Subject: Re: [Engine-devel] Problem with detachment of host interface using ovirt-sdk > > On 03/22/2012 10:43 AM, Itzik Brown wrote: > Hi, > > I'm using ovirt-sdk to attach and detach a network to a host's Interface. > Once the network is attached to the interface I try to detach the network from the interface using the following steps: > > 1.Detach the network from the cluster through the GUI. > 2.Remove the network from the datacenter through the GUI. > 3.Detach the network from the host's interface using the SDK: > > nic = api.hosts.get(name=host).nics.get(name=if_name) > net = params.Network(name=net_name) > act = params.Action(network=net) > nic.detach(act) > api.hosts.get(name=host).commitnetconfig() > > Then I get the error: > http://pastebin.com/3Md07huE > > The same flow using the GUI works fine. > > Network removal from the Datacenter is a trigger for me to run the detachment operation therefore I use this flow. > > I use the following components: > > rhevm-3.0.2_0001-2 > ovirt-sdk (Using the latest from git repository) > > Please advise how to proceed. > > Thanks, > Itzik > > > > This body part will be downloaded on demand. > > Ovirt-sdk and rhevm don't comply (ovirt-sdk is based on the upstream version of rhevm) > > Use the REST api instead: > > curl -X POST user at domain:password -H "Content-Type: application/xml" -d@/path/to/file.xml https://rhevm:8843/api/hosts/{host-id}/nics/{nic-id}/detach > > file.xml: > > > > eth0 > > > > > > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel -- Direcci?n Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta 3?D, 28016 Madrid, Spain Inscrita en el Reg. Mercantil de Madrid ? C.I.F. B82657941 - Red Hat S.L. From oliel at redhat.com Wed Apr 11 10:32:15 2012 From: oliel at redhat.com (Ori Liel) Date: Wed, 11 Apr 2012 06:32:15 -0400 (EDT) Subject: [Engine-devel] Hot-plug of disks and nics In-Reply-To: <874nsqk2pc.fsf@rho.meyering.net> Message-ID: <7fb68382-00d2-4a87-9066-334a21558e93@zmail17.collab.prod.int.phx2.redhat.com> > > >----- Original Message ----- >From: "Jim Meyering" >To: "Ori Liel" >Cc: engine-devel at ovirt.org, eglynn at redhat.com, gjansen at redhat.com, jhernand at redhat.com, "Einav Cohen" , "Roy Golan" , "Michael Kublin" >Sent: Wednesday, April 11, 2012 1:00:47 PM >Subject: Re: Hot-plug of disks and nics > >Ori Liel wrote: >> On the subject of activate/deactivate disks and nics ("hot-plug"), I'd >> like to hear opinions about the correct modelling. I see two possible >> options (I will use disks as an example, but the chosen modelling >> should be the same for nics and disks). >> >> Option 1 - update: >> ================= >> PUT >> .../api/vms/{vm:id}/disks/{disk:id} >> >> true >> >> >> Pros: >> ----- >> * RESTful, no need for new action >> >> Cons: >> ----- >> * Inconsistent with other flows. We do not normally update status >> fields to perform actions. For example to run a VM, we do not update >> it's status to 'activated', we run an action (start). >> * Enables user to update disk properties AND activate/deactivate in >> the same operation. Updating certain disk properties is forbidden >> while the VM is up, but activating/deactivating the disk is allowed >> always. This requires business-logic in REST-API: if the user >> activates the disk and changes properties on it - REST-API must first >> change the properties and then activate the disk (if disk is activated >> first, update properties will fail). If, on the other hand, the user >> *deactivates* the disk and changes properties on it - REST-API must >> first deactivate the disk and then change the properties (changing >> properties while disk is still active will fail). This bug-prone logic >> is only necessary because when activate/deactivate is merged with >> update. >> >> >> >> Option 2 - action >> ================= >> >> .../api/vms/{vm:id}/disks/{disk:id}/[activate] >> >> [Con]: >> ---- >> * Less RESTful >> >> [Pros]: >> ----- >> * Consistent with other flows >> * Does not have the drawback of the additional business-logic described above > >I too prefer #2. >IMHO, we need not be slaves to consistency or RESTfulness, but here, >consistency wins hands down when strict conformance to REST guidelines >evokes a paragraph worth of "Cons". #2 it is then. Thanks Jim, Eoghan From lpeer at redhat.com Wed Apr 11 10:33:01 2012 From: lpeer at redhat.com (Livnat Peer) Date: Wed, 11 Apr 2012 13:33:01 +0300 Subject: [Engine-devel] ovirt core sync agenda Message-ID: <4F855DDD.7010903@redhat.com> Hi All, We have nothing on the agenda for today. If you have something you would like to discuss please reply to this mail otherwise we'll cancel today's meeting. Thanks, Livnat From meyering at redhat.com Wed Apr 11 10:00:47 2012 From: meyering at redhat.com (Jim Meyering) Date: Wed, 11 Apr 2012 12:00:47 +0200 Subject: [Engine-devel] Hot-plug of disks and nics In-Reply-To: (Ori Liel's message of "Wed, 11 Apr 2012 04:32:51 -0400 (EDT)") References: Message-ID: <874nsqk2pc.fsf@rho.meyering.net> Ori Liel wrote: > On the subject of activate/deactivate disks and nics ("hot-plug"), I'd > like to hear opinions about the correct modelling. I see two possible > options (I will use disks as an example, but the chosen modelling > should be the same for nics and disks). > > Option 1 - update: > ================= > PUT > .../api/vms/{vm:id}/disks/{disk:id} > > true > > > Pros: > ----- > * RESTful, no need for new action > > Cons: > ----- > * Inconsistent with other flows. We do not normally update status > fields to perform actions. For example to run a VM, we do not update > it's status to 'activated', we run an action (start). > * Enables user to update disk properties AND activate/deactivate in > the same operation. Updating certain disk properties is forbidden > while the VM is up, but activating/deactivating the disk is allowed > always. This requires business-logic in REST-API: if the user > activates the disk and changes properties on it - REST-API must first > change the properties and then activate the disk (if disk is activated > first, update properties will fail). If, on the other hand, the user > *deactivates* the disk and changes properties on it - REST-API must > first deactivate the disk and then change the properties (changing > properties while disk is still active will fail). This bug-prone logic > is only necessary because when activate/deactivate is merged with > update. > > > > Option 2 - action > ================= > > .../api/vms/{vm:id}/disks/{disk:id}/[activate] > > [Con]: > ---- > * Less RESTful > > [Pros]: > ----- > * Consistent with other flows > * Does not have the drawback of the additional business-logic described above I too prefer #2. IMHO, we need not be slaves to consistency or RESTfulness, but here, consistency wins hands down when strict conformance to REST guidelines evokes a paragraph worth of "Cons". From iheim at redhat.com Wed Apr 11 12:53:56 2012 From: iheim at redhat.com (Itamar Heim) Date: Wed, 11 Apr 2012 15:53:56 +0300 Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: <03e10fcb-1fa7-4762-b5db-0eeb369f2de5@zmail13.collab.prod.int.phx2.redhat.com> References: <03e10fcb-1fa7-4762-b5db-0eeb369f2de5@zmail13.collab.prod.int.phx2.redhat.com> Message-ID: <4F857EE4.2040400@redhat.com> On 04/11/2012 11:50 AM, Ayal Baron wrote: > > > ----- Original Message ----- >> On 10/04/12 14:35, Geert Jansen wrote: >>> >>> >>> On 04/09/2012 05:14 PM, Ori Liel wrote: >>>> The "Floating Disks" feature makes disks into stand-alone >>>> entities: a >>>> given disk may be attached to a VM (as all disks are today), or it >>>> may >>>> be not attached to any VM, which makes it a floating disk >>>> (http://www.ovirt.org/wiki/Features/FloatingDisk) >>>> >>>> To implement attach/detach of disk to/from VM in REST-API, we >>>> intend >>>> to introduce two new actions: >>>> >>>> POST .../api/vms/{vm:id}/disks/{disk:id}/attach >>>> POST .../api/vms/{vm:id}/disks/{disk:id}/detach >>>> >>>> Since we try not to add new actions unless we have to, I want to >>>> explain why I believe that these actions are necessary. >>>> The other implementation would use existing add/remove flows: >>>> >>>> POST .../api/vms/{vm:id}/disks - if the disk >>>> was >>>> passed with an ID, attach it to this VM. If no id - create a new >>>> disk. >>>> DELETE .../api/vms/{vm:id}/disks/{disk:id} - *ambiguity >>>> problem, need to add a flag* >>>> >>>> We can't break existing API, so regular DELETE must remove the >>>> disk, >>>> as it does today. To detach a disk using DELETE we'd have to add a >>>> flag to the DETELE command. This is quite risky, because if the >>>> user >>>> forgets to pass this flag, the disk which he wanted to detach will >>>> actually be deleted. >>>> >>>> Theoretically, if we could break the API, the following modelling >>>> would resolve the ambiguity and perhaps be ideal: >>>> - POST/DELETE disk in root context means create or delete it. >>>> - POST/DELETE disk in VM context means attach or detach it. >>>> But we don't have the privilege of breaking the API. >>>> >>>> Considering all of the above - and the fact that attach/detach >>>> nics >>>> to/from host is also implemented using actions - I believe that >>>> the >>>> new actions are justifiable. >>>> >>>> Any comments? >>> >>> I assume that a floating disk can be attached to 0 VMs as well, >>> right? >> >> floating == attached to 0 VMs >> >>> So i would assume we get a top-level /disks collection correct?? >> >> Yes >> >>> And I assume that collection would only list floating disks? >> >> IMO the /disks collection includes all disks in the setup regardless >> if >> they are floating or attached to VM/s >> >>> >>> In my view, backwards compatible DELETE semantics for a floating >>> disk >>> aren't that bad: >>> >>> DELETE /vms/{vm:id}/disks/{disk:id} >>> >>> => Accept atrue|false argument. >>> => Defaults to "false" for compatibility. >>> >> >> I think that ideally : >> >> Detach a disk from VM (becomes floating): >> DELETE api/vms/{vm:id}/disks/{disk:id} >> >> Delete a disk ('real' delete)" >> DELETE api/disks/{disk:id} > > Assuming this also works when the disk is attached to a VM then the above seems to me like the simplest and clearest path. i.e. > DELETE in VM context detaches this would break backward compatibility of the API, as today this deletes the disk as well. geert - thoughts on this? > DELETE in DISKS context really deletes > > POST in VM context attaches (and creates if does not yet exist) > POST in DISKS context creates floating. > > Only thing is that to create and attach you post to VM but the complementary detach and delete is delete from disks (i.e. not symmetrical). > >> >> I understand that it is changing the current API behavior, it means >> that >> a user who deleted disks in 3.0 will end up only detaching them in >> 3.1, >> is that something we can't 'live' with? >> >> For attach, I would go with Eoghan approach: >> >> POST /api/vms/{vm:id}/disks >> => attach disk >> >> >> >>> This means that DELETE will by default really DELETE any >>> non-floating >>> disk. That is compatibility with today. For safety, implement this: >>> >>> => When deleting a disk that is floating, fail unless is >>> also >>> set to "true". And always fail if one of the other VMs is running >>> (obviously). >>> >>> To attach a disk and make it float, use POST and you and Eoghan >>> described. >>> >>> To detach a disk, use DELETE withtrue. >>> >>> To delete a non-attached, floating disks, use: >>> >>> DELETE /disks/{disk:id} >>> >>> To delete an attached, floating disk, use: >>> >>> DELETE /vm/{vm:id}/disks/{disk:id} withtrue; OR >> >> ^^ isn't that considered breaking the API? we require force flag for >> deleting disk which we did not require before. >> >>> DELETE /disks/{disk:id} >>> >>> To create a non-attached, floating, disk, use: >>> >>> POST /disks >>> >>> Regards, >>> Geert >>> _______________________________________________ >>> Engine-devel mailing list >>> Engine-devel at ovirt.org >>> http://lists.ovirt.org/mailman/listinfo/engine-devel >> >> _______________________________________________ >> Engine-devel mailing list >> Engine-devel at ovirt.org >> http://lists.ovirt.org/mailman/listinfo/engine-devel >> > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel From ryanh at us.ibm.com Wed Apr 11 13:07:51 2012 From: ryanh at us.ibm.com (Ryan Harper) Date: Wed, 11 Apr 2012 08:07:51 -0500 Subject: [Engine-devel] ovirt core sync agenda In-Reply-To: <4F855DDD.7010903@redhat.com> References: <4F855DDD.7010903@redhat.com> Message-ID: <20120411130751.GN5593@us.ibm.com> * Livnat Peer [2012-04-11 05:33]: > Hi All, > We have nothing on the agenda for today. > If you have something you would like to discuss please reply to this > mail otherwise we'll cancel today's meeting. Itamar suggested I bring up the discussion[1] on getting maintainer agreement for DCO/Signed-off-by logged in the commits for each of the projects. It's been enabled on gerrit for vdsm and ovirt-node; I wanted to get approvial for the ovirt-engine-* projects as well. Thanks! 1. http://lists.ovirt.org/pipermail/arch/2012-April/000444.html > > Thanks, Livnat > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx ryanh at us.ibm.com From gjansen at redhat.com Wed Apr 11 14:25:21 2012 From: gjansen at redhat.com (Geert Jansen) Date: Wed, 11 Apr 2012 16:25:21 +0200 Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: <8c43bc6b-dbe6-4f4b-9b05-ccdd5c9fc0ec@zmail17.collab.prod.int.phx2.redhat.com> References: <8c43bc6b-dbe6-4f4b-9b05-ccdd5c9fc0ec@zmail17.collab.prod.int.phx2.redhat.com> Message-ID: <4F859451.9010400@redhat.com> On 04/10/2012 04:46 PM, Ori Liel wrote: >> I assume that a floating disk can be attached to 0 VMs as well, right? >> So i would assume we get a top-level /disks collection correct?? And I >> assume that collection would only list floating disks? > > Indeed, there will be a root collection. but I do not see a reason why this collection should only show floating disks. I tend to think it should show all disks in the system. Keep in mind that we're going towards Shared disks, meaning the same disk may be used by two VMs, so it makes sense to show such a disk in the root collection, along with the information of which VMs it's attached to. My gut feeling tells me it's easier to work with if it's only floating disks. Because if the disk is not floating, your primary URL to work on the disk will be the one under /vms. >> >> In my view, backwards compatible DELETE semantics for a floating disk >> aren't that bad: >> >> DELETE /vms/{vm:id}/disks/{disk:id} >> >> => Accept atrue|false argument. >> => Defaults to "false" for compatibility. >> >> This means that DELETE will by default really DELETE any non-floating >> disk. That is compatibility with today. For safety, implement this: >> >> => When deleting a disk that is floating, fail unless is also >> set to "true". And always fail if one of the other VMs is running >> (obviously). >> > > I Agree with Eoghan that the drawbacks outweigh the benefits in this case, > for the reasons Eoghan said. Sorry it took a while to get back. I had a feeling that i didn't like the approach, and had to figure out why. You and Eoghan propose this to detach a disk: POST /api/vms/{vm:id}/disks/{disk:id}/detach => detach disk The problem i have with this is that after the "detach" action, the disk is gone. In my view, it is not an expected outcome of an action to remove the entity it is working on, because POST is not expected to delete the URL it is working on. This assumption is implicit for example when we do actions asynchronously. The status monitor that we return is actually a URL under the resource itself. Two other reasons are: * "detach" and "attach" for NICs: there was actually a BZ open to implement these with PUT and DELETE as well. We just didn't have time to do this. So in my view this is not a valid precendent. * Also "detach" and "attach" for NICs do *not* remove the NIC object itself, but instead it detached the network from the NIC but leaves the NIC in place. So in my view, the POST and DELETE option is the best one. Regards, Geert From gjansen at redhat.com Wed Apr 11 14:29:31 2012 From: gjansen at redhat.com (Geert Jansen) Date: Wed, 11 Apr 2012 16:29:31 +0200 Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: <4F857EE4.2040400@redhat.com> References: <03e10fcb-1fa7-4762-b5db-0eeb369f2de5@zmail13.collab.prod.int.phx2.redhat.com> <4F857EE4.2040400@redhat.com> Message-ID: <4F85954B.1000300@redhat.com> On 04/11/2012 02:53 PM, Itamar Heim wrote: >>> Detach a disk from VM (becomes floating): >>> DELETE api/vms/{vm:id}/disks/{disk:id} >>> >>> Delete a disk ('real' delete)" >>> DELETE api/disks/{disk:id} >> >> Assuming this also works when the disk is attached to a VM then the >> above seems to me like the simplest and clearest path. i.e. >> DELETE in VM context detaches > > this would break backward compatibility of the API, as today this > deletes the disk as well. > geert - thoughts on this? Yes, the way this is proposed by Ayal would be incompatible. The default semantics for a DELETE in a VM context has to be delete, not detach. But I don't see that as a problem. We can pass in a true|false parameter. Arguably this also more closely aligns with how people will use the API. I expect that normally 99% of disks in an environment will be non-floating. Therefore a DELETE even in VM context should by default really delete the disk, instead of creating a floating disk. Regards, Geert From oschreib at redhat.com Wed Apr 11 14:33:49 2012 From: oschreib at redhat.com (Ofer Schreiber) Date: Wed, 11 Apr 2012 10:33:49 -0400 (EDT) Subject: [Engine-devel] Canceled: oVirt sync meeting (11.04.2012) In-Reply-To: <6c962cac-2cb8-4eca-a0d7-861b49a647f8@zmail14.collab.prod.int.phx2.redhat.com> Message-ID: <89a7dec6-fedf-4a41-9a57-e2bcf8494e98@zmail14.collab.prod.int.phx2.redhat.com> Due to low number of attendees, the weekly sync meeting [1] is canceled. Happy holiday, Ofer Schreiber oVirt Release Manager [1] Happens every Wednesday on 14:00 UTC, #ovirt irc channel (oftc) From gjansen at redhat.com Wed Apr 11 14:38:34 2012 From: gjansen at redhat.com (Geert Jansen) Date: Wed, 11 Apr 2012 16:38:34 +0200 Subject: [Engine-devel] Hot-plug of disks and nics In-Reply-To: <42673a31-5f7b-4842-b32a-77aed4113cf9@zmail11.collab.prod.int.phx2.redhat.com> References: <42673a31-5f7b-4842-b32a-77aed4113cf9@zmail11.collab.prod.int.phx2.redhat.com> Message-ID: <4F85976A.8030106@redhat.com> On 04/11/2012 11:02 AM, Eoghan Glynn wrote: > > >> * Inconsistent with other flows. We do not normally update status >> fields to perform actions. For example to run a VM, we do not update >> it's status to 'activated', we run an action (start). > > I think this point is the crux of the matter. > > IMO the consistency between activation implemented as direct state > manipulation versus the state change occurring as a side-effect > of an action, would be a deal-breaker. > > IIRC one of the reasons we avoided that kind of direct state > manipulation first time round is that it doesn't lend itself to > multi-state transitions, e.g. activation that traversed multiple > intermediate states, say: > > quiescent->pending->activating->activated > > That example is a bit contrived and unrealistic, but in any case > the principal is that the client-visible state machine for a resource > may not necessarily transition directly from the initial to the terminal > state. Exactly. The target state is not always indicative of the exact state transition path. A simpler example is "power off" vs "shutdown". Both end up with a VM in the "down" state, but the two are actually quite different. > Also an action as opposed to a direct state manipulation makes it more > natural to express side-effects of the activation, and to implement > in-progress status querying or cancelation. > > For those reasons, I'm thinking that using actions consistently accross > the board is better than exposing an action in one case while allowing > a direct state manipulation in another. > > So my vote would be for option #2. One question though (probably to Ori): from the API that you propose, i assume that disk hotplug is implemented as a two stage process in the backend? - add the disk to a VM - activate it Because if it's just a one stage process then that would change things. Then you'd probably want to activate it directly as part of the POST call that adds the disk. As an action name i think "hotplug" and "unplug" are slightly more descriptive of what you actually mean. So my vote would go for those names instead. Regards, Geert From veillard at redhat.com Thu Apr 12 05:18:09 2012 From: veillard at redhat.com (Daniel Veillard) Date: Thu, 12 Apr 2012 13:18:09 +0800 Subject: [Engine-devel] Issue with XML namespaces in engine-setup In-Reply-To: <4F841F8B.8090008@redhat.com> References: <4F841F8B.8090008@redhat.com> Message-ID: <20120412051809.GA22623@redhat.com> On Tue, Apr 10, 2012 at 01:54:51PM +0200, Juan Hernandez wrote: > Hello, > > The code that we use in engine-setup to modify JBoss AS XML > configuration files uses the following pattern: > > datasourceStr = ''' > > ... > > ''' > > xmlObj.addNodes("//datasource:subsystem/datasource:datasources", > datasourceStr) > > This looks correct but is in fact generating a incorrect XML document, > as the tags being added are not associated to a namespace. The resulting > XML file will be correct, but the temporary representation in memory is > not. This causes problems if you later, before writing out the modified > file, try to use xpath expressions matching the added nodes: there will > be no match. > > I would suggest that we change the pattern to something like this: > > datasourceStr = ''' > > > ... > > > ''' > datasourceNodes = libxml2.parseDoc(datasourceStr).getRootElement().children > > xmlObje.addNodes("//datasource:subsystem/datasource:datasources", > datasourceNodes) > > This way both the representation in memory and the resulting file are > correct. > > Le me know what you think. I think it's dangerous to move nodes from one document to another especially if there is namespaces (I assume you're operating in an environment on top of libxml2 as I saw a reference to it ;-) For libxml2 there is an API in C: http://xmlsoft.org/html/libxml-parser.html#xmlParseInNodeContext which could do what you expect. Maybe there is a binding/wrapper available you could use. Also your "//datasource:subsystem/datasource:datasources" XPath query could lead to multiple result nodes, I would suggest to pick the first result only, I suppose you don't want to add the set of nodes to multiple places xmlObje.addNodes("(//datasource:subsystem/datasource:datasources)[1]", datasourceNodes) or something equivalent (unless addNodes() takes care to handle that properly ...) Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ From sanjal at redhat.com Thu Apr 12 06:35:25 2012 From: sanjal at redhat.com (Shireesh Anjal) Date: Thu, 12 Apr 2012 12:05:25 +0530 Subject: [Engine-devel] Query regarding ValidationUtils#validateInputs Message-ID: <4F8677AD.2090304@redhat.com> Hi, This is regarding the following validation method we have in ValidationUtils: /public static ArrayList validateInputs(List> validationGroupList, T parameters);/ I there any particular reason for supporting the validations only on objects of classes derived from VdcActionParametersBase? I guess this was done because this method is primarily intended to validate the action parameters passed to a BLL action, using the validation annotations on the parameter class. However I think this method can be useful for general use as well. e.g. I cannot add a "@Valid" annotation on a "list" or a "map" in a parameter class. So I need to iterate over the list/map, and validate each element inside the loop. The validation inside the loop can also utilize the above method if the restriction "extends VdcActionParametersBase" is removed. This will allow me to do the following in the canDoAction method: protected boolean canDoAction() { ... for(GlusterBrickEntity brick : getParameters().getGlusterVolume().getBricks()) { List errors = ValidationUtils.validateInputs(getValidationGroups(), brick); if(errors != null) { for(String error : errors) { addCanDoActionMessage(error); } } } ... } Regards, Shireesh -------------- next part -------------- An HTML attachment was scrubbed... URL: From ofrenkel at redhat.com Thu Apr 12 07:50:37 2012 From: ofrenkel at redhat.com (Omer Frenkel) Date: Thu, 12 Apr 2012 03:50:37 -0400 (EDT) Subject: [Engine-devel] Query regarding ValidationUtils#validateInputs In-Reply-To: <4F8677AD.2090304@redhat.com> Message-ID: <15a5329c-4579-4ef6-b1c8-be0b260e859b@zmail07.collab.prod.int.phx2.redhat.com> ----- Original Message ----- > From: "Shireesh Anjal" > To: engine-devel at ovirt.org > Sent: Thursday, April 12, 2012 9:35:25 AM > Subject: [Engine-devel] Query regarding > ValidationUtils#validateInputs > Hi, > This is regarding the following validation method we have in > ValidationUtils: > public static ArrayList > validateInputs(List> validationGroupList, T parameters); > I there any particular reason for supporting the validations only on > objects of classes derived from VdcActionParametersBase? I guess > this was done because this method is primarily intended to validate > the action parameters passed to a BLL action, using the validation > annotations on the parameter class. However I think this method can > be useful for general use as well. e.g. I cannot add a "@Valid" > annotation on a "list" or a "map" in a parameter class. So I need to > iterate over the list/map, and validate each element inside the > loop. The validation inside the loop can also utilize the above > method if the restriction "extends VdcActionParametersBase" is > removed. This will allow me to do the following in the canDoAction > method: > protected boolean canDoAction() { > ... > for(GlusterBrickEntity brick : > getParameters().getGlusterVolume().getBricks()) { > List errors = > ValidationUtils.validateInputs(getValidationGroups(), brick); > if(errors != null) { > for(String error : errors) { > addCanDoActionMessage(error); > } > } > } > ... > } > Regards, > Shireesh > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel i don't think there is a reason to restrict only for VdcActionParametersBase, roy what do you think? also you can use here getReturnValue().getCanDoActionMessages().addAll(errors); instead of going over on all errors. -------------- next part -------------- An HTML attachment was scrubbed... URL: From juan.hernandez at redhat.com Fri Apr 13 17:59:32 2012 From: juan.hernandez at redhat.com (Juan Hernandez) Date: Fri, 13 Apr 2012 19:59:32 +0200 Subject: [Engine-devel] Issue with XML namespaces in engine-setup In-Reply-To: <20120412051809.GA22623@redhat.com> References: <4F841F8B.8090008@redhat.com> <20120412051809.GA22623@redhat.com> Message-ID: <4F886984.6080408@redhat.com> On 04/12/2012 07:18 AM, Daniel Veillard wrote: > On Tue, Apr 10, 2012 at 01:54:51PM +0200, Juan Hernandez wrote: >> Hello, >> >> The code that we use in engine-setup to modify JBoss AS XML >> configuration files uses the following pattern: >> >> datasourceStr = ''' >> >> ... >> >> ''' >> >> xmlObj.addNodes("//datasource:subsystem/datasource:datasources", >> datasourceStr) >> >> This looks correct but is in fact generating a incorrect XML document, >> as the tags being added are not associated to a namespace. The resulting >> XML file will be correct, but the temporary representation in memory is >> not. This causes problems if you later, before writing out the modified >> file, try to use xpath expressions matching the added nodes: there will >> be no match. >> >> I would suggest that we change the pattern to something like this: >> >> datasourceStr = ''' >> >> >> ... >> >> >> ''' >> datasourceNodes = libxml2.parseDoc(datasourceStr).getRootElement().children >> >> xmlObje.addNodes("//datasource:subsystem/datasource:datasources", >> datasourceNodes) >> >> This way both the representation in memory and the resulting file are >> correct. >> >> Le me know what you think. > > I think it's dangerous to move nodes from one document to another > especially if there is namespaces (I assume you're operating in an > environment on top of libxml2 as I saw a reference to it ;-) > > For libxml2 there is an API in C: > http://xmlsoft.org/html/libxml-parser.html#xmlParseInNodeContext > which could do what you expect. Maybe there is a binding/wrapper > available you could use. Thanks Daniel, that looks certainly better/easier than what I am proposing. We use libxml2-python, but I can't locate that method there. Do you know if it is possible to use it from python? > Also your "//datasource:subsystem/datasource:datasources" XPath query > could lead to multiple result nodes, I would suggest to pick the first > result only, I suppose you don't want to add the set of nodes to > multiple places > > xmlObje.addNodes("(//datasource:subsystem/datasource:datasources)[1]", > datasourceNodes) > > or something equivalent (unless addNodes() takes care to handle that > properly ...) Yes, the addNodes method takes care of that. From veillard at redhat.com Sat Apr 14 01:55:31 2012 From: veillard at redhat.com (Daniel Veillard) Date: Sat, 14 Apr 2012 09:55:31 +0800 Subject: [Engine-devel] Issue with XML namespaces in engine-setup In-Reply-To: <4F886984.6080408@redhat.com> References: <4F841F8B.8090008@redhat.com> <20120412051809.GA22623@redhat.com> <4F886984.6080408@redhat.com> Message-ID: <20120414015531.GF22623@redhat.com> On Fri, Apr 13, 2012 at 07:59:32PM +0200, Juan Hernandez wrote: > On 04/12/2012 07:18 AM, Daniel Veillard wrote: > > On Tue, Apr 10, 2012 at 01:54:51PM +0200, Juan Hernandez wrote: > >> Hello, > >> > >> The code that we use in engine-setup to modify JBoss AS XML > >> configuration files uses the following pattern: > >> > >> datasourceStr = ''' > >> > >> ... > >> > >> ''' > >> > >> xmlObj.addNodes("//datasource:subsystem/datasource:datasources", > >> datasourceStr) > >> > >> This looks correct but is in fact generating a incorrect XML document, > >> as the tags being added are not associated to a namespace. The resulting > >> XML file will be correct, but the temporary representation in memory is > >> not. This causes problems if you later, before writing out the modified > >> file, try to use xpath expressions matching the added nodes: there will > >> be no match. > >> > >> I would suggest that we change the pattern to something like this: > >> > >> datasourceStr = ''' > >> > >> > >> ... > >> > >> > >> ''' > >> datasourceNodes = libxml2.parseDoc(datasourceStr).getRootElement().children > >> > >> xmlObje.addNodes("//datasource:subsystem/datasource:datasources", > >> datasourceNodes) > >> > >> This way both the representation in memory and the resulting file are > >> correct. > >> > >> Le me know what you think. > > > > I think it's dangerous to move nodes from one document to another > > especially if there is namespaces (I assume you're operating in an > > environment on top of libxml2 as I saw a reference to it ;-) > > > > For libxml2 there is an API in C: > > http://xmlsoft.org/html/libxml-parser.html#xmlParseInNodeContext > > which could do what you expect. Maybe there is a binding/wrapper > > available you could use. > > Thanks Daniel, that looks certainly better/easier than what I am > proposing. We use libxml2-python, but I can't locate that method there. > Do you know if it is possible to use it from python? Argh, right it's missing :-( the bindings could not be automatically generated. I need to add this but before it's deployed it will take a while, too bad that was the right way to do it :-\ To get back to your original problem, I would suggest to correct explicitely the namespaces on the nodes rather than move them from an external document, this feel less risky. The lxml python bindings around libxml2 [1] try to avoid such issues by making sure all documents share the same dictionary and control the copy operations, but I don't know if Stefan Behnel managed to cover all the cases Daniel [1] http://lxml.de/ -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ From rgolan at redhat.com Sun Apr 15 06:01:32 2012 From: rgolan at redhat.com (Roy Golan) Date: Sun, 15 Apr 2012 09:01:32 +0300 Subject: [Engine-devel] Query regarding ValidationUtils#validateInputs In-Reply-To: <15a5329c-4579-4ef6-b1c8-be0b260e859b@zmail07.collab.prod.int.phx2.redhat.com> References: <15a5329c-4579-4ef6-b1c8-be0b260e859b@zmail07.collab.prod.int.phx2.redhat.com> Message-ID: <4F8A643C.8060605@redhat.com> On 04/12/2012 10:50 AM, Omer Frenkel wrote: > > > ------------------------------------------------------------------------ > > *From: *"Shireesh Anjal" > *To: *engine-devel at ovirt.org > *Sent: *Thursday, April 12, 2012 9:35:25 AM > *Subject: *[Engine-devel] Query regarding > ValidationUtils#validateInputs > > Hi, > > This is regarding the following validation method we have in > ValidationUtils: > > /public static > ArrayList validateInputs(List> > validationGroupList, T parameters);/ > > I there any particular reason for supporting the validations only > on objects of classes derived from VdcActionParametersBase? I > guess this was done because this method is primarily intended to > validate the action parameters passed to a BLL action, using the > validation annotations on the parameter class. However I think > this method can be useful for general use as well. e.g. I cannot > add a "@Valid" annotation on a "list" or a "map" in a parameter > class. So I need to iterate over the list/map, and validate each > element inside the loop. The validation inside the loop can also > utilize the above method if the restriction "extends > VdcActionParametersBase" is removed. This will allow me to do the > following in the canDoAction method: > > protected boolean canDoAction() { > ... > for(GlusterBrickEntity brick : > getParameters().getGlusterVolume().getBricks()) { > List errors = > ValidationUtils.validateInputs(getValidationGroups(), brick); > if(errors != null) { > for(String error : errors) { > addCanDoActionMessage(error); > } > } > } > ... > } > > Regards, > Shireesh > > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel > > i don't think there is a reason to restrict only for > VdcActionParametersBase, roy what do you think? > > also you can use here > getReturnValue().getCanDoActionMessages().addAll(errors); > instead of going over on all errors. pls see SetupNetworksParameters.java for validating a list of network interfaces. hibernate validator supports trivial object graphs and members that are arrays, list and java.util.map implementations. If your code looks like that it should work. If you are using special validation groups please add them to your command with addValidationGroups. this should work: GlusterCommandParameters.java @Valid List bricks Bricks.java @NotNull Guid id -------------- next part -------------- An HTML attachment was scrubbed... URL: From ovedo at redhat.com Sun Apr 15 11:06:02 2012 From: ovedo at redhat.com (Oved Ourfalli) Date: Sun, 15 Apr 2012 07:06:02 -0400 (EDT) Subject: [Engine-devel] REST session management In-Reply-To: Message-ID: <51803a19-ebfc-4f06-badf-963f1d302c81@zmail02.collab.prod.int.phx2.redhat.com> Hey, The following wiki page describes a new feature - supporting session management via the REST API: http://www.ovirt.org/wiki/Features/RESTSessionManagement Please review and comment. Thank you, Oved From yzaslavs at redhat.com Mon Apr 16 03:25:12 2012 From: yzaslavs at redhat.com (Yair Zaslavsky) Date: Mon, 16 Apr 2012 06:25:12 +0300 Subject: [Engine-devel] Getting into memory allocation problems in git? Message-ID: <4F8B9118.9050803@redhat.com> Hi all, I got a strange error while trying to fetch a patch from ovrit gerrit. The error looked like this - git fetch http://gerrit.ovirt.org/p/ovirt-engine refs/changes/41/3541/1 && git checkout FETCH_HEAD error: Could not resolve host: gerrit.ovirt.org; Cannot allocate memory while accessing http://gerrit.ovirt.org/p/ovirt-engine/info/refs fatal: HTTP request failed Could not find anything interesting in google, and out of despair started to pass on manual of git. I then encountered git gc. My java instincts told me to give it a shot (after all, garbage collection sounds good), and it worked! (Nothing helped before - not removing local branches, not trying to perform this from various branches, etc...) FYI Yair From gjansen at redhat.com Mon Apr 16 07:26:18 2012 From: gjansen at redhat.com (Geert Jansen) Date: Mon, 16 Apr 2012 09:26:18 +0200 Subject: [Engine-devel] REST session management In-Reply-To: <51803a19-ebfc-4f06-badf-963f1d302c81@zmail02.collab.prod.int.phx2.redhat.com> References: <51803a19-ebfc-4f06-badf-963f1d302c81@zmail02.collab.prod.int.phx2.redhat.com> Message-ID: <4F8BC99A.2020606@redhat.com> Hi Oved, +1 for this feature. [[As a background to the others on the list, this feature is absolutely essential for certain types of ISV integration. Many ISVs need to mirror the RHEV inventory (i.e. all VMs, clusters, basically any object managed by RHEV) in realtime to their own database. The way they do this currently is by polling /api/events and look for changes. In order to be able to react to changes fast, they typically poll every 5 seconds. The query itself is very efficient, so it doesn't cause a whole lot of load on RHEV-M. But it floods the log with login/logout events. This persistent session feature is a solution for that.]] Actually my vote would go for your variation #2: The client passes the "Prefer" header field on every request, besides the last one. When the server gets a request with a JSESSIONID, and without the "Prefer" header, it logs out the session. It's mostly my gut feeling, but i would say it has these advantages: 1. It is more explicit, as on every request you confirm that you still want the authenticated session to be maintained. 2. It is also consistent with the default we have chosen of no persistent authentication. 3. It does not need a second header, so it is somewhat simpler. Regards, Geert On 04/15/2012 01:06 PM, Oved Ourfalli wrote: > Hey, > > The following wiki page describes a new feature - supporting session management via the REST API: > http://www.ovirt.org/wiki/Features/RESTSessionManagement > > Please review and comment. > > Thank you, > Oved -- Geert Jansen Sr. Product Marketing Manager, Red Hat Enterprise Virtualization Red Hat S.r.L. O: +39 095 916287 Via G. Fara 26 C: +39 348 1980079 (when in US: 415-623-0542) Milan 20124, Italy E: gjansen at redhat.com From ovedo at redhat.com Mon Apr 16 07:44:31 2012 From: ovedo at redhat.com (Oved Ourfalli) Date: Mon, 16 Apr 2012 03:44:31 -0400 (EDT) Subject: [Engine-devel] REST session management In-Reply-To: <4F8BC99A.2020606@redhat.com> Message-ID: ----- Original Message ----- > From: "Geert Jansen" > To: "Oved Ourfalli" > Cc: "engine-devel" , "Eoghan Glynn" > Sent: Monday, April 16, 2012 10:26:18 AM > Subject: Re: [Engine-devel] REST session management > > Hi Oved, > > +1 for this feature. > > [[As a background to the others on the list, this feature is > absolutely > essential for certain types of ISV integration. Many ISVs need to > mirror > the RHEV inventory (i.e. all VMs, clusters, basically any object > managed > by RHEV) in realtime to their own database. The way they do this > currently is by polling /api/events and look for changes. In order to > be > able to react to changes fast, they typically poll every 5 seconds. > The > query itself is very efficient, so it doesn't cause a whole lot of > load > on RHEV-M. But it floods the log with login/logout events. This > persistent session feature is a solution for that.]] > Thank you for the background. I'll add it to the wiki page. > Actually my vote would go for your variation #2: > > The client passes the "Prefer" header field on every request, > besides the last one. When the server gets a request with a > JSESSIONID, and without the "Prefer" header, it logs out the > session. > > It's mostly my gut feeling, but i would say it has these advantages: > > 1. It is more explicit, as on every request you confirm that you > still > want the authenticated session to be maintained. > 2. It is also consistent with the default we have chosen of no > persistent authentication. > 3. It does not need a second header, so it is somewhat simpler. > I Agree on that, although I'm not sure whether it is really needed to release the session, rather then rely on timeout. If we indeed need to provide a way to release the session then I agree this is the best alternative. But if we don't then it will make the API to the client more (but not very) complex in that manner. The only doubt I have about that is that from reading on the new "Prefer" header, I got the feeling that it is more relevant on session negotiation, and less something you would pass on every request in the session, but I'm not sure about that. > Regards, > Geert > > On 04/15/2012 01:06 PM, Oved Ourfalli wrote: > > Hey, > > > > The following wiki page describes a new feature - supporting > > session management via the REST API: > > http://www.ovirt.org/wiki/Features/RESTSessionManagement > > > > Please review and comment. > > > > Thank you, > > Oved > > -- > Geert Jansen > Sr. Product Marketing Manager, Red Hat Enterprise Virtualization > > Red Hat S.r.L. O: +39 095 916287 > Via G. Fara 26 C: +39 348 1980079 (when in US: > 415-623-0542) > Milan 20124, Italy E: gjansen at redhat.com > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel > From mkenneth at redhat.com Mon Apr 16 08:04:14 2012 From: mkenneth at redhat.com (Miki Kenneth) Date: Mon, 16 Apr 2012 04:04:14 -0400 (EDT) Subject: [Engine-devel] REST session management In-Reply-To: Message-ID: <05eb7ea8-086d-4ab3-aac5-e261229ab29b@mkenneth.csb> ----- Original Message ----- > From: "Oved Ourfalli" > To: "Geert Jansen" > Cc: "engine-devel" , "Eoghan Glynn" > Sent: Monday, April 16, 2012 10:44:31 AM > Subject: Re: [Engine-devel] REST session management > > > > ----- Original Message ----- > > From: "Geert Jansen" > > To: "Oved Ourfalli" > > Cc: "engine-devel" , "Eoghan Glynn" > > > > Sent: Monday, April 16, 2012 10:26:18 AM > > Subject: Re: [Engine-devel] REST session management > > > > Hi Oved, > > > > +1 for this feature. > > > > [[As a background to the others on the list, this feature is > > absolutely > > essential for certain types of ISV integration. Many ISVs need to > > mirror > > the RHEV inventory (i.e. all VMs, clusters, basically any object > > managed > > by RHEV) in realtime to their own database. The way they do this > > currently is by polling /api/events and look for changes. In order > > to > > be > > able to react to changes fast, they typically poll every 5 seconds. > > The > > query itself is very efficient, so it doesn't cause a whole lot of > > load > > on RHEV-M. But it floods the log with login/logout events. This > > persistent session feature is a solution for that.]] > > > Thank you for the background. I'll add it to the wiki page. > > > Actually my vote would go for your variation #2: > > > > The client passes the "Prefer" header field on every request, > > besides the last one. When the server gets a request with a > > JSESSIONID, and without the "Prefer" header, it logs out the > > session. > > > > It's mostly my gut feeling, but i would say it has these > > advantages: > > > > 1. It is more explicit, as on every request you confirm that you > > still > > want the authenticated session to be maintained. > > 2. It is also consistent with the default we have chosen of no > > persistent authentication. > > 3. It does not need a second header, so it is somewhat simpler. > > > > I Agree on that, although I'm not sure whether it is really needed to > release the session, rather then rely on timeout. > If we indeed need to provide a way to release the session then I > agree this is the best alternative. But if we don't then it will > make the API to the client more (but not very) complex in that > manner. I would go for both - release mechanism (for proper handling) and timeout mechanism for garbage collection. (refer to: http://blog.synopse.info/post/2011/05/24/How-to-implement-RESTful-authentication) > The only doubt I have about that is that from reading on the new > "Prefer" header, I got the feeling that it is more relevant on > session negotiation, and less something you would pass on every > request in the session, but I'm not sure about that. > > > Regards, > > Geert > > > > On 04/15/2012 01:06 PM, Oved Ourfalli wrote: > > > Hey, > > > > > > The following wiki page describes a new feature - supporting > > > session management via the REST API: > > > http://www.ovirt.org/wiki/Features/RESTSessionManagement > > > > > > Please review and comment. > > > > > > Thank you, > > > Oved > > > > -- > > Geert Jansen > > Sr. Product Marketing Manager, Red Hat Enterprise Virtualization > > > > Red Hat S.r.L. O: +39 095 916287 > > Via G. Fara 26 C: +39 348 1980079 (when in US: > > 415-623-0542) > > Milan 20124, Italy E: gjansen at redhat.com > > _______________________________________________ > > Engine-devel mailing list > > Engine-devel at ovirt.org > > http://lists.ovirt.org/mailman/listinfo/engine-devel > > > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel > From gjansen at redhat.com Mon Apr 16 08:34:26 2012 From: gjansen at redhat.com (Geert Jansen) Date: Mon, 16 Apr 2012 10:34:26 +0200 Subject: [Engine-devel] REST session management In-Reply-To: <05eb7ea8-086d-4ab3-aac5-e261229ab29b@mkenneth.csb> References: <05eb7ea8-086d-4ab3-aac5-e261229ab29b@mkenneth.csb> Message-ID: <4F8BD992.5040007@redhat.com> On 04/16/2012 10:04 AM, Miki Kenneth wrote: >> I Agree on that, although I'm not sure whether it is really needed to >> release the session, rather then rely on timeout. >> If we indeed need to provide a way to release the session then I >> agree this is the best alternative. But if we don't then it will >> make the API to the client more (but not very) complex in that >> manner. > > I would go for both - release mechanism (for proper handling) and timeout mechanism for garbage collection. > (refer to: http://blog.synopse.info/post/2011/05/24/How-to-implement-RESTful-authentication) Agreed we need both. I think that for security purposes, it is important to have a "log out" function. That way, client applications can decide depending on their local security requirements whether or not it is acceptable to leave a session open. Regards, Geert From ovedo at redhat.com Mon Apr 16 08:44:27 2012 From: ovedo at redhat.com (Oved Ourfalli) Date: Mon, 16 Apr 2012 04:44:27 -0400 (EDT) Subject: [Engine-devel] REST session management In-Reply-To: <4F8BD992.5040007@redhat.com> Message-ID: <590d66ad-7eee-4637-8303-d4685fb13f4d@zmail02.collab.prod.int.phx2.redhat.com> ----- Original Message ----- > From: "Geert Jansen" > To: "Miki Kenneth" > Cc: "Oved Ourfalli" , "engine-devel" , "Eoghan Glynn" > Sent: Monday, April 16, 2012 11:34:26 AM > Subject: Re: [Engine-devel] REST session management > > > On 04/16/2012 10:04 AM, Miki Kenneth wrote: > > >> I Agree on that, although I'm not sure whether it is really needed > >> to > >> release the session, rather then rely on timeout. > >> If we indeed need to provide a way to release the session then I > >> agree this is the best alternative. But if we don't then it will > >> make the API to the client more (but not very) complex in that > >> manner. > > > > I would go for both - release mechanism (for proper handling) and > > timeout mechanism for garbage collection. > > (refer to: > > http://blog.synopse.info/post/2011/05/24/How-to-implement-RESTful-authentication) > > Agreed we need both. I think that for security purposes, it is > important > to have a "log out" function. That way, client applications can > decide > depending on their local security requirements whether or not it is > acceptable to leave a session open. > So (unless someone objects) let's go for option #2 (using the Prefer header on each and every request, and release the session once it is not there). Thank you, Oved > Regards, > Geert > From ykaul at redhat.com Mon Apr 16 11:03:26 2012 From: ykaul at redhat.com (Yaniv Kaul) Date: Mon, 16 Apr 2012 14:03:26 +0300 Subject: [Engine-devel] REST session management In-Reply-To: <590d66ad-7eee-4637-8303-d4685fb13f4d@zmail02.collab.prod.int.phx2.redhat.com> References: <590d66ad-7eee-4637-8303-d4685fb13f4d@zmail02.collab.prod.int.phx2.redhat.com> Message-ID: <4F8BFC7E.3050904@redhat.com> On 04/16/2012 11:44 AM, Oved Ourfalli wrote: > > ----- Original Message ----- >> From: "Geert Jansen" >> To: "Miki Kenneth" >> Cc: "Oved Ourfalli", "engine-devel", "Eoghan Glynn" >> Sent: Monday, April 16, 2012 11:34:26 AM >> Subject: Re: [Engine-devel] REST session management >> >> >> On 04/16/2012 10:04 AM, Miki Kenneth wrote: >> >>>> I Agree on that, although I'm not sure whether it is really needed >>>> to >>>> release the session, rather then rely on timeout. >>>> If we indeed need to provide a way to release the session then I >>>> agree this is the best alternative. But if we don't then it will >>>> make the API to the client more (but not very) complex in that >>>> manner. >> > >>> I would go for both - release mechanism (for proper handling) and >>> timeout mechanism for garbage collection. >>> (refer to: >>> http://blog.synopse.info/post/2011/05/24/How-to-implement-RESTful-authentication) >> Agreed we need both. I think that for security purposes, it is >> important >> to have a "log out" function. That way, client applications can >> decide >> depending on their local security requirements whether or not it is >> acceptable to leave a session open. >> > So (unless someone objects) let's go for option #2 (using the Prefer header on each and every request, and release the session once it is not there). My only objection is that you implement a draft spec and implement a header without even bothering to register it - or asking if there is such an identical-purposed header with a different name which may get registered / is already in use somewhere. Y. > > Thank you, > Oved >> Regards, >> Geert >> > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel From ovedo at redhat.com Mon Apr 16 11:46:29 2012 From: ovedo at redhat.com (Oved Ourfalli) Date: Mon, 16 Apr 2012 07:46:29 -0400 (EDT) Subject: [Engine-devel] REST session management In-Reply-To: <4F8BFC7E.3050904@redhat.com> Message-ID: <1c483cab-5beb-4cee-b370-991dd3139a12@zmail02.collab.prod.int.phx2.redhat.com> ----- Original Message ----- > From: "Yaniv Kaul" > To: "Oved Ourfalli" > Cc: "engine-devel" , "Eoghan Glynn" > Sent: Monday, April 16, 2012 2:03:26 PM > Subject: Re: [Engine-devel] REST session management > > On 04/16/2012 11:44 AM, Oved Ourfalli wrote: > > > > ----- Original Message ----- > >> From: "Geert Jansen" > >> To: "Miki Kenneth" > >> Cc: "Oved Ourfalli", > >> "engine-devel", "Eoghan > >> Glynn" > >> Sent: Monday, April 16, 2012 11:34:26 AM > >> Subject: Re: [Engine-devel] REST session management > >> > >> > >> On 04/16/2012 10:04 AM, Miki Kenneth wrote: > >> > >>>> I Agree on that, although I'm not sure whether it is really > >>>> needed > >>>> to > >>>> release the session, rather then rely on timeout. > >>>> If we indeed need to provide a way to release the session then I > >>>> agree this is the best alternative. But if we don't then it will > >>>> make the API to the client more (but not very) complex in that > >>>> manner. > >> > > >>> I would go for both - release mechanism (for proper handling) and > >>> timeout mechanism for garbage collection. > >>> (refer to: > >>> http://blog.synopse.info/post/2011/05/24/How-to-implement-RESTful-authentication) > >> Agreed we need both. I think that for security purposes, it is > >> important > >> to have a "log out" function. That way, client applications can > >> decide > >> depending on their local security requirements whether or not it > >> is > >> acceptable to leave a session open. > >> > > So (unless someone objects) let's go for option #2 (using the > > Prefer header on each and every request, and release the session > > once it is not there). > > My only objection is that you implement a draft spec and implement a > header without even bothering to register it - or asking if there is > such an identical-purposed header with a different name which may get > registered / is already in use somewhere. > Y. > One of the reasons of posting to this mailing list is to try and get information on alternatives. I already looked for similar headers, but I'll take another look to see if others exist. Any idea where I can get an official answer for that? Looked in http://www.iana.org/assignments/message-headers/perm-headers.html, but it was hard to find a more suitable header there. We can have a dedicated header of our own in that matter, but better being standard. BTW, from what I read the acceptance process is in its final stages, but I'm not too familiar with the process, so hard to say how much time will it take for it to be complete. > > > > Thank you, > > Oved > >> Regards, > >> Geert > >> > > _______________________________________________ > > Engine-devel mailing list > > Engine-devel at ovirt.org > > http://lists.ovirt.org/mailman/listinfo/engine-devel > > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel > From gjansen at redhat.com Mon Apr 16 12:31:43 2012 From: gjansen at redhat.com (Geert Jansen) Date: Mon, 16 Apr 2012 14:31:43 +0200 Subject: [Engine-devel] REST session management In-Reply-To: <4F8BFC7E.3050904@redhat.com> References: <590d66ad-7eee-4637-8303-d4685fb13f4d@zmail02.collab.prod.int.phx2.redhat.com> <4F8BFC7E.3050904@redhat.com> Message-ID: <4F8C112F.1060703@redhat.com> On 04/16/2012 01:03 PM, Yaniv Kaul wrote: >> So (unless someone objects) let's go for option #2 (using the Prefer >> header on each and every request, and release the session once it is >> not there). > > My only objection is that you implement a draft spec and implement a > header without even bothering to register it - or asking if there is > such an identical-purposed header with a different name which may get > registered / is already in use somewhere. This is somewhat of a red herring though. HTTP Prefer was created exactly for the purpose of indicating a preference for a certain behavior of response. Have a look at section 9.1.1 of the draft RFC for the initial preferences and you'll see the preferences that are already registered. HTTP Prefer also defines a registration process for the possible values of this header. The process requires an email to preferences at ietf.org with a 14 day response time. The alternative to HTTP Prefer would be creating a new header (as i am not aware of any other /approved/ header that fits the bill). This requires writing an RFC and get it approved, which would take much longer, and which would likely get the comment of "Why aren't you using Prefer". Even if HTTP Prefer, for whatever reason, unexpectedly does not become a standard, i think in practice this does not impact us in any way. Regards Geert From oliel at redhat.com Mon Apr 16 12:33:27 2012 From: oliel at redhat.com (Ori Liel) Date: Mon, 16 Apr 2012 08:33:27 -0400 (EDT) Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: <4F859800.4000307@redhat.com> Message-ID: <861e9232-ff09-47ba-8c69-3ed0013e6961@zmail17.collab.prod.int.phx2.redhat.com> I'd like us to move forward with this. The option of using 'attach' action does not exist, because, as Eoghan observed, we would be executing an action on an entity which doesn't exist in the collection: (.../api/vms/{vm:id}/disks/???-no entity-???/attach) There are two options left on the table; let's see if we can agree on one of them: 1) POST/api/vms/{vm:id}/disks => attach disk DELETE .../api/vms/{vm:id}/disks/{disk:id} true => detach disk Pros: symmetrical Cons: risky (if user wants to detach but forgot to give parameter, disk will be deleted). 2) POST/api/vms/{vm:id}/disks => attach disk DELETE .../api/vms/{vm:id}/disks/{disk:id}/detach => detach disk Pros: not dangerous Cons: asymmetrical, attach done like add, but detach done using action. No solution is perfect but we need to decide. Thanks, Ori. From gjansen at redhat.com Mon Apr 16 12:38:33 2012 From: gjansen at redhat.com (Geert Jansen) Date: Mon, 16 Apr 2012 14:38:33 +0200 Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: <861e9232-ff09-47ba-8c69-3ed0013e6961@zmail17.collab.prod.int.phx2.redhat.com> References: <861e9232-ff09-47ba-8c69-3ed0013e6961@zmail17.collab.prod.int.phx2.redhat.com> Message-ID: <4F8C12C9.30300@redhat.com> On 04/16/2012 02:33 PM, Ori Liel wrote: > I'd like us to move forward with this. > > The option of using 'attach' action does not exist, because, as Eoghan observed, we would be executing an action on an entity which doesn't exist in the collection: (.../api/vms/{vm:id}/disks/???-no entity-???/attach) > > There are two options left on the table; let's see if we can agree on one of them: > > 1) > POST/api/vms/{vm:id}/disks > => attach disk > > DELETE .../api/vms/{vm:id}/disks/{disk:id} > true => detach disk > > Pros: symmetrical > Cons: risky (if user wants to detach but forgot to give parameter, disk will be deleted). My idea for that was to introduce true|false as well. Without force=true, we won't delete a disk if it's currently floating. I think it makes it less risky. And it is still backwards compatible, as 3.0 clients do not know how to create a floating disk, and therefore there is no risk that they are deleting one. Regards, Geert > > 2) > > POST/api/vms/{vm:id}/disks > => attach disk > > DELETE .../api/vms/{vm:id}/disks/{disk:id}/detach => detach disk > > Pros: not dangerous > Cons: asymmetrical, attach done like add, but detach done using action. > > > No solution is perfect but we need to decide. > > Thanks, > > Ori. -- Geert Jansen Sr. Product Marketing Manager, Red Hat Enterprise Virtualization Red Hat S.r.L. O: +39 095 916287 Via G. Fara 26 C: +39 348 1980079 (when in US: 415-623-0542) Milan 20124, Italy E: gjansen at redhat.com From acathrow at redhat.com Mon Apr 16 12:39:42 2012 From: acathrow at redhat.com (Andrew Cathrow) Date: Mon, 16 Apr 2012 08:39:42 -0400 (EDT) Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: <861e9232-ff09-47ba-8c69-3ed0013e6961@zmail17.collab.prod.int.phx2.redhat.com> Message-ID: <19cb9b3b-da35-4f51-8531-2ad4c30424fa@zmail07.collab.prod.int.phx2.redhat.com> ----- Original Message ----- > From: "Ori Liel" > To: engine-devel at ovirt.org > Cc: "Eoghan Glynn" > Sent: Monday, April 16, 2012 8:33:27 AM > Subject: Re: [Engine-devel] Floating Disks implementation in REST-API > > I'd like us to move forward with this. > > The option of using 'attach' action does not exist, because, as > Eoghan observed, we would be executing an action on an entity which > doesn't exist in the collection: (.../api/vms/{vm:id}/disks/???-no > entity-???/attach) > > There are two options left on the table; let's see if we can agree on > one of them: > > 1) > POST/api/vms/{vm:id}/disks > => > attach disk > > DELETE .../api/vms/{vm:id}/disks/{disk:id} > true => > detach disk > > Pros: symmetrical > Cons: risky (if user wants to detach but forgot to give parameter, > disk will be deleted). > > 2) > > POST/api/vms/{vm:id}/disks > => > attach disk > > DELETE .../api/vms/{vm:id}/disks/{disk:id}/detach => > detach disk > > Pros: not dangerous > Cons: asymmetrical, attach done like add, but detach done using > action. > Is there a 3rd option based on #1 where we just detach the disk rather than detaching and deleting? That could be further extended by adding an optional delete flag > > No solution is perfect but we need to decide. > > Thanks, > > Ori. > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel > From gjansen at redhat.com Mon Apr 16 12:42:28 2012 From: gjansen at redhat.com (Geert Jansen) Date: Mon, 16 Apr 2012 14:42:28 +0200 Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: <19cb9b3b-da35-4f51-8531-2ad4c30424fa@zmail07.collab.prod.int.phx2.redhat.com> References: <19cb9b3b-da35-4f51-8531-2ad4c30424fa@zmail07.collab.prod.int.phx2.redhat.com> Message-ID: <4F8C13B4.8050908@redhat.com> On 04/16/2012 02:39 PM, Andrew Cathrow wrote: > Is there a 3rd option based on #1 where we just detach the disk rather than detaching and deleting? > That could be further extended by adding an optional delete flag This was discussed and the problem with that is that it's not backwards compatible. Current clients and ISV software expects to be able to DELETE a disk, and after that it expects that the disk is gone. If we change behavior so that DELETE becomes detach by default, then old clients when they DELETE without any flags will instead create a floating disk. Regards, Geert From gjansen at redhat.com Mon Apr 16 14:37:26 2012 From: gjansen at redhat.com (Geert Jansen) Date: Mon, 16 Apr 2012 16:37:26 +0200 Subject: [Engine-devel] REST session management In-Reply-To: <4F8C2E00.9010304@redhat.com> References: <590d66ad-7eee-4637-8303-d4685fb13f4d@zmail02.collab.prod.int.phx2.redhat.com> <4F8BFC7E.3050904@redhat.com> <4F8C112F.1060703@redhat.com> <4F8C2E00.9010304@redhat.com> Message-ID: <4F8C2EA6.8070104@redhat.com> On 04/16/2012 04:34 PM, Yaniv Kaul wrote: >> The alternative to HTTP Prefer would be creating a new header (as i am >> not aware of any other /approved/ header that fits the bill). This >> requires writing an RFC and get it approved, which would take much >> longer, and which would likely get the comment of "Why aren't you >> using Prefer". > > I'm more worried about "persistent-auth" than 'prefer'. We could always > contact the draft author (jasnell at gmail.com) and ask for his opinion. I can do this. Regards, Geert From ykaul at redhat.com Mon Apr 16 14:34:40 2012 From: ykaul at redhat.com (Yaniv Kaul) Date: Mon, 16 Apr 2012 17:34:40 +0300 Subject: [Engine-devel] REST session management In-Reply-To: <4F8C112F.1060703@redhat.com> References: <590d66ad-7eee-4637-8303-d4685fb13f4d@zmail02.collab.prod.int.phx2.redhat.com> <4F8BFC7E.3050904@redhat.com> <4F8C112F.1060703@redhat.com> Message-ID: <4F8C2E00.9010304@redhat.com> On 04/16/2012 03:31 PM, Geert Jansen wrote: > > On 04/16/2012 01:03 PM, Yaniv Kaul wrote: > >>> So (unless someone objects) let's go for option #2 (using the Prefer >>> header on each and every request, and release the session once it is >>> not there). >> >> My only objection is that you implement a draft spec and implement a >> header without even bothering to register it - or asking if there is >> such an identical-purposed header with a different name which may get >> registered / is already in use somewhere. > > This is somewhat of a red herring though. > > HTTP Prefer was created exactly for the purpose of indicating a > preference for a certain behavior of response. Have a look at section > 9.1.1 of the draft RFC for the initial preferences and you'll see the > preferences that are already registered. > > HTTP Prefer also defines a registration process for the possible > values of this header. The process requires an email to > preferences at ietf.org with a 14 day response time. > > The alternative to HTTP Prefer would be creating a new header (as i am > not aware of any other /approved/ header that fits the bill). This > requires writing an RFC and get it approved, which would take much > longer, and which would likely get the comment of "Why aren't you > using Prefer". I'm more worried about "persistent-auth" than 'prefer'. We could always contact the draft author (jasnell at gmail.com) and ask for his opinion. Y. > > Even if HTTP Prefer, for whatever reason, unexpectedly does not become > a standard, i think in practice this does not impact us in any way. > > Regards > Geert -------------- next part -------------- An HTML attachment was scrubbed... URL: From lpeer at redhat.com Mon Apr 16 16:18:49 2012 From: lpeer at redhat.com (Livnat Peer) Date: Mon, 16 Apr 2012 19:18:49 +0300 Subject: [Engine-devel] [Users] Hey everyone how do we upgrade engine? In-Reply-To: <4F885B59.3040709@redhat.com> References: <4F885B59.3040709@redhat.com> Message-ID: <4F8C4669.6030108@redhat.com> On 13/04/12 19:59, Itamar Heim wrote: > On 04/13/2012 06:42 PM, Dominic Kaiser wrote: >> I am running 3.0.0_0001-1.6.fc16 ovirt engine and has been great! I >> appreciate Red Hat and all the support from the community on this >> project you all are awesome! >> >> I have not thought about it yet but was looking on the wiki and did not >> see how to upgrade and reninstallengine. What have been your >> experiences doing this and is it worth it? And how to do it? Sorry if >> it was posted somewhere else just let me know if there is info on this >> already. > > by running the engine-upgrade utility, though i suspect it will have to > pass some testing/bug fixes for the second release before can be used > (doing a test upgrade at that phase on your environment would help > finding issues) > We have one issue that we know of and we'll fix soon - https://bugzilla.redhat.com/show_bug.cgi?id=790303 If you are interested you can track engine-devel at ovirt.org list for updates on this in the upcoming week (or keep track of the bug status). Livnat >> >> I have had the greatest experience moving from 2 esxiservers to ovirt. >> You guys and gals rock! > thanks - nice to hear. > _______________________________________________ > Users mailing list > Users at ovirt.org > http://lists.ovirt.org/mailman/listinfo/users From sanjal at redhat.com Tue Apr 17 08:59:06 2012 From: sanjal at redhat.com (Shireesh Anjal) Date: Tue, 17 Apr 2012 14:29:06 +0530 Subject: [Engine-devel] Query regarding ValidationUtils#validateInputs In-Reply-To: <4F8A643C.8060605@redhat.com> References: <15a5329c-4579-4ef6-b1c8-be0b260e859b@zmail07.collab.prod.int.phx2.redhat.com> <4F8A643C.8060605@redhat.com> Message-ID: <4F8D30DA.8000609@redhat.com> On Sunday 15 April 2012 11:31 AM, Roy Golan wrote: > On 04/12/2012 10:50 AM, Omer Frenkel wrote: >> >> >> ------------------------------------------------------------------------ >> >> *From: *"Shireesh Anjal" >> *To: *engine-devel at ovirt.org >> *Sent: *Thursday, April 12, 2012 9:35:25 AM >> *Subject: *[Engine-devel] Query regarding >> ValidationUtils#validateInputs >> >> Hi, >> >> This is regarding the following validation method we have in >> ValidationUtils: >> >> /public static >> ArrayList validateInputs(List> >> validationGroupList, T parameters);/ >> >> I there any particular reason for supporting the validations only >> on objects of classes derived from VdcActionParametersBase? I >> guess this was done because this method is primarily intended to >> validate the action parameters passed to a BLL action, using the >> validation annotations on the parameter class. However I think >> this method can be useful for general use as well. e.g. I cannot >> add a "@Valid" annotation on a "list" or a "map" in a parameter >> class. So I need to iterate over the list/map, and validate each >> element inside the loop. The validation inside the loop can also >> utilize the above method if the restriction "extends >> VdcActionParametersBase" is removed. This will allow me to do the >> following in the canDoAction method: >> >> protected boolean canDoAction() { >> ... >> for(GlusterBrickEntity brick : >> getParameters().getGlusterVolume().getBricks()) { >> List errors = >> ValidationUtils.validateInputs(getValidationGroups(), brick); >> if(errors != null) { >> for(String error : errors) { >> addCanDoActionMessage(error); >> } >> } >> } >> ... >> } >> >> Regards, >> Shireesh >> >> _______________________________________________ >> Engine-devel mailing list >> Engine-devel at ovirt.org >> http://lists.ovirt.org/mailman/listinfo/engine-devel >> >> i don't think there is a reason to restrict only for >> VdcActionParametersBase, roy what do you think? >> >> also you can use here >> getReturnValue().getCanDoActionMessages().addAll(errors); >> instead of going over on all errors. > > pls see SetupNetworksParameters.java for validating a list of network > interfaces. > > hibernate validator supports trivial object graphs and members that > are arrays, list and java.util.map implementations. > If your code looks like that it should work. If you are using special > validation groups please add them to your command with > addValidationGroups. > > this should work: > > GlusterCommandParameters.java > @Valid > List bricks > > Bricks.java > @NotNull > Guid id Thanks! I had tried adding @Valid annotation as suggested above, which had resulted in an exception from the validation engine, without any specific information about the problem, and I assumed that @Valid may not work on Lists. Digged deeper after reading your response, and found that the @Valid annotation resulted in a call to equals method on the entity, which had a bug, resulting in the exception. It all works well after fixing the bug. > > > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanjal at redhat.com Tue Apr 17 10:08:25 2012 From: sanjal at redhat.com (Shireesh Anjal) Date: Tue, 17 Apr 2012 15:38:25 +0530 Subject: [Engine-devel] Storage Device Management in VDSM and oVirt Message-ID: <4F8D4119.80901@redhat.com> Hi all, As part of adding Gluster support in ovirt, we need to introduce some Storage Device management capabilities (on the host). Since these are quite generic and not specific to Gluster as such, we think it might be useful to add it as a core vdsm and oVirt feature. At a high level, this involves following: - A "Storage Devices" sub-tab on "Host" entity, displaying information about all the storage devices* - Listing of different types of storage devices of a host - Regular Disks and Partitions* - LVM* - Software RAID* - Various actions related to device configuration - Partition disks* - Format and mount disks / partitions* - Create, resize and delete LVM Volume Groups (VGs) - Create, resize, delete, format and mount LVM Logical Volumes (LVs) - Create, resize, delete, partition, format and mount Software RAID devices - Edit properties of the devices - UI can be modeled similar to the system-config-lvm tool The items marked with (*) in above list are urgently required for the Gluster feature, and will be developed first. Comments / inputs welcome. Thanks, Shireesh From ykaul at redhat.com Tue Apr 17 11:06:40 2012 From: ykaul at redhat.com (Yaniv Kaul) Date: Tue, 17 Apr 2012 14:06:40 +0300 Subject: [Engine-devel] Storage Device Management in VDSM and oVirt In-Reply-To: <4F8D4119.80901@redhat.com> References: <4F8D4119.80901@redhat.com> Message-ID: <4F8D4EC0.9050506@redhat.com> On 04/17/2012 01:08 PM, Shireesh Anjal wrote: > Hi all, > > As part of adding Gluster support in ovirt, we need to introduce some > Storage Device management capabilities (on the host). Since these are > quite generic and not specific to Gluster as such, we think it might > be useful to add it as a core vdsm and oVirt feature. At a high level, > this involves following: > > - A "Storage Devices" sub-tab on "Host" entity, displaying > information about all the storage devices* > - Listing of different types of storage devices of a host > - Regular Disks and Partitions* > - LVM* > - Software RAID* > - Various actions related to device configuration > - Partition disks* > - Format and mount disks / partitions* > - Create, resize and delete LVM Volume Groups (VGs) > - Create, resize, delete, format and mount LVM Logical Volumes (LVs) > - Create, resize, delete, partition, format and mount Software > RAID devices > - Edit properties of the devices > - UI can be modeled similar to the system-config-lvm tool > > The items marked with (*) in above list are urgently required for the > Gluster feature, and will be developed first. > > Comments / inputs welcome. > > Thanks, > Shireesh > _______________________________________________ > Arch mailing list > Arch at ovirt.org > http://lists.ovirt.org/mailman/listinfo/arch Anything we can share with rtslib ( http://www.risingtidesystems.com/doc/rtslib/html/) which is the API behind targetcli which is the CLI for LIO (linux-iscsi.org) target, which is in Linux kernel now) ? They have some VERY basic LV and VG handling. Y. -------------- next part -------------- An HTML attachment was scrubbed... URL: From oliel at redhat.com Tue Apr 17 12:27:09 2012 From: oliel at redhat.com (Ori Liel) Date: Tue, 17 Apr 2012 08:27:09 -0400 (EDT) Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: <4F8C12C9.30300@redhat.com> Message-ID: <7a869b4a-9a50-43c0-9c48-84c2f6667e8e@zmail17.collab.prod.int.phx2.redhat.com> > > >On 04/16/2012 02:33 PM, Ori Liel wrote: >> I'd like us to move forward with this. >> >> The option of using 'attach' action does not exist, because, as Eoghan observed, we would be executing an action on an entity which doesn't exist in the collection: (.../api/vms/{vm:id}/disks/???-no entity-???/attach) >> >> There are two options left on the table; let's see if we can agree on one of them: >> >> 1) >> POST/api/vms/{vm:id}/disks >> => attach disk >> >> DELETE .../api/vms/{vm:id}/disks/{disk:id} >> true => detach disk >> >> Pros: symmetrical >> Cons: risky (if user wants to detach but forgot to give parameter, disk will be deleted). > >My idea for that was to introduce true|false as well. >Without force=true, we won't delete a disk if it's currently floating. > If the disk is floating it will only appear in root collection (...api/disks), and DELETE from there is non-ambiguous, as there's no option to detach - so I don't see how adding 'force' there helps us. In your previous mail you suggested the same thing for attached floating disk, so perhaps you meant that here as well? (sorry for only responding now, by the way). But that does break API - for example, a simple script deleting all disks from a VM would fail because suddenly deleting requires 'force=true'. >I think it makes it less risky. And it is still backwards compatible, as >3.0 clients do not know how to create a floating disk, and therefore >there is no risk that they are deleting one. > >Regards, >Geert > > >> >> 2) >> >> POST/api/vms/{vm:id}/disks >> => attach disk >> >> DELETE .../api/vms/{vm:id}/disks/{disk:id}/detach => detach disk >> >> Pros: not dangerous >> Cons: asymmetrical, attach done like add, but detach done using action. >> >> >> No solution is perfect but we need to decide. >> >> Thanks, >> >> Ori. > >-- >Geert Jansen >Sr. Product Marketing Manager, Red Hat Enterprise Virtualization > >Red Hat S.r.L. O: +39 095 916287 >Via G. Fara 26 C: +39 348 1980079 (when in US: 415-623-0542) >Milan 20124, Italy E: gjansen at redhat.com From gjansen at redhat.com Tue Apr 17 12:50:17 2012 From: gjansen at redhat.com (Geert Jansen) Date: Tue, 17 Apr 2012 14:50:17 +0200 Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: <7a869b4a-9a50-43c0-9c48-84c2f6667e8e@zmail17.collab.prod.int.phx2.redhat.com> References: <7a869b4a-9a50-43c0-9c48-84c2f6667e8e@zmail17.collab.prod.int.phx2.redhat.com> Message-ID: <4F8D6709.1050007@redhat.com> On 04/17/2012 02:27 PM, Ori Liel wrote: >> My idea for that was to introducetrue|false as well. >> Without force=true, we won't delete a disk if it's currently floating. >> > > If the disk is floating it will only appear in root collection (...api/disks), and DELETE from > there is non-ambiguous, as there's no option to detach - so I don't see how adding 'force' there > helps us. Floating disks should be both in the root context, and also in the VM context for each VM the floating disk is attached to, right? So floating disks would appear 1+N_attach times in the API, once in the root context, and once for each VM they are attached to. Regarding the root context: you are right that DELETE in the root context is unambiguous, and therefore we don't need "detach" or "force" arguments there. And because in 3.0 we didn't have a disk collection in the root context, backwards compatibility isn't an issue here. > In your previous mail you suggested the same thing for attached floating disk, so perhaps you meant > that here as well? (sorry for only responding now, by the way). But that does break API - for example, > a simple script deleting all disks from a VM would fail because suddenly deleting requires 'force=true'. A 3.0 client does not know how to create a floating disk. So in my view, it does not need to know how to delete one. Is your concern about the case where a 3.1 client creates a floating disk, and you would like a 3.0 client to be able to delete that. I think this is a too strong interpretation of backwards compatibility. So far all ISV software that integrates with us and does provisioning of VMs, both creates and deletes VMs. And properly written software will issue an error message when a disk DELETE fails. In the end there could be many other reasons why a disk DELETE can fail, right? We are adding one more reason a disk DELETE will fail, namely that the disk is floating. Regards, Geert From oliel at redhat.com Tue Apr 17 13:00:54 2012 From: oliel at redhat.com (Ori Liel) Date: Tue, 17 Apr 2012 09:00:54 -0400 (EDT) Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: <4F8D6709.1050007@redhat.com> Message-ID: <4f5d6f2a-00d8-4b35-bb1f-76d5ea7910d4@zmail17.collab.prod.int.phx2.redhat.com> > >On 04/17/2012 02:27 PM, Ori Liel wrote: > >>> My idea for that was to introducetrue|false as well. >>> Without force=true, we won't delete a disk if it's currently floating. >>> >> >> If the disk is floating it will only appear in root collection (...api/disks), and DELETE from >> there is non-ambiguous, as there's no option to detach - so I don't see how adding 'force' there >> helps us. > >Floating disks should be both in the root context, and also in the VM >context for each VM the floating disk is attached to, right? So floating >disks would appear 1+N_attach times in the API, once in the root >context, and once for each VM they are attached to. > IIUC a floating disk is not associated with the VM in any way, and should not appear in that VM's collection of disks. There's a similar feature of activate/deactivate disk (http://www.ovirt.org/wiki/Features/HotPlug). A deactivated disk is still associated with the VM, and should appear in the VM's collection of disks. Perhaps this is the source of confusion. >Regarding the root context: you are right that DELETE in the root >context is unambiguous, and therefore we don't need "detach" or "force" >arguments there. And because in 3.0 we didn't have a disk collection in >the root context, backwards compatibility isn't an issue here. > correct, root context is not a problem >> In your previous mail you suggested the same thing for attached floating disk, so perhaps you meant >> that here as well? (sorry for only responding now, by the way). But that does break API - for example, >> a simple script deleting all disks from a VM would fail because suddenly deleting requires 'force=true'. > >A 3.0 client does not know how to create a floating disk. So in my view, >it does not need to know how to delete one. > >Is your concern about the case where a 3.1 client creates a floating >disk, and you would like a 3.0 client to be able to delete that. I think >this is a too strong interpretation of backwards compatibility. So far >all ISV software that integrates with us and does provisioning of VMs, >both creates and deletes VMs. And properly written software will issue >an error message when a disk DELETE fails. In the end there could be >many other reasons why a disk DELETE can fail, right? We are adding one >more reason a disk DELETE will fail, namely that the disk is floating. > >Regards, >Geert From emesika at redhat.com Tue Apr 17 13:02:13 2012 From: emesika at redhat.com (Eli Mesika) Date: Tue, 17 Apr 2012 09:02:13 -0400 (EDT) Subject: [Engine-devel] Postgres DB Upgrade Procedure wiki In-Reply-To: <2b8119b8-e398-4a5f-9c8b-ba1599d4cb88@zmail13.collab.prod.int.phx2.redhat.com> Message-ID: Hi guys This is an updated version of our Postgres DB Upgrade Procedure. Most of it is not new and main changes are in the new "Configuration changes" section Please review and comment, we need this applied upstream ASAP http://www.ovirt.org/wiki/Postgres-database-upgrade-procedure From oschreib at redhat.com Tue Apr 17 13:20:49 2012 From: oschreib at redhat.com (Ofer Schreiber) Date: Tue, 17 Apr 2012 09:20:49 -0400 (EDT) Subject: [Engine-devel] ovirt-engine deployment method In-Reply-To: <4d56528a-2eb6-48da-ab71-0c66bdeabab7@zmail14.collab.prod.int.phx2.redhat.com> Message-ID: <0d88e373-f795-46cc-a63b-cef942edf5a0@zmail14.collab.prod.int.phx2.redhat.com> As decided earlier, oVirt next release (3.1) is targeted for Fedora 17. Since the engine uses JBoss, we have two deployment options: 1. Continue working with ovirt-engine-jbossas package PROS: Single rpm. known upgrade method. CONS: Maintaining un-natural zip based rpm. No official support. Can't be pushed into Fedora. 2. Move to JBoss F17 official packages: PROS: Fully supported F17 rpms (including bug fixes, security fixes, etc). "The right thing to do". CONS: Upgrade from first release (relaying on old jboss) will be almost impossible, Some open issues (will it work just as as normal service? or will we need to code a new one?), Might cause a delay to Feature Freeze. Thought? Comments? Share them with us! --- Ofer Schreiber oVirt Release Manager From gjansen at redhat.com Tue Apr 17 13:30:43 2012 From: gjansen at redhat.com (Geert Jansen) Date: Tue, 17 Apr 2012 15:30:43 +0200 Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: <4f5d6f2a-00d8-4b35-bb1f-76d5ea7910d4@zmail17.collab.prod.int.phx2.redhat.com> References: <4f5d6f2a-00d8-4b35-bb1f-76d5ea7910d4@zmail17.collab.prod.int.phx2.redhat.com> Message-ID: <4F8D7083.7080306@redhat.com> >> Floating disks should be both in the root context, and also in the VM >> context for each VM the floating disk is attached to, right? So floating >> disks would appear 1+N_attach times in the API, once in the root >> context, and once for each VM they are attached to. >> > > IIUC a floating disk is not associated with the VM in any way, and should > not appear in that VM's collection of disks. There's a similar feature of > activate/deactivate disk (http://www.ovirt.org/wiki/Features/HotPlug). > A deactivated disk is still associated with the VM, and should appear in > the VM's collection of disks. Perhaps this is the source of confusion. No that isn't it. I think have a bit of terminology mismatch. According to: http://www.ovirt.org/wiki/Features/DetailedFloatingDisk i think your use of the word floating is correct. I got confused as i thought that any disk could be floating, whether it was attached to 0 VMs, 1 VM, or 2 or more VMs. So before we go further, let's get things straight: - disk without any VMs => floating. It appears in the root context. - disk attached to 1 VM => normal state. It appears in the VM context. - disk attached to 2 VMs => shared disk. It appears in both VM contexts. Is that correct? Also can someone explain on how floating and shared disks are actually implemented in the BE? I imagine it's one of two ways: => The BE keep a global list of disks, each disk with zero or more references to a VM. => The BE keeps a special "floating" state independent of the number of VMs that it is attached to. Thanks, Geert From mburns at redhat.com Tue Apr 17 13:31:38 2012 From: mburns at redhat.com (Mike Burns) Date: Tue, 17 Apr 2012 09:31:38 -0400 Subject: [Engine-devel] ovirt-engine deployment method In-Reply-To: <0d88e373-f795-46cc-a63b-cef942edf5a0@zmail14.collab.prod.int.phx2.redhat.com> References: <0d88e373-f795-46cc-a63b-cef942edf5a0@zmail14.collab.prod.int.phx2.redhat.com> Message-ID: <1334669498.3279.67.camel@beelzebub.mburnsfire.net> On Tue, 2012-04-17 at 09:20 -0400, Ofer Schreiber wrote: > As decided earlier, oVirt next release (3.1) is targeted for Fedora > 17. > Since the engine uses JBoss, we have two deployment options: > 1. Continue working with ovirt-engine-jbossas package > PROS: Single rpm. known upgrade method. > CONS: Maintaining un-natural zip based rpm. No official support. > Can't be pushed into Fedora. > > 2. Move to JBoss F17 official packages: > PROS: Fully supported F17 rpms (including bug fixes, security > fixes, etc). "The right thing to do". > CONS: Upgrade from first release (relaying on old jboss) will be > almost impossible, Some open issues (will it work just as as normal > service? or will we need to code a new one?), Might cause a delay to > Feature Freeze. Quick thoughts -- this will come up for every release until we decide on #2. The con for #2 will always be there until we finally switch over. I think it's less impact to have a more manual upgrade between release 1 and 2 than between later releases. As long as we can provide at least a manual upgrade process with well defined steps so that the early adopters don't have to re-create their environments, I think we should go with #2. Mike > > Thought? Comments? > Share them with us! > --- > Ofer Schreiber > oVirt Release Manager > _______________________________________________ > Arch mailing list > Arch at ovirt.org > http://lists.ovirt.org/mailman/listinfo/arch From iheim at redhat.com Tue Apr 17 14:02:17 2012 From: iheim at redhat.com (Itamar Heim) Date: Tue, 17 Apr 2012 17:02:17 +0300 Subject: [Engine-devel] ovirt-engine deployment method In-Reply-To: <0d88e373-f795-46cc-a63b-cef942edf5a0@zmail14.collab.prod.int.phx2.redhat.com> References: <0d88e373-f795-46cc-a63b-cef942edf5a0@zmail14.collab.prod.int.phx2.redhat.com> Message-ID: <4F8D77E9.4060906@redhat.com> On 04/17/2012 04:20 PM, Ofer Schreiber wrote: > As decided earlier, oVirt next release (3.1) is targeted for Fedora 17. > Since the engine uses JBoss, we have two deployment options: > 1. Continue working with ovirt-engine-jbossas package > PROS: Single rpm. known upgrade method. > CONS: Maintaining un-natural zip based rpm. No official support. Can't be pushed into Fedora. > > 2. Move to JBoss F17 official packages: > PROS: Fully supported F17 rpms (including bug fixes, security fixes, etc). "The right thing to do". > CONS: Upgrade from first release (relaying on old jboss) will be almost impossible, Some open issues (will it work just as as normal service? or will we need to code a new one?), Might cause a delay to Feature Freeze. > > Thought? Comments? we also want to push this version of ovirt into fedora (3.0 already in), which will require the native jboss rpms? > Share them with us! > --- > Ofer Schreiber > oVirt Release Manager > _______________________________________________ > Arch mailing list > Arch at ovirt.org > http://lists.ovirt.org/mailman/listinfo/arch From oliel at redhat.com Tue Apr 17 14:26:02 2012 From: oliel at redhat.com (Ori Liel) Date: Tue, 17 Apr 2012 10:26:02 -0400 (EDT) Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: <4F8D7083.7080306@redhat.com> Message-ID: <2e740fda-a19f-4467-b2a0-a971092214b1@zmail17.collab.prod.int.phx2.redhat.com> > >>> Floating disks should be both in the root context, and also in the VM >>> context for each VM the floating disk is attached to, right? So floating >>> disks would appear 1+N_attach times in the API, once in the root >>> context, and once for each VM they are attached to. >>> >> >> IIUC a floating disk is not associated with the VM in any way, and should >> not appear in that VM's collection of disks. There's a similar feature of >> activate/deactivate disk (http://www.ovirt.org/wiki/Features/HotPlug). >> A deactivated disk is still associated with the VM, and should appear in >> the VM's collection of disks. Perhaps this is the source of confusion. > >No that isn't it. I think have a bit of terminology mismatch. According to: > >http://www.ovirt.org/wiki/Features/DetailedFloatingDisk > >i think your use of the word floating is correct. I got confused as i >thought that any disk could be floating, whether it was attached to 0 >VMs, 1 VM, or 2 or more VMs. > >So before we go further, let's get things straight: > > - disk without any VMs => floating. It appears in the root context. > - disk attached to 1 VM => normal state. It appears in the VM context. I think this type of disk should be shown in both contexts. If a user is looking at http://{host:port}/disks, I think he intuitively expects to see all disks (attached or unattached). A disk will contain reference to the VMs which it is attached to, and thus: - No VM-ids --> floating disk. - One VM-id --> regular disk. - Multiple VM-ids --> shared disk. > - disk attached to 2 VMs => shared disk. It appears in both VM contexts. > >Is that correct? > >Also can someone explain on how floating and shared disks are actually >implemented in the BE? I imagine it's one of two ways: > > => The BE keep a global list of disks, each disk with zero or more >references to a VM. > => The BE keeps a special "floating" state independent of the number >of VMs that it is attached to. > >Thanks, >Geert From iheim at redhat.com Tue Apr 17 14:30:27 2012 From: iheim at redhat.com (Itamar Heim) Date: Tue, 17 Apr 2012 17:30:27 +0300 Subject: [Engine-devel] ovirt-engine deployment method In-Reply-To: <1334669498.3279.67.camel@beelzebub.mburnsfire.net> References: <0d88e373-f795-46cc-a63b-cef942edf5a0@zmail14.collab.prod.int.phx2.redhat.com> <1334669498.3279.67.camel@beelzebub.mburnsfire.net> Message-ID: <4F8D7E83.3040303@redhat.com> On 04/17/2012 04:31 PM, Mike Burns wrote: > On Tue, 2012-04-17 at 09:20 -0400, Ofer Schreiber wrote: >> As decided earlier, oVirt next release (3.1) is targeted for Fedora >> 17. >> Since the engine uses JBoss, we have two deployment options: >> 1. Continue working with ovirt-engine-jbossas package >> PROS: Single rpm. known upgrade method. >> CONS: Maintaining un-natural zip based rpm. No official support. >> Can't be pushed into Fedora. >> >> 2. Move to JBoss F17 official packages: >> PROS: Fully supported F17 rpms (including bug fixes, security >> fixes, etc). "The right thing to do". >> CONS: Upgrade from first release (relaying on old jboss) will be >> almost impossible, Some open issues (will it work just as as normal >> service? or will we need to code a new one?), Might cause a delay to >> Feature Freeze. > > Quick thoughts -- this will come up for every release until we decide on > #2. The con for #2 will always be there until we finally switch over. > I think it's less impact to have a more manual upgrade between release 1 > and 2 than between later releases. > > As long as we can provide at least a manual upgrade process with well > defined steps so that the early adopters don't have to re-create their > environments, I think we should go with #2. +1 From iheim at redhat.com Tue Apr 17 14:32:49 2012 From: iheim at redhat.com (Itamar Heim) Date: Tue, 17 Apr 2012 17:32:49 +0300 Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: <2e740fda-a19f-4467-b2a0-a971092214b1@zmail17.collab.prod.int.phx2.redhat.com> References: <2e740fda-a19f-4467-b2a0-a971092214b1@zmail17.collab.prod.int.phx2.redhat.com> Message-ID: <4F8D7F11.8060900@redhat.com> On 04/17/2012 05:26 PM, Ori Liel wrote: >> >>>> Floating disks should be both in the root context, and also in the VM >>>> context for each VM the floating disk is attached to, right? So floating >>>> disks would appear 1+N_attach times in the API, once in the root >>>> context, and once for each VM they are attached to. >>>> >>> >>> IIUC a floating disk is not associated with the VM in any way, and should >>> not appear in that VM's collection of disks. There's a similar feature of >>> activate/deactivate disk (http://www.ovirt.org/wiki/Features/HotPlug). >>> A deactivated disk is still associated with the VM, and should appear in >>> the VM's collection of disks. Perhaps this is the source of confusion. >> >> No that isn't it. I think have a bit of terminology mismatch. According to: >> >> http://www.ovirt.org/wiki/Features/DetailedFloatingDisk >> >> i think your use of the word floating is correct. I got confused as i >> thought that any disk could be floating, whether it was attached to 0 >> VMs, 1 VM, or 2 or more VMs. >> >> So before we go further, let's get things straight: >> >> - disk without any VMs => floating. It appears in the root context. >> - disk attached to 1 VM => normal state. It appears in the VM context. > > I think this type of disk should be shown in both contexts. > > If a user is looking at http://{host:port}/disks, I think he intuitively > expects to see all disks (attached or unattached). A disk will contain > reference to the VMs which it is attached to, and thus: > > - No VM-ids --> floating disk. > - One VM-id --> regular disk. > - Multiple VM-ids --> shared disk. iirc, shared disk is a flag on the disk to allow it to be shared. doesn't mean it is shared yet, rather can be shared. > >> - disk attached to 2 VMs => shared disk. It appears in both VM contexts. >> >> Is that correct? >> >> Also can someone explain on how floating and shared disks are actually >> implemented in the BE? I imagine it's one of two ways: >> >> => The BE keep a global list of disks, each disk with zero or more >> references to a VM. >> => The BE keeps a special "floating" state independent of the number >> of VMs that it is attached to. >> >> Thanks, >> Geert > _______________________________________________ > Engine-devel mailing list > Engine-devel at ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel From oliel at redhat.com Tue Apr 17 14:53:07 2012 From: oliel at redhat.com (Ori Liel) Date: Tue, 17 Apr 2012 10:53:07 -0400 (EDT) Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: <4F8D7F11.8060900@redhat.com> Message-ID: >On 04/17/2012 05:26 PM, Ori Liel wrote: >>> >>>>> Floating disks should be both in the root context, and also in the VM >>>>> context for each VM the floating disk is attached to, right? So floating >>>>> disks would appear 1+N_attach times in the API, once in the root >>>>> context, and once for each VM they are attached to. >>>>> >>>> >>>> IIUC a floating disk is not associated with the VM in any way, and should >>>> not appear in that VM's collection of disks. There's a similar feature of >>>> activate/deactivate disk (http://www.ovirt.org/wiki/Features/HotPlug). >>>> A deactivated disk is still associated with the VM, and should appear in >>>> the VM's collection of disks. Perhaps this is the source of confusion. >>> >>> No that isn't it. I think have a bit of terminology mismatch. According to: >>> >>> http://www.ovirt.org/wiki/Features/DetailedFloatingDisk >>> >>> i think your use of the word floating is correct. I got confused as i >>> thought that any disk could be floating, whether it was attached to 0 >>> VMs, 1 VM, or 2 or more VMs. >>> >>> So before we go further, let's get things straight: >>> >>> - disk without any VMs => floating. It appears in the root context. >>> - disk attached to 1 VM => normal state. It appears in the VM context. >> >> I think this type of disk should be shown in both contexts. >> >> If a user is looking at http://{hostort}/disks, I think he intuitively >> expects to see all disks (attached or unattached). A disk will contain >> reference to the VMs which it is attached to, and thus: >> >> - No VM-ids --> floating disk. >> - One VM-id --> regular disk. >> - Multiple VM-ids --> shared disk. > >iirc, shared disk is a flag on the disk to allow it to be shared. >doesn't mean it is shared yet, rather can be shared. Right, but there's no contradiction: a disk can have 'shared' flag and also show the list of VMs it's attached to. The flag tells you if the disk has the ability to be shared, while the list of VMs tells you which VMs are actually sharing the disk right now (if any at all) > >> >>> - disk attached to 2 VMs => shared disk. It appears in both VM contexts. >>> >>> Is that correct? >>> >>> Also can someone explain on how floating and shared disks are actually >>> implemented in the BE? I imagine it's one of two ways: >>> >>> => The BE keep a global list of disks, each disk with zero or more >>> references to a VM. >>> => The BE keeps a special "floating" state independent of the number >>> of VMs that it is attached to. >>> >>> Thanks, >>> Geert >> _______________________________________________ >> Engine-devel mailing list >> Engine-devel at ovirt.org >> http://lists.ovirt.org/mailman/listinfo/engine-devel > From gjansen at redhat.com Tue Apr 17 14:56:56 2012 From: gjansen at redhat.com (Geert Jansen) Date: Tue, 17 Apr 2012 16:56:56 +0200 Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: References: Message-ID: <4F8D84B8.5000406@redhat.com> On 04/17/2012 04:53 PM, Ori Liel wrote: >> iirc, shared disk is a flag on the disk to allow it to be shared. >> doesn't mean it is shared yet, rather can be shared. > > Right, but there's no contradiction: a disk can have 'shared' flag and > also show the list of VMs it's attached to. The flag tells you if the > disk has the ability to be shared, while the list of VMs tells you which > VMs are actually sharing the disk right now (if any at all) If we can expose the "shared" flag though, i think the API gets more natural. We can then only show the shared disks in the root context. Itamar, can we expose this flag, or do you consider this flag is internal to the BE? Regards, From iheim at redhat.com Tue Apr 17 15:54:04 2012 From: iheim at redhat.com (Itamar Heim) Date: Tue, 17 Apr 2012 18:54:04 +0300 Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: <4F8D84B8.5000406@redhat.com> References: <4F8D84B8.5000406@redhat.com> Message-ID: <4F8D921C.10702@redhat.com> On 04/17/2012 05:56 PM, Geert Jansen wrote: > > On 04/17/2012 04:53 PM, Ori Liel wrote: > >>> iirc, shared disk is a flag on the disk to allow it to be shared. >>> doesn't mean it is shared yet, rather can be shared. >> >> Right, but there's no contradiction: a disk can have 'shared' flag and >> also show the list of VMs it's attached to. The flag tells you if the >> disk has the ability to be shared, while the list of VMs tells you which >> VMs are actually sharing the disk right now (if any at all) > > If we can expose the "shared" flag though, i think the API gets more > natural. We can then only show the shared disks in the root context. > > Itamar, can we expose this flag, or do you consider this flag is > internal to the BE? we have to expose this flag for shared disk functionality. this is the only way via ui/api to flag the disk as shared (which only then allows attaching it to more than a single vm - this is explicit to avoid disk corruptions) From gjansen at redhat.com Tue Apr 17 16:31:18 2012 From: gjansen at redhat.com (Geert Jansen) Date: Tue, 17 Apr 2012 18:31:18 +0200 Subject: [Engine-devel] Floating Disks implementation in REST-API In-Reply-To: <4F8D921C.10702@redhat.com> References: <4F8D84B8.5000406@redhat.com> <4F8D921C.10702@redhat.com> Message-ID: <4F8D9AD6.6010602@redhat.com> On 04/17/2012 05:54 PM, Itamar Heim wrote: >> If we can expose the "shared" flag though, i think the API gets more >> natural. We can then only show the shared disks in the root context. >> >> Itamar, can we expose this flag, or do you consider this flag is >> internal to the BE? > > we have to expose this flag for shared disk functionality. this is the > only way via ui/api to flag the disk as shared (which only then allows > attaching it to more than a single vm - this is explicit to avoid disk > corruptions) OK, understood. Which then begs the question - why we are trying to make the setting / unsetting of this flag implicit via the various POST and DELETE calls we were trying to model. Maybe we ought to just allow a user to set the shared flag: PUT /api/vms/{vm:id}/disks/{disk:id} true|false When a disk is shared: - The disks shows up in the root context /api/disks. - You can POST this disk to another VM, making it available to that VM. - Detach it from a VM using DELETE. To delete a shared disk, you need to either: - Unshare it first. Then DELETE. - DELETE it from the root context. Regards, Geert From oschreib at redhat.com Wed Apr 18 07:51:55 2012 From: oschreib at redhat.com (Ofer Schreiber) Date: Wed, 18 Apr 2012 03:51:55 -0400 (EDT) Subject: [Engine-devel] Jar versions in ovirt-engine In-Reply-To: <532542d4-8baf-4e1b-bd59-d0a26a805117@zmail14.collab.prod.int.phx2.redhat.com> Message-ID: Ever wondered why the version of oVirt's first release is 3.0.0_0001? The answer is simple - We use ovirt-engine jar's version as our "main" release version. Personally, I think the current versioning scheme is ugly. Actually, I can't name even one open-source project using "_" in it's version. What can we do about it? We have couple of options: 1. Leave the engine alone, and use a separate versioning scheme (e.g - use just 3.1.0 as the main version for next release) 2. Remove "_" from engine jars 3. Do nothing. I'd like to hear your thoughts, as well as the reasons to use such an unusual versioning scheme. --- Ofer Schreiber oVirt Release Manager From lhornyak at redhat.com Wed Apr 18 08:13:37 2012 From: lhornyak at redhat.com (Laszlo Hornyak) Date: Wed, 18 Apr 2012 04:13:37 -0400 (EDT) Subject: [Engine-devel] java enum syntax trick In-Reply-To: Message-ID: <11613aca-aa99-4171-aaab-e71daddbca65@zmail01.collab.prod.int.phx2.redhat.com> Hi, In java enums, you can leave a coma before the semicolon closing the names in the enum. e.g. enum Foo { bar, baz, //