Friday, 2017-04-21

luyao zhenguo , liusheng , shaohe_feng : I can't pass all the tests by python3 because of different implementation of hasattr function.01:23
luyaoIn python 3, hasattr is implemented by calling getattr and seeing whether it raises an AttributeError or not.01:24
luyaoBut in python2, seeing whether it raises an exception or not.01:24
luyaoIn my patch, it will raise a NotImplementedError exception,and hasattr in python3 will not catch it01:29
luyao zhenguo , liusheng , shaohe_feng, that's why I add a new hasattr function01:29
liushengluyao: so how about catching the NotImplementedError in your return_dict() method and skip the field, that may make things more clear ?01:36
liushengluyao: I just search in google, seems the change in py3 is a improvement than py2, the hasattr in py2 easy to shield the exception details that maybe unrelated with the attribute error01:37
*** kevinz has joined #openstack-mogan01:38
liushengluyao: additionally, not sure if this method: obj_attr_is_set(self, attrname) meet your needs ?01:40
liushengluyao: which implemented in the oslo.versionedobject base class01:41
luyaoliusheng,  obj_attr_is_set  calls hasattr and raise NotImplementedError01:47
liushengluyao: let me check more01:48
luyaoliusheng, it also will not catch NotImplementedError01:49
liushengluyao: where the NotImplementedError raised ?01:52
luyaoliusheng, getattr will raise it01:53
luyaoliusheng, hasattr will call getattr01:53
*** wanghao has joined #openstack-mogan02:10
zhenguoluyao: sorry for not getting time to look through the issue, just wonder how other projects handle this? seems it's not our single problem02:10
liushengluyao: hi, I see that, TBH, I think there is flaw in the implementation of oslo.versionedobject, and also, the as_dict in moganobject base is also not good. actually, there is no place invoked the as_dict method except your patch. I may suggest you don't use that method and we can remove the method definition, optionally, 1. you can use obj.obj_to_primitive() and extract the object fields dict. 2. you can use dict(obj.itmes()) to get the dict02:13
liushengzhenguo: the as_dict in moganbase class I don't fond the cressponding implemetation in Nova02:14
zhenguoliusheng: maybe we copy that from Ironic :D, hah we copied from many projects02:16
liushengzhenguo: lol02:16
*** wanghao has quit IRC02:17
luyaozhenguo, I don't know whether this issue occured in other projects02:18
zhenguoluyao: let me check to see02:19
luyaoliusheng, thank you for your comment, it sounds not bad, I will try02:21
luyaozhenguo, thank you ,additionally, it just occured in testcases, it looks fine in  real env .02:26
openstackgerritZhenguo Niu proposed openstack/mogan master: Add support for injecting keypairs
*** kevinz has quit IRC05:38
*** kevinz has joined #openstack-mogan06:13
openstackgerritZhenguo Niu proposed openstack/mogan master: Add support for injecting keypairs
liushengzhenguo: hi zhenguo, do you know why I cannot set the network_interface to the nodes when creating nodes and the nodes will stuck in "enroll" provisioning state ?07:02
zhenguoliusheng: you mean the network_interface attribute can't be modified?07:03
zhenguoliusheng: the node can't go to available state?07:04
liushengzhenguo: no, I add "--network-interface neutron" when creating nodes, in the output of node-show, the network_interface field is empty07:04
liushengzhenguo: yes07:04
zhenguoliusheng: I remember there's an config option in etc/mogan/mogan.conf07:05
liushengzhenguo: mogan.conf ?07:05
zhenguoliusheng: let me check07:06
openstackgerritZhenguo Niu proposed openstack/python-moganclient master: Add support for injecting keypair
liushengzhenguo: thanks07:06
zhenguoliusheng: aha, sorry, seems that's because you are usinga lower api version07:10
zhenguoliusheng:  ironic --ironic-api-version latest node-show node207:11
zhenguoliusheng: it's already set to neutron,07:11
liushengzhenguo: hmm, I add the latest version, I don't it also need it in node-show..07:12
liushengzhenguo: but the nodes still stuck in enroll state07:13
zhenguoliusehng: you shoud look through the states machine07:16
zhenguoliusheng: you can run 'ironic node-set-provision-state node2 manage' to make it go to managable state07:17
zhenguoliusheng: which will verifying the required properties07:18
zhenguoliusheng: and the run 'ironic ndoe-set-provision-state node2 provide' to make it go to cleaning state07:18
zhenguoliusheng: which will erase the disks and do other clean steps07:18
zhenguoliusheng: then it will goes to available state07:19
zhenguoliusheng: not sure why now it make the new enrolled node to this state, need some verifying to become avaialble07:19
liushengzhenguo: hmm, it says clean failed :(07:19
zhenguoliusheng: yes, seems still something wrong with provisiong/cleaning state07:20
liushengzhenguo: I just run node-delete and recreate the node, is it ok ?07:20
zhenguoliusheng: yes07:20
* zhenguo brb07:21
zhenguoluyao: hi, are you around?07:42
zhenguoluyao: wrt the fault attribute in instance object, how about just load it regardless of what status the instance in?07:43
zhenguoluyao: I think we can load it to object always, but control to return with API, wdyt?07:43
*** wanghao has joined #openstack-mogan09:04
luyaozhenguo, I agree with you , it sounds good. :D09:16
*** litao has joined #openstack-mogan09:24
zhenguoluyao: we can check the error status on API side09:28
zhenguoluyao: and instead of returning the None fault_info when it's not in error status, I would like to just remove the fault_info field09:29
luyaozhenguo, ok ,I will try09:29
zhenguoluyao: not sure if it's easy to handle, or maybe we can just return None :D09:29
*** wanghao has quit IRC09:55
* zhenguo away10:05
*** wanghao has joined #openstack-mogan10:06
*** kevinz has quit IRC10:07
*** wanghao has quit IRC10:40
*** litao has quit IRC12:09
*** wanghao has joined #openstack-mogan12:55
*** wanghao has quit IRC13:46
*** wanghao has joined #openstack-mogan16:10
*** wanghao has quit IRC17:29
-openstackstatus- NOTICE: Gerrit will be offline briefly starting at 20:00 for scheduled maintenance
-openstackstatus- NOTICE: Gerrit is offline briefly for scheduled maintenance
*** ChanServ changes topic to "Gerrit is offline briefly for scheduled maintenance"20:03
*** ChanServ changes topic to "Bugs: | Review:,n,z"20:36
-openstackstatus- NOTICE: Gerrit is back in service and generally usable, though remote Git replicas ( and will be stale for the next few hours until online reindexing completes20:36
*** openstackgerrit has quit IRC20:48

Generated by 2.14.0 by Marius Gedminas - find it at!