luyao | zhenguo , liusheng , shaohe_feng : I can't pass all the tests by python3 because of different implementation of hasattr function. | 01:23 |
---|---|---|
luyao | In python 3, hasattr is implemented by calling getattr and seeing whether it raises an AttributeError or not. | 01:24 |
luyao | But in python2, seeing whether it raises an exception or not. | 01:24 |
luyao | In my patch, it will raise a NotImplementedError exception,and hasattr in python3 will not catch it | 01:29 |
luyao | zhenguo , liusheng , shaohe_feng, that's why I add a new hasattr function | 01:29 |
liusheng | luyao: so how about catching the NotImplementedError in your return_dict() method and skip the field, that may make things more clear ? | 01:36 |
liusheng | luyao: 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 error | 01:37 |
*** kevinz has joined #openstack-mogan | 01:38 | |
liusheng | luyao: additionally, not sure if this method: obj_attr_is_set(self, attrname) meet your needs ? | 01:40 |
liusheng | luyao: which implemented in the oslo.versionedobject base class | 01:41 |
luyao | liusheng, obj_attr_is_set calls hasattr and raise NotImplementedError | 01:47 |
liusheng | luyao: let me check more | 01:48 |
luyao | liusheng, it also will not catch NotImplementedError | 01:49 |
liusheng | luyao: where the NotImplementedError raised ? | 01:52 |
luyao | liusheng, getattr will raise it | 01:53 |
luyao | liusheng, hasattr will call getattr | 01:53 |
*** wanghao has joined #openstack-mogan | 02:10 | |
zhenguo | luyao: sorry for not getting time to look through the issue, just wonder how other projects handle this? seems it's not our single problem | 02:10 |
liusheng | luyao: 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 dict | 02:13 |
liusheng | zhenguo: the as_dict in moganbase class I don't fond the cressponding implemetation in Nova | 02:14 |
zhenguo | liusheng: maybe we copy that from Ironic :D, hah we copied from many projects | 02:16 |
liusheng | zhenguo: lol | 02:16 |
*** wanghao has quit IRC | 02:17 | |
luyao | zhenguo, I don't know whether this issue occured in other projects | 02:18 |
zhenguo | luyao: let me check to see | 02:19 |
luyao | liusheng, thank you for your comment, it sounds not bad, I will try | 02:21 |
luyao | zhenguo, thank you ,additionally, it just occured in testcases, it looks fine in real env . | 02:26 |
openstackgerrit | Zhenguo Niu proposed openstack/mogan master: Add support for injecting keypairs https://review.openstack.org/458479 | 05:25 |
*** kevinz has quit IRC | 05:38 | |
*** kevinz has joined #openstack-mogan | 06:13 | |
openstackgerrit | Zhenguo Niu proposed openstack/mogan master: Add support for injecting keypairs https://review.openstack.org/458479 | 06:30 |
liusheng | zhenguo: 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 |
zhenguo | liusheng: you mean the network_interface attribute can't be modified? | 07:03 |
zhenguo | liusheng: the node can't go to available state? | 07:04 |
liusheng | zhenguo: no, I add "--network-interface neutron" when creating nodes, in the output of node-show, the network_interface field is empty | 07:04 |
liusheng | zhenguo: yes | 07:04 |
zhenguo | liusheng: I remember there's an config option in etc/mogan/mogan.conf | 07:05 |
liusheng | zhenguo: mogan.conf ? | 07:05 |
zhenguo | liusheng: let me check | 07:06 |
openstackgerrit | Zhenguo Niu proposed openstack/python-moganclient master: Add support for injecting keypair https://review.openstack.org/458742 | 07:06 |
liusheng | zhenguo: thanks | 07:06 |
zhenguo | liusheng: aha, sorry, seems that's because you are usinga lower api version | 07:10 |
zhenguo | liusheng: ironic --ironic-api-version latest node-show node2 | 07:11 |
zhenguo | liusheng: it's already set to neutron, | 07:11 |
liusheng | zhenguo: hmm, I add the latest version, I don't it also need it in node-show.. | 07:12 |
liusheng | zhenguo: but the nodes still stuck in enroll state | 07:13 |
zhenguo | liusehng: you shoud look through the states machine | 07:16 |
zhenguo | liusheng: you can run 'ironic node-set-provision-state node2 manage' to make it go to managable state | 07:17 |
zhenguo | liusheng: which will verifying the required properties | 07:18 |
zhenguo | liusheng: and the run 'ironic ndoe-set-provision-state node2 provide' to make it go to cleaning state | 07:18 |
zhenguo | liusheng: which will erase the disks and do other clean steps | 07:18 |
zhenguo | liusheng: then it will goes to available state | 07:19 |
zhenguo | liusheng: not sure why now it make the new enrolled node to this state, need some verifying to become avaialble | 07:19 |
liusheng | zhenguo: hmm, it says clean failed :( | 07:19 |
zhenguo | liusheng: yes, seems still something wrong with provisiong/cleaning state | 07:20 |
liusheng | zhenguo: I just run node-delete and recreate the node, is it ok ? | 07:20 |
zhenguo | liusheng: yes | 07:20 |
* zhenguo brb | 07:21 | |
zhenguo | luyao: hi, are you around? | 07:42 |
zhenguo | luyao: wrt the fault attribute in instance object, how about just load it regardless of what status the instance in? | 07:43 |
zhenguo | luyao: I think we can load it to object always, but control to return with API, wdyt? | 07:43 |
*** wanghao has joined #openstack-mogan | 09:04 | |
luyao | zhenguo, I agree with you , it sounds good. :D | 09:16 |
*** litao has joined #openstack-mogan | 09:24 | |
zhenguo | luyao: we can check the error status on API side | 09:28 |
zhenguo | luyao: and instead of returning the None fault_info when it's not in error status, I would like to just remove the fault_info field | 09:29 |
luyao | zhenguo, ok ,I will try | 09:29 |
zhenguo | luyao: not sure if it's easy to handle, or maybe we can just return None :D | 09:29 |
*** wanghao has quit IRC | 09:55 | |
* zhenguo away | 10:05 | |
*** wanghao has joined #openstack-mogan | 10:06 | |
*** kevinz has quit IRC | 10:07 | |
*** wanghao has quit IRC | 10:40 | |
*** litao has quit IRC | 12:09 | |
*** wanghao has joined #openstack-mogan | 12:55 | |
*** wanghao has quit IRC | 13:46 | |
*** wanghao has joined #openstack-mogan | 16:10 | |
*** wanghao has quit IRC | 17:29 | |
-openstackstatus- NOTICE: Gerrit will be offline briefly starting at 20:00 for scheduled maintenance http://lists.openstack.org/pipermail/openstack-dev/2017-April/115702.html | 19:42 | |
-openstackstatus- NOTICE: Gerrit is offline briefly for scheduled maintenance http://lists.openstack.org/pipermail/openstack-dev/2017-April/115702.html | 20:03 | |
*** ChanServ changes topic to "Gerrit is offline briefly for scheduled maintenance http://lists.openstack.org/pipermail/openstack-dev/2017-April/115702.html" | 20:03 | |
*** ChanServ changes topic to "Bugs: bugs.launchpad.net/mogan | Review: https://review.openstack.org/#/q/project:openstack/mogan,n,z" | 20:36 | |
-openstackstatus- NOTICE: Gerrit is back in service and generally usable, though remote Git replicas (git.openstack.org and github.com) will be stale for the next few hours until online reindexing completes | 20:36 | |
*** openstackgerrit has quit IRC | 20:48 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!