*** jruano has joined #senlin | 00:00 | |
xuhaiwei | jruano, hi | 00:02 |
---|---|---|
jruano | hey how are you | 00:03 |
xuhaiwei | fine | 00:03 |
xuhaiwei | still there, it is late in your place? | 00:03 |
xuhaiwei | about your patch https://review.openstack.org/#/c/205845/3/senlin/tests/profiles/test_nova_server.py | 00:04 |
xuhaiwei | line 134, it worked in my environment if you just set side_effect=Exception() | 00:05 |
jruano | let me check it again | 00:09 |
jruano | ah, i usually work late here | 00:09 |
jruano | i think that was the one where pep8 checks complain, but let me verify | 00:11 |
xuhaiwei | ok | 00:12 |
xuhaiwei | I think we should not import .ProfileOperationTimeout exception here | 00:13 |
jruano | ok... np. the patch 2 checks the general exception case, but when i ran pep8 checks it complained about being too general | 00:14 |
xuhaiwei | oh, jruano, yes, I got the error | 00:15 |
jruano | so i tried to be more specific so it would pass pep8 | 00:15 |
jruano | it throws a ProfileOperationTimeout in the nova_v2 driver for server_delete | 00:17 |
jruano | and HTTPException, but no common base :( | 00:18 |
jruano | other than Exception | 00:18 |
xuhaiwei | mock twice, test both ProfileOperationTimeout and HTTPException? | 00:19 |
xuhaiwei | not sure about this | 00:19 |
jruano | ha, yeah thats what i was thinking too | 00:19 |
jruano | i know there is some work to clean up exceptions, not sure if this will be related? possibly short term is to test both exceptions | 00:20 |
xuhaiwei | this should be covered I think | 00:21 |
jruano | cool, yeah i think best approach now is to cover both exceptions. ill make the changes shortly | 00:21 |
xuhaiwei | ok, thanks | 00:22 |
xuhaiwei | I think it's better to do them in seperated test cases | 00:23 |
xuhaiwei | in fact, HttpException is also a headache | 00:25 |
*** Qiming has joined #senlin | 00:25 | |
xuhaiwei | Qiming, just come in time | 00:25 |
xuhaiwei | can you review patches? | 00:26 |
Qiming | yes, any problem? | 00:30 |
xuhaiwei | this patch https://review.openstack.org/#/c/205845/3/senlin/tests/profiles/test_nova_server.py | 00:31 |
xuhaiwei | when testing line 214 https://github.com/stackforge/senlin/blob/master/senlin/profiles/os/nova/server.py#L214 | 00:32 |
xuhaiwei | pep8 will complains " H202 assertRaises Exception too broad", if you just do self.assertRaises(Exception, delete_server, xx) | 00:33 |
xuhaiwei | so the exception should be specific | 00:34 |
Qiming | yes, agree | 00:34 |
Qiming | need to revise the profile anyway, right? | 00:34 |
xuhaiwei | there are two kind of exceptions happens in the drive side | 00:34 |
xuhaiwei | exception.ProfileOperationTimeout and sdk.exc.HttpException | 00:36 |
Qiming | based on the current code, you are right | 00:37 |
xuhaiwei | but in fact sdk is not raising HttpException directly, they are raising exceptions.ResourceNotFound | 00:37 |
Qiming | the problem it was changed to a generic Exception catch is that there are other subtle cases | 00:37 |
jruano | ah, i see... these 2 are just the known ones from the driver? | 00:38 |
jruano | there could be others | 00:39 |
Qiming | right, there could be others | 00:39 |
Qiming | one of them is actually caused by authentication error | 00:40 |
Qiming | when creating the connection to nova, the authentication may fail | 00:40 |
openstackgerrit | Qiming Teng proposed stackforge/senlin: Unit test cases for nova driver https://review.openstack.org/207353 | 00:42 |
Qiming | also refer to the patch here ^ | 00:42 |
Qiming | this file: https://review.openstack.org/#/c/207353/3/senlin/drivers/openstack/nova_v2.py | 00:42 |
Qiming | I'm trying to sort out these messy exception handling things | 00:43 |
Qiming | it is an attempt to centralize all kinds of driver (sdk) exception handling | 00:44 |
jruano | ah ok yes, that is what i was thinking | 00:44 |
jruano | this is much cleaner | 00:44 |
xuhaiwei | the translate_exception method? | 00:45 |
jruano | can i just hold off on testing the exception path in this unit test case until the exception cleanup settles? | 00:45 |
Qiming | yes, decorate all interactions with sdks with a translate_exception method | 00:45 |
jruano | i can just add a todo for now to follow-up | 00:45 |
Qiming | jruano, it would be a separation of concern | 00:45 |
Qiming | the test of the 'translate_exception' method would be part of the test case for sdk.py | 00:46 |
jruano | ah ok, right | 00:46 |
Qiming | as for the specific exception types we need to handle ... we leave it to the functional tests | 00:47 |
jruano | so i am going to remove checking the exception in the unit test. i should probably do the same for the ResourceNotFound path i added as well | 00:47 |
Qiming | we cannot predict what kind of exceptions sdk will throw, what kind of exceptions will escape | 00:47 |
jruano | yep | 00:47 |
Qiming | jruano, I agree | 00:48 |
Qiming | hold on | 00:48 |
Qiming | are you referring to the nova server profile test case? | 00:48 |
jruano | yes | 00:48 |
Qiming | okay, I'd suggest we keep it that way | 00:49 |
Qiming | the test case is supposed to test the code as is | 00:49 |
Qiming | we will revise the test case when we are revising the profile | 00:50 |
jruano | gotcha... so the approach was to test both known exceptions HTTPException and ProfileOperationTimeout | 00:50 |
Qiming | ya | 00:51 |
Qiming | we have some more work to do regarding the connection creation | 00:52 |
jruano | ok, i think that works for now | 00:52 |
Qiming | that is why we are doing a broad exception catch in the server profile code, need to improve that | 00:52 |
jruano | ill revisit as the code changes | 00:52 |
Qiming | okay, thanks | 00:52 |
jruano | yep | 00:53 |
*** Yanyanhu has joined #senlin | 00:58 | |
*** Chris-IBM has joined #senlin | 01:00 | |
*** Yanyanhu has quit IRC | 01:02 | |
*** Yanyanhu has joined #senlin | 01:11 | |
*** Chris-IBM has quit IRC | 01:13 | |
*** Tiancheng has joined #senlin | 01:27 | |
*** Chris-IBM has joined #senlin | 01:31 | |
*** Qiming has quit IRC | 01:31 | |
*** Qiming_ has joined #senlin | 01:31 | |
*** Chris-IBM has quit IRC | 01:31 | |
*** Tiancheng has quit IRC | 01:31 | |
*** Yanyanhu has quit IRC | 01:31 | |
*** Tiancheng has joined #senlin | 01:32 | |
*** Yanyanhu has joined #senlin | 01:33 | |
*** Zhenqi has joined #senlin | 01:39 | |
Yanyanhu | hi, Qiming_ , just registered a bp for adding functional test. Will start working on it. https://blueprints.launchpad.net/senlin/+spec/functional-test-startpoint | 01:40 |
Yanyanhu | thanks | 01:40 |
Qiming_ | functional tests is a big effort | 01:42 |
Qiming_ | just noticed that a bug is filed as well? | 01:42 |
Yanyanhu | ok, let me have a check | 01:42 |
Yanyanhu | yes, I reported the bug yesterday. Should I will close this bug since I think bp is more proper for this job? | 01:43 |
*** mathspanda has joined #senlin | 01:46 | |
*** Qiming_ has quit IRC | 01:55 | |
*** Qiming has joined #senlin | 02:05 | |
*** mathspanda has quit IRC | 02:17 | |
*** mathspanda has joined #senlin | 02:18 | |
openstackgerrit | Qiming Teng proposed stackforge/senlin: Unit test cases for nova driver https://review.openstack.org/207353 | 02:29 |
*** openstackgerrit has quit IRC | 02:31 | |
*** openstackgerrit has joined #senlin | 02:32 | |
*** LinPeiyu has joined #senlin | 02:33 | |
*** LinPeiyu is now known as ChrisSen | 02:33 | |
*** ChrisSen has quit IRC | 02:34 | |
*** ChrisSen has joined #senlin | 02:35 | |
*** mathspanda has quit IRC | 02:52 | |
*** mathspanda has joined #senlin | 02:58 | |
*** ChrisSen has quit IRC | 03:04 | |
*** ChrisSen has joined #senlin | 03:06 | |
*** mathspanda has quit IRC | 03:19 | |
*** mathspanda has joined #senlin | 03:20 | |
*** Tiancheng has quit IRC | 03:23 | |
*** Tiancheng has joined #senlin | 03:23 | |
*** Tiancheng_ has joined #senlin | 03:58 | |
*** Yanyanhu has quit IRC | 03:58 | |
*** Tiancheng has quit IRC | 03:58 | |
*** Yanyanhu has joined #senlin | 03:59 | |
*** mathspanda has quit IRC | 04:12 | |
xuhaiwei | Qiming, are you around? | 04:37 |
*** Tennyson has joined #senlin | 04:42 | |
*** Zhenqi has quit IRC | 04:58 | |
*** mathspanda has joined #senlin | 05:04 | |
*** Zhenqi has joined #senlin | 05:04 | |
*** Tennyson has quit IRC | 05:22 | |
*** Tennyson has joined #senlin | 05:25 | |
*** jruano has quit IRC | 05:29 | |
Qiming | xuhaiwei, yes, just back | 05:35 |
xuhaiwei | let me check the source, a little more, I just fix one place, but another error happens | 05:36 |
xuhaiwei | Qiming, I just converted the HTTPAccepted response to JSON format, but it still not sufficent, SDK still want it to have a resource_key like 'cluster', 'node' in the body | 05:44 |
xuhaiwei | because sdk treats the resp as an error | 05:44 |
Qiming | ... | 05:45 |
Qiming | how are other exceptions handled? | 05:45 |
Qiming | e.g. 401 | 05:45 |
xuhaiwei | not checked yet | 05:46 |
xuhaiwei | I am afraid the exceptions which are not webob.exc.HTTPError type face the same problem | 05:50 |
xuhaiwei | this is sdk's fault I think | 05:51 |
Qiming | it is because they are not handling 202? | 05:52 |
Qiming | but if they are basing their transport on 'requests', how could that happen? | 05:52 |
xuhaiwei | https://github.com/stackforge/python-openstacksdk/blob/master/openstack/resource.py#L749 | 05:53 |
xuhaiwei | see this line | 05:53 |
*** Tennyson has quit IRC | 05:53 | |
xuhaiwei | in 202's case , resp = resp[cls.resource_key] will fail, because resp doesn't have the resource_key | 05:54 |
*** Tennyson has joined #senlin | 05:56 | |
openstackgerrit | xu-haiwei proposed stackforge/senlin: Make HTTPAccepted exception response in JSON format https://review.openstack.org/207730 | 06:01 |
xuhaiwei | will go out now, bye | 06:01 |
openstackgerrit | Merged stackforge/senlin: Fix cluster-resize operation param checking in server side https://review.openstack.org/207325 | 06:11 |
openstackgerrit | Qiming Teng proposed stackforge/senlin: DB support for triggers https://review.openstack.org/207733 | 06:19 |
*** Tennyson has quit IRC | 06:19 | |
*** Tennyson has joined #senlin | 06:20 | |
openstackgerrit | Qiming Teng proposed stackforge/senlin: DB support for triggers https://review.openstack.org/207733 | 06:24 |
*** Zhenqi has quit IRC | 06:35 | |
*** jqiu has joined #senlin | 06:41 | |
*** Tennyson has quit IRC | 06:48 | |
*** Tennyson has joined #senlin | 06:48 | |
*** Zhenqi has joined #senlin | 07:10 | |
*** Tennyson has quit IRC | 07:16 | |
*** Tennyson has joined #senlin | 07:16 | |
*** Zhenqi has quit IRC | 07:40 | |
*** mathspanda has quit IRC | 07:41 | |
*** Tennyson has quit IRC | 07:41 | |
Yanyanhu | hi, Qiming, about running functional test in gate side, I think before we have a senlinclient release and add it to test-requirement, we can only prepare the client manually? e.g. git clone from git.openstack.org and pip install | 08:04 |
Yanyanhu | wrap this progress into the script of env_prepare | 08:05 |
Qiming | don't think we need senlinclient for functional tests | 08:05 |
Yanyanhu | em, so how we sen request to senlin service | 08:06 |
Yanyanhu | send | 08:06 |
Qiming | program the REST API I think | 08:06 |
Yanyanhu | that could make the progress very complext I think | 08:06 |
Qiming | no server functional tests is supposed to use the client package | 08:06 |
Yanyanhu | especially when we need to handle spec file | 08:07 |
Qiming | okay, Heat is a virus | 08:09 |
Yanyanhu | for other cases, I think API is ok | 08:09 |
Qiming | we don't test that part | 08:09 |
Yanyanhu | :) nova use API request | 08:09 |
Qiming | it is not our job | 08:09 |
Qiming | it makes just no sense to have a server integration test require a client package | 08:10 |
Qiming | Heat is sick in this space | 08:10 |
Qiming | it is relying on quite some logic at client side to do 'get_file' function parsing | 08:10 |
Yanyanhu | ok, let me think through this | 08:10 |
Qiming | Heat is not using SDK, so it is interacting all other services with xxxclient | 08:12 |
Yanyanhu | yes | 08:12 |
Yanyanhu | but I think we also can't rely on sdk since it only provides limited support for Senlin service | 08:13 |
Yanyanhu | I will try Rest API way | 08:13 |
Qiming | yes | 08:13 |
Qiming | Yanyanhu, what do you mean by 'FIXED_PRIORITY' in the TODO.rst file? | 08:18 |
Yanyanhu | oh, it means we place node into different regions with a fixed sequence, e.g. region1 first, when region1 has no free capacity, then region2 | 08:20 |
Qiming | that is a PRIORITY or WEIGHTED policy | 08:20 |
Qiming | there will by DYNAMIC_PRIORITY in your mind? | 08:21 |
Yanyanhu | hmm, yes, I was not sure whether I should use weighted when propose this | 08:21 |
Yanyanhu | yes | 08:21 |
Yanyanhu | I think dynamic_priority means the sequence could be changed based the current status of system | 08:22 |
Qiming | ok | 08:23 |
openstackgerrit | Qiming Teng proposed stackforge/senlin: Update TODO list https://review.openstack.org/207770 | 08:23 |
Yanyanhu | hi, Qiming, just saw the TODO patch, could you please help to add the functional test workitem and you can mark current worker is me | 08:27 |
Qiming | ok | 08:27 |
Yanyanhu | so I don't need to propose another one :) | 08:27 |
Yanyanhu | thanks | 08:27 |
openstackgerrit | Qiming Teng proposed stackforge/senlin: Update TODO list https://review.openstack.org/207770 | 08:28 |
Qiming | at your service | 08:28 |
Qiming | ^ | 08:28 |
Yanyanhu | ;) | 08:29 |
Qiming | gate is too slow | 08:29 |
Yanyanhu | yes... | 08:29 |
Qiming | have to switch from one topic to another | 08:29 |
Yanyanhu | a patch has been queued there for more than 6 hours | 08:29 |
Yanyanhu | another is about 5... | 08:30 |
Qiming | those ones are blocking me ... sigh | 08:30 |
Yanyanhu | ... | 08:31 |
Yanyanhu | hope it can recover soon | 08:31 |
Qiming | all branches are blocked: | 08:32 |
Qiming | ceilo-trigger | 08:32 |
Qiming | env-trigger | 08:32 |
Qiming | fix-policy-checking | 08:32 |
Qiming | * master | 08:32 |
Qiming | plugin-exception | 08:32 |
Qiming | scaling-policy | 08:32 |
Qiming | senlin-driver | 08:32 |
Qiming | test-ceilometer | 08:32 |
Qiming | test-nova-driver | 08:32 |
Qiming | trigger-db | 08:32 |
Qiming | trigger-samples | 08:32 |
Yanyanhu | I guess infra team are now very busy on this... | 08:33 |
Yanyanhu | not sure about the reason | 08:33 |
Yanyanhu | sigh | 08:33 |
*** Tiancheng_ has quit IRC | 09:27 | |
*** Tiancheng has joined #senlin | 09:28 | |
*** Tiancheng has quit IRC | 09:36 | |
openstackgerrit | Qiming Teng proposed stackforge/senlin: API docs for webhooks https://review.openstack.org/207803 | 09:50 |
Qiming | want to call it a day now | 09:57 |
Qiming | very tired | 09:57 |
Yanyanhu | em, take a break | 09:57 |
Yanyanhu | have a good weekend ;) | 09:57 |
Qiming | instead of Voice of America, we have Voice of China | 09:59 |
Qiming | haha | 09:59 |
Yanyanhu | :) | 09:59 |
Qiming | Yao has better stay at home, he is sooooooo different | 10:00 |
Qiming | http://slide.sports.sina.com.cn/o/slide_2_52129_85628.html#p=5 | 10:00 |
Yanyanhu | haha | 10:01 |
Yanyanhu | hope we can succeed | 10:01 |
Qiming | and .... | 10:01 |
Qiming | he is smiling!!!! | 10:01 |
Yanyanhu | he is really fat now, haha | 10:02 |
Qiming | there is no photos showing Yao standing next to our leaders, :) | 10:03 |
Qiming | that is a pity actually | 10:04 |
Yanyanhu | yes, maybe they are shy :) | 10:04 |
Qiming | no one will take such kind of a photo and publish it | 10:04 |
Yanyanhu | em | 10:05 |
Yanyanhu | will be blocked? | 10:05 |
Qiming | you just cannot find such a phtot | 10:05 |
Yanyanhu | ok | 10:06 |
Qiming | showing Yao shaking hands with any leaders | 10:06 |
Yanyanhu | em, that's true | 10:06 |
Qiming | leaving | 10:06 |
Qiming | bye guys | 10:06 |
Yanyanhu | see U next week | 10:07 |
*** Qiming has quit IRC | 10:11 | |
*** Yanyanhu has quit IRC | 10:19 | |
*** ChrisSen has quit IRC | 10:27 | |
*** Tiancheng has joined #senlin | 11:02 | |
*** Qiming has joined #senlin | 11:18 | |
*** Qiming has quit IRC | 11:24 | |
*** Qiming has joined #senlin | 11:25 | |
*** Tiancheng has quit IRC | 11:28 | |
*** jruano has joined #senlin | 14:21 | |
*** jruano has quit IRC | 15:37 | |
openstackgerrit | Qiming Teng proposed stackforge/senlin: Add config reload capability to wsgi https://review.openstack.org/207968 | 15:56 |
*** Qiming has quit IRC | 16:12 | |
*** Qiming has joined #senlin | 16:39 | |
*** Qiming has quit IRC | 16:39 | |
*** Qiming has joined #senlin | 16:40 | |
openstackgerrit | Merged stackforge/senlin: Make HTTPAccepted exception response in JSON format https://review.openstack.org/207730 | 16:44 |
openstackgerrit | Merged stackforge/senlin: Refactor plugin name checking logic https://review.openstack.org/207281 | 16:45 |
*** Qiming has quit IRC | 16:57 | |
*** jruano has joined #senlin | 18:46 | |
*** openstack has joined #senlin | 19:35 | |
*** jruano has quit IRC | 22:40 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!