--- Log opened wo jan 16 00:00:30 2013 00:07 -!- AlbertoSilva (AlbertoSilva): has joined #vdsm 00:26 -!- lhornyak: has quit [Quit: Leaving.] 00:32 -!- itamarh: has quit [Ping timeout: 276 seconds] 00:34 -!- aliguori: has quit [Quit: Ex-Chat] 00:39 -!- mliu (purple): has joined #vdsm 00:48 -!- mliu: has left #vdsm [] 02:34 -!- jbrooks: has quit [Ping timeout: 248 seconds] 02:55 -!- zhshzhou (Zhou Zheng Sheng): has joined #vdsm 02:59 -!- jbrooks (Jason Brooks): has joined #vdsm 03:03 -!- bala1 (purple): has joined #vdsm 03:04 -!- jbrooks: has quit [Ping timeout: 256 seconds] 03:10 -!- shaohef (shaohef): has joined #vdsm 03:21 -!- zhshzhou: has quit [Ping timeout: 252 seconds] 03:22 -!- zhshzhou (Zhou Zheng Sheng): has joined #vdsm 03:27 -!- zhshzhou: has quit [Quit: Leaving.] 03:39 -!- shaohef: has quit [Ping timeout: 255 seconds] 03:44 -!- shaohef (shaohef): has joined #vdsm 03:45 -!- apuimedo: has quit [Read error: Operation timed out] 04:29 -!- zhshzhou (Zhou Zheng Sheng): has joined #vdsm 04:29 -!- rharper (Ryan Harper): has joined #vdsm 05:13 -!- jbrooks (Jason Brooks): has joined #vdsm 05:48 -!- bala1: has quit [Quit: Leaving.] 05:54 -!- jbrooks: has quit [Ping timeout: 264 seconds] 06:09 -!- sming (New Now Know How): has joined #vdsm 06:17 -!- lhornyak (purple): has joined #vdsm 06:23 -!- lhornyak1 (purple): has joined #vdsm 06:23 -!- markw_ (Mark Wu): has joined #vdsm 06:26 -!- lhornyak: has quit [Ping timeout: 276 seconds] 06:35 -!- mliu (purple): has joined #vdsm 06:36 -!- mliu: has left #vdsm [] 06:50 -!- mliu (purple): has joined #vdsm 06:50 -!- mliu: has left #vdsm [] 06:56 -!- lhornyak1: has quit [Quit: Leaving.] 07:35 -!- bala (purple): has joined #vdsm 07:40 -!- abaron (Ayal Baron): has joined #vdsm 08:04 -!- itamarh (purple): has joined #vdsm 08:06 -!- ybronhei1 (purple): has joined #vdsm 08:10 -!- ybronhei: has quit [Ping timeout: 248 seconds] 08:14 -!- sming_ (New Now Know How): has joined #vdsm 08:15 -!- sming: has quit [Read error: Connection reset by peer] 08:20 -!- sming_: has quit [Ping timeout: 276 seconds] 08:22 -!- sming (New Now Know How): has joined #vdsm 08:26 -!- odedr (purple): has joined #vdsm 08:35 -!- lhornyak (purple): has joined #vdsm 08:37 -!- ilvovsky (Unknown): has joined #vdsm 08:40 -!- abaron: has quit [Ping timeout: 248 seconds] 08:47 -!- mliu (purple): has joined #vdsm 08:54 -!- mliu: has left #vdsm [] 08:55 -!- ybronhei (purple): has joined #vdsm 08:57 -!- ybronhei1: has quit [Ping timeout: 276 seconds] 08:59 -!- sming_ (New Now Know How): has joined #vdsm 09:01 -!- sming: has quit [Ping timeout: 255 seconds] 09:01 -!- sming_ is now known as sming 09:07 -!- ybronhei1 (purple): has joined #vdsm 09:09 -!- ybronhei: has quit [Ping timeout: 248 seconds] 09:13 -!- ybronhei1: has quit [Quit: Leaving.] 09:16 -!- gargya (gargya): has joined #vdsm 09:27 -!- apuimedo (Antoni Segura Puimedon): has joined #vdsm 09:35 -!- jlibosva (purple): has joined #vdsm 09:57 -!- ykaplan (Yeela Kaplan): has joined #vdsm 09:58 -!- dyasny (Dan Yasny): has joined #vdsm 09:59 -!- markw_: has quit [Remote host closed the connection] 10:02 -!- ybronhei (purple): has joined #vdsm 10:04 -!- abonas (purple): has joined #vdsm 10:09 -!- mbetak (purple): has joined #vdsm 10:14 -!- sming: has quit [Ping timeout: 248 seconds] 10:24 -!- zhshzhou: has quit [Quit: Leaving.] 10:26 -!- gargya: has quit [Quit: ChatZilla 0.9.89 [Firefox 10.0.12/20130103094221]] 10:37 -!- ykaplan: has quit [Ping timeout: 252 seconds] 10:42 -!- aledvink (Unknown): has joined #vdsm 10:52 -!- ykaplan (Yeela Kaplan): has joined #vdsm 11:24 -!- shaohef: has quit [Ping timeout: 255 seconds] 11:37 -!- danken (purple): has joined #vdsm 11:37 -!- mode/#vdsm: by ChanServ 12:03 -!- ykaplan: has quit [Ping timeout: 252 seconds] 12:30 -!- abaron (Ayal Baron): has joined #vdsm 12:36 -!- granha_bola (Fernando Granha Jernimo): has joined #vdsm 12:56 -!- ykaplan (Yeela Kaplan): has joined #vdsm 13:08 -!- AlbertoSilva (AlbertoSilva): has joined #vdsm 13:10 -!- gargya (gargya): has joined #vdsm 13:10 -!- shaohef (shaohef): has joined #vdsm 13:28 -!- abonas1 (purple): has joined #vdsm 13:29 -!- acathrow (Aic): has joined #vdsm 13:30 -!- abonas: has quit [Ping timeout: 264 seconds] 13:40 -!- lvroyce (lvroyce): has joined #vdsm 13:46 < shaohef> evilissimo: can you review this patch? http://gerrit.ovirt.org/#/c/7329/ 13:46 < shaohef> apuimedo: can you review this patch? http://gerrit.ovirt.org/#/c/7329/ 13:47 < apuimedo> shaohef, I'm having some issues with the VM I use to test builds, but hopefully later today I will be able to 13:47 < shaohef> apuimedo: that's OK. thank you. 13:48 < apuimedo> shaohef, you're welcome ;-) 13:48 < shaohef> apuimedo: ;-) 13:49 -!- mliu (purple): has joined #vdsm 13:56 -!- bala: has quit [Ping timeout: 240 seconds] 13:56 -!- markwu (Mark Wu): has joined #vdsm 13:56 -!- markwu is now known as Guest21030 13:59 -!- Guest21030: has quit [Client Quit] 13:59 -!- sming (New Now Know How): has joined #vdsm 14:06 -!- mliu: has left #vdsm [] 14:07 -!- mliu (purple): has joined #vdsm 14:10 -!- TonyJames (Tony): has joined #vdsm 14:14 -!- mliu: has quit [Quit: Leaving.] 14:14 -!- mliu (purple): has joined #vdsm 14:14 -!- abonas1: has quit [Ping timeout: 246 seconds] 14:48 -!- acathrow: has left #vdsm [] 15:00 -!- acathrow (Aic): has joined #vdsm 15:06 -!- danken: has quit [Quit: Leaving.] 15:10 -!- mliu: has left #vdsm [] 15:15 -!- abonas (purple): has joined #vdsm 15:22 -!- odedr: has quit [Ping timeout: 256 seconds] 15:29 -!- aliguori (Anthony Liguori): has joined #vdsm 15:50 -!- markwu (Mark Wu): has joined #vdsm 15:50 -!- markwu is now known as Guest13296 15:57 -!- Guest13296: has quit [Quit: Leaving] 15:57 -!- markw_ (Mark Wu): has joined #vdsm 16:06 -!- aledvink: has quit [Ping timeout: 252 seconds] 16:15 -!- lvroyce: has quit [Quit: Leaving] 16:28 -!- osier: has quit [Read error: Connection reset by peer] 16:32 -!- jbrooks (Jason Brooks): has joined #vdsm 16:32 -!- ybronhei: has quit [Ping timeout: 256 seconds] 16:36 -!- markw_: has quit [Quit: Leaving] 16:40 -!- abonas: has quit [Ping timeout: 256 seconds] 16:54 -!- aledvink (Unknown): has joined #vdsm 16:58 -!- shaohef: has quit [Quit: Leaving.] 17:01 -!- jlibosva: has quit [Ping timeout: 245 seconds] 17:11 -!- jlibosva (purple): has joined #vdsm 17:13 -!- sming: has quit [Ping timeout: 255 seconds] 17:13 -!- ilvovsky: has quit [Ping timeout: 248 seconds] 17:16 -!- jlibosva: has quit [Quit: Leaving.] 17:23 -!- jlibosva (purple): has joined #vdsm 17:30 -!- lhornyak: has quit [Ping timeout: 245 seconds] 17:37 -!- TonyJames: has left #vdsm [] 17:49 -!- lhornyak (purple): has joined #vdsm 18:10 -!- mbetak: has quit [Ping timeout: 252 seconds] 18:11 -!- mbetak (purple): has joined #vdsm 18:13 -!- abaron: has quit [Ping timeout: 240 seconds] 18:15 -!- jbrooks: has quit [Remote host closed the connection] 18:15 -!- mbetak: has quit [Ping timeout: 252 seconds] 18:20 -!- jlibosva: has quit [Quit: Leaving.] 18:20 -!- lhornyak: has quit [Quit: Leaving.] 18:24 -!- jbrooks (Jason Brooks): has joined #vdsm 18:24 -!- jlibosva (purple): has joined #vdsm 18:24 -!- portante: has quit [Read error: Connection reset by peer] 18:27 -!- odedr (purple): has joined #vdsm 18:34 -!- jlibosva: has quit [Quit: Leaving.] 18:52 -!- portante (Peter Portante): has joined #vdsm 18:59 -!- ykaplan: has quit [Remote host closed the connection] 19:03 -!- gargya: has quit [Ping timeout: 256 seconds] 19:14 -!- acathrow (Aic): has joined #vdsm 19:16 -!- itamarh: has quit [Ping timeout: 256 seconds] 20:37 < aglitke> saggi: ping 20:41 -!- itamarh (purple): has joined #vdsm 20:46 < saggi> aglitke: ong 20:47 < aglitke> saggi: http://fpaste.org/mbIc/ 20:47 < aglitke> How is that for a calling convention in the python bindings? 20:47 < aglitke> specifically, Host.ping(client) 20:47 < aglitke> So Host is a class with only static methods 20:48 < saggi> Why? 20:48 < aglitke> every method takes a connected client as its first argument 20:48 < aglitke> Why what? 20:50 < saggi> Why isn't it part of a host instance? 20:51 -!- gargya (gargya): has joined #vdsm 20:51 < aglitke> Because we had a whole thread about not using instances for command classes. 20:52 < aglitke> What would be the point? What would the instance hold? 20:53 < saggi> Instances for a VDSM host is fine 20:53 < aglitke> The 'Host' part is really for namespacing only. 20:53 < saggi> a transport 20:53 < saggi> Hmmm 20:53 < aglitke> Well I don't want to make Host an instance and Volume not an instance. 20:54 < saggi> aglitke: I'll try and have code sample to show what I mean. 20:54 < aglitke> So all commands are simply called like Volume.copy(client) 20:59 < saggi> aglitke: fpaste doesn't seem to like me 21:00 < saggi> aglitke: https://gist.github.com/d6ad892520e43d3673b1 21:00 -!- granha_bola: has quit [Quit: Leaving] 21:01 < saggi> aglitke: You don't need to have async requests on the 1st version. I'm still working on getting the reactor working for client side too. I've been distracted by many things. 21:02 < aglitke> so what should the Host.ping function be returning? A json representation of the request? 21:02 < saggi> a JsonRpcRequest object from the jsonrpc package. I already have patches making them more independent in gerrit. 21:03 < aglitke> hmm. I think I have a patch too 21:03 < aglitke> you maintain far too deep of a patch queue :) 21:04 < saggi> aglitke: The problem is that a patch iteration takes a whole day because of time differences 21:04 < saggi> So I keep on coding during the day 21:05 < saggi> And then danken says something like I forgot a comma somewhere 21:05 < saggi> so that takes a second to fix 21:05 < aglitke> http://fpaste.org/NUdz/ 21:05 < saggi> aglitke: I am not good enough to know what's going on there 21:06 -!- gargya: has quit [Ping timeout: 244 seconds] 21:07 < saggi> aglitke: This is what I did, http://gerrit.ovirt.org/#/c/10375/6/vdsm_api/jsonrpc/__init__.py 21:07 < saggi> I am working on getting the client side code tied up 21:08 < saggi> But this can be used with the current json-rpc clients having them use the encode\decode verbs instead of implementing their own 21:09 < aglitke> I basically moved the client classes in the JsonRpcTests into jsonrpc.client and factored out some of the test code into a JsonRpcUtils.py 21:10 < saggi> Can you send it to gerrit as: so I don't have to mentally apply the patch? 21:10 < aglitke> I will upload it to gerrit 21:11 < saggi> Thanks 21:12 < aglitke> saggi: http://gerrit.ovirt.org/11122 21:14 < saggi> aglitke: This is excellent except the fact that I hope danken will push my stack first so I don't have to reabase on top of that. 21:14 < aglitke> this allows me to write python client bindings tests in a separate file and reuse all of the server creation utilities. 21:14 < saggi> The thing that changes with my patch is that send() should get a request object instead of (id, method, params) 21:15 < saggi> You can leave everything synchronous for now 21:15 < aglitke> Yeah, and I am in a bind because I don't want to always be behind your patches. It's hard to make any progress that way. 21:16 < saggi> I just need to somehow get Danken to do whatever I say. 21:16 < saggi> A gypsy curse or something 21:17 < aglitke> Just make the code so good that he can't say no :) 21:17 < aglitke> I guess it would help if we had maintainers here in the US so we had 24 hour coverage. 21:17 < saggi> They took away my maintainer powers 21:17 < aglitke> Maybe we can just send danken some 5-hour energy and he can reduce his sleep by 5 hours per night. 21:18 < saggi> aglitke: I also think it's something personal against me as I see him push crap all the time. 21:18 < saggi> That I have to rewrite and then it gets stuck in limbo 21:18 < aglitke> I must admit a lot of your python code is a bit baroque :) 21:19 < aglitke> Hard to understand on the first review. 21:19 < aglitke> You liberally use many of the advanced features of python. 21:20 < saggi> aglitke: As long as I keep people on their toes 21:21 < saggi> aglitke: I don't understand how the original got pushed in and my rewrite is still in limbo ( http://gerrit.ovirt.org/#/c/10628/ ) 21:21 < aglitke> Anyway. I like your gist 21:23 < saggi> aglitke: cool. So from now on it's a competition to see who gets their code pushed first to see who rebases on top of whom. 21:23 < aglitke> yep :) 21:24 < saggi> I wonder what kind of flowers danken likes .... 21:24 * aglitke is thinking beer 21:24 < saggi> damn it! 21:26 < saggi> aglitke: If we are already talking 21:26 < saggi> what about my suggestion about adding "Changed" to the schema 21:27 < saggi> and how are we going to solve the enum issue 21:27 < aglitke> Can you remind me what problem any of this this solves? 21:27 < saggi> aglitke: How to express in the documentation the evolution of a func\struct\enum 21:28 < saggi> So that users know how future changes might effect their program or how to handle old clients 21:28 < saggi> I think the detailed "Changed" field is better because, as I shown on my email, can give a lot more information and not just field names. 21:28 < aglitke> Future changes should never effect an old program 21:28 < saggi> That is what I was saying 21:29 < saggi> but take the sample you used 21:29 < aglitke> You can always add extra fields as long as they are optional 21:29 < saggi> sentient adds a new field to an enum 21:29 < saggi> which is problematic 21:29 < saggi> I suggested solving similar to log levels 21:29 < saggi> or HTTP errors 21:29 < saggi> where certain ranges can mean things so you can add granularity later 21:30 < saggi> and you if you think you might need a new class totally, you need to reserve a range and define what a client should do if it gets that in the response 21:30 < saggi> because we need to support old clients with new VDSM and the other way around 21:31 < saggi> aglitke: If you haven't read my email yet thats OK. We can talk about it later 21:31 < aglitke> Ok, so for errors we can have a 'class', 'code', and 'message' 21:31 < saggi> hmmm 21:32 < saggi> The problem is that we break json-rpc 21:32 < aglitke> But for enums, It seems ok to allow version specific documentation in the comment section 21:32 < saggi> This is why I suggested having ranges instead 21:32 < aglitke> ahh, right. I see. 21:32 < saggi> It also works for enums 21:32 < saggi> this is what HTTP does 5XX server side 3XX OK etc 21:32 < aglitke> I don't like the idea of having reserved ranges for enums 21:33 < saggi> Well, how will you solve you example then? 21:33 < aglitke> But do you really think we can properly anticipate all of the range types we'll need? 21:33 < saggi> You can't just add a value old clients are going to not expect 21:33 < saggi> For what, errors? 21:33 < aglitke> yes. 21:34 < aglitke> hmm. How does libvirt solve this for enums? 21:34 < saggi> Well, I think going over man errno might be a good place to start 21:35 < saggi> To see what error classes exist 21:36 < saggi> and then use XXYYYY instead of HTTPs XYY giving us sufficient leg room 21:36 < saggi> We can also look at all the existing VDSM errors 21:36 < aglitke> ok. 21:36 < aglitke> How would you fix the enum problem> 21:36 < aglitke> Any idea there? 21:36 < saggi> I think by looking at HTTP errno and VDSM we could get a pretty good range of errors to catalog 21:37 < saggi> My idea was making solution case specific 21:37 < saggi> meaning that things like "cardinal direction" can be just constants 21:37 < aglitke> How about always having an x.UNKNOWN item 21:37 < saggi> Something like you example could be positive = on negative = off 0 = unknown 21:37 < aglitke> and when a client can't match it, it sets it to unknown. 21:38 < saggi> you can later add new substates that are specific ranges > 100 21:38 < aglitke> Then the program needs to decide how it wants to handle the unknown value cases. 21:38 < saggi> No, because for the example case. You would want to let the client know it is actually on, just another kind of on. 21:39 < saggi> aglitke: https://gist.github.com/87486ba6c6099b497528 21:39 < aglitke> I bet if I thought hard though I could break your assumption of (positive = on negative = off 0 = unknown) with some sort of weird new state. 21:40 < aglitke> No, won't work. You are still not future proof. 21:40 < saggi> Well, this is why I think any enum needs to have it's own shtick. 21:40 < aglitke> I think a general purpose solution is to always have an UNKNOWN value in every enum 21:41 < saggi> If necessary. We also need to be aware that enums that are returned might be a bad idea and we need to use something else whenever possible. 21:41 < saggi> Enums that are passed to VDSM are fine, they can keep evolve 21:41 < saggi> it's only return values that are the problem 21:41 < aglitke> SO far my enums are just: 21:41 < aglitke> class MyEnum(object): 21:41 < aglitke> VAL1 = 'val1' 21:42 < aglitke> ... 21:42 < saggi> It think it's more of a documentation problem then a code problem 21:42 < aglitke> Most of the time, returned enum values would just be displayed. 21:42 < saggi> and maybe we need to go over enums that are returned by VDSM and see if we the might change and if so how we solve it. 21:43 < aglitke> Yeah. 21:43 < aglitke> We should try to make these as complete as possible from the beginning. 21:43 < saggi> I think every returned enum should have a piece of doc suggesting how to future proof it. 21:43 < saggi> It's an empty effort, you can never do that. 21:44 < saggi> As I said, stuff like "CardinalDirections" don't need future proofing 21:45 < saggi> and stuff like OS could just say "In the future there might be new entries added to the list so it's recommended to display the string as is in case of an unexpected value. 21:46 < aglitke> ok. So... I would support a Changes: tag in the comments so long as someone writes the logic in process-schema.py to handle it properly. 21:46 < saggi> obviously 21:46 < saggi> evilissimo: ^^^^ 21:46 < aglitke> :) That's why I am glad there is a test for schema processing in there now. 21:51 < aglitke> saggi: hmm, back to: https://gist.github.com/d6ad892520e43d3673b1 21:51 < saggi> aglitke: ok 21:51 < aglitke> I need to be able to convert a result into a native python representaion 21:52 < saggi> You have all the information about the call 21:52 -!- abaron (Ayal Baron): has joined #vdsm 21:53 < aglitke> So I guess I need to write a generic function get_result(res) 21:53 < aglitke> ? 21:53 < saggi> Not really 21:53 < saggi> why? 21:53 < saggi> you get the same data 21:53 < saggi> you just pass it around differently 21:54 < aglitke> The main thing I want to do is instantiate python classes for the 'type' types in the schema 21:54 < aglitke> eg. 21:54 < saggi> Why do they need to have correct type 21:55 < aglitke> In code I want to make a VmDefinition, I would call: VmDefinition(... args ...) to construct one 21:55 < aglitke> Then I can ensure it has all of the correct fields and properly typed. 21:55 < aglitke> When a function returns a dict that is actually a VmDefinition, I want to give the user that object back. 21:56 < saggi> aglitke: http://docs.python.org/2/library/json.html#json.JSONEncoder 21:56 < saggi> is that what you are looking for? 21:57 < saggi> That way you can just serialize the python object when it is given as an arg 21:57 < aglitke> maybe 21:57 < aglitke> is that recursive 21:57 < aglitke> ? 21:57 < aglitke> we have objects that contain objects 21:58 < aglitke> I guess I'd need to write the default() function for each type. 21:58 < saggi> aglitke: I honestly never used it 21:58 < saggi> It could be autogenerated 21:58 < saggi> can;t it? 21:58 < saggi> from the schema? 21:58 < aglitke> yes! of course 21:58 < saggi> It could even be dynamic 21:58 < aglitke> I've already got some code that is doing that 21:58 < saggi> because it's python 21:58 < aglitke> It is partially dynamic 21:59 < saggi> aglitke: http://docs.python.org/2/library/types.html 21:59 < aglitke> But if I use your gist approach, I will need a place to convert the json response into a python result 21:59 < saggi> You can use this to create new types on the fly 21:59 < saggi> Client.Call 22:00 < saggi> ? 22:01 < saggi> aglitke: again, don't worry about call_async or batch requests ATM 22:02 < aglitke> client is a JsonRpcClient 22:02 < aglitke> it cannot have python-specific functionality in it. 22:03 < saggi> Then make VDSM client that contains a JsonRpcClient 22:03 < aglitke> right, got it/ 22:03 < saggi> Don't inherit though, a faerie looses it's wings every-time someone uses inheritance 22:05 -!- abaron: has quit [Ping timeout: 264 seconds] 22:07 -!- odedr: has quit [Ping timeout: 255 seconds] 22:41 -!- acathrow: has left #vdsm [] 22:52 -!- itamarh: has quit [Ping timeout: 248 seconds] 22:53 -!- lhornyak (purple): has joined #vdsm --- Log closed do jan 17 00:00:30 2013