Tuesday, 2016-11-15

*** shaohe_feng has quit IRC01:26
*** lei-zh has joined #openstack-nimble01:34
*** yuntongjin has joined #openstack-nimble01:39
*** luyao has joined #openstack-nimble01:55
*** shaohe_feng has joined #openstack-nimble02:01
luyaozhenguo: hello,02:26
luyaozhenguo: a question.02:26
zhenguoluyao: hi02:26
luyaozhenguo: do we allow same name with different instance02:27
luyaozhenguo: I have check the ironic code.02:27
zhenguoluyao: currently not02:27
luyaozhenguo: ironic do not allow .02:27
luyaozhenguo: I'm writing the testcase02:27
zhenguoluyao: we also not allow02:27
luyaozhenguo: and find nimble allow02:28
zhenguoluyao: ....02:28
luyaozhenguo: let me show the case02:28
zhenguoluyao: ok, IIRC, I set the name column to pramary key02:28
luyaozhenguo:  http://paste.openstack.org/show/589205/02:29
luyaozhenguo: So do we need to fix our nimble code. or do we not need this duplicate_name test case?02:30
zhenguoluyao: let me check why, we should keep the duplicate name test case02:30
zhenguoluyao: it's weird02:30
*** luyao has quit IRC02:31
*** yuntongjin has quit IRC02:32
*** luyao has joined #openstack-nimble02:35
*** yuntongjin has joined #openstack-nimble02:37
zhenguoluyao: please take a look at https://github.com/openstack/nimble/blob/master/nimble/db/sqlalchemy/alembic/versions/91941bf1ebc9_initial_migration.py#L9002:51
*** kevin__ has joined #openstack-nimble02:59
luyaozhenguo: so we need fix the nimble code firstly?03:21
zhenguoluyao: I'm not sure why it doesn't work :(03:22
zhenguoluyao: but on my test in real env, if creating instance with duplicate name, it will raise an exception03:22
luyaozhenguo: OK,I will do code review and test again to find where the problem is..03:36
openstackgerritZhenguo Niu proposed openstack/nimble: Add name UniqueConstraint to instance table  https://review.openstack.org/39751503:41
zhenguoluyao: please test with this https://review.openstack.org/39751503:41
zhenguoluyao: seems I forgot to add this when modified the db, but it can work with mysql on real env.03:44
*** yuntongjin has quit IRC04:08
*** luyao has quit IRC04:08
*** luyao has joined #openstack-nimble04:13
*** luyao has quit IRC04:17
*** lei-zh has quit IRC04:30
openstackgerritZhong Luyao proposed openstack/nimble: Add instance dbapi test cases  https://review.openstack.org/39705504:43
*** luyao has joined #openstack-nimble04:43
*** luyao has left #openstack-nimble04:45
*** luyao has joined #openstack-nimble04:45
luyaozhenguo: it solved the problem now:-D04:46
openstackgerritZhong Luyao proposed openstack/nimble: Add instance dbapi test cases  https://review.openstack.org/39705504:52
luyaozhenguo:  hi04:54
luyaozhenguo: about the api abstract interface does not consist with the implement interface04:54
luyaozhenguo: do we need to fix it?04:54
luyaozhenguo: but seems it does matter, it will not break nimble.04:55
luyaozhenguo:  I means the DB API04:55
zhenguoluyao: I think it's better to fix it if you have time :P04:57
luyaozhenguo: you have fix it.  on nov 1004:58
zhenguoluyao: oh, hah04:58
zhenguoluyao: I think the inconsistent interfaces will confuse new developers, so better to fix it, and please feel free to address any issue you find in our code in future.05:00
openstackgerritMerged openstack/nimble: Add name UniqueConstraint to instance table  https://review.openstack.org/39751505:10
* zhenguo away05:11
*** lei-zh has joined #openstack-nimble05:28
*** luyao has quit IRC05:32
*** yuntongjin has joined #openstack-nimble05:39
zhenguoliusheng: hi, how is the functional test going?06:30
liushengzhenguo: Hi zhenguo, sorry, I had serveral days off since my something of my family06:42
openstackgerritliusheng proposed openstack/nimble: Add support for updating instance type  https://review.openstack.org/38643906:52
shaohe_fengzhenguo: liusheng: what's the progess the function test?  I can help on some instance related functional test.06:58
zhenguoliusheng: no problems,  I can help with it if needed06:59
liushengshaohe_feng: thanks!, the instance related functional tests are what I am working on07:00
shaohe_fengliusheng: ok. So le me work on the instance_state related07:01
zhenguoliusheng, shaohe_feng: thanks, so I will work on engine manager realted tests, seems all tests parts are covered, right?07:04
liushengzhenguo: the instance CURD related trests will pass the api request from nimble-api to nimble-engine as we talked, do we still need functional test for engine manager ?07:05
zhenguoliusheng: no, I mean unit tests for engine manager :P07:06
liushengzhenguo: Oh, ok07:06
zhenguook07:06
shaohe_fengzhenguo: yes, seems all covered. But IMHO,  you had better have a item list.07:06
zhenguoshaohe_feng: ok, I will prepared an item list07:08
shaohe_fengliusheng: I have read the function test code.07:10
shaohe_fengliusheng: I think we can move objects.register_all() out of the BaseApiTest07:11
shaohe_fengliusheng: so we do not need call it in every testcase setup()07:11
liushengshaohe_feng: you mean put it in its parent class ?07:13
shaohe_fengliusheng: just put it in __init__.py07:13
shaohe_fengliusheng: then python just call this one time.07:13
shaohe_fengliusheng: for example.07:14
shaohe_feng$ cat mytest/__init__.py07:14
shaohe_fengprint "hello"07:14
shaohe_fengY07:14
shaohe_fengliusheng: $ python -c "import mytest; import mytest; import mytest"07:15
shaohe_fenghello07:15
liushengshaohe_feng: got it, cool!07:16
liushengshaohe_feng: yeah, it shouldn't be call in every tests :)07:16
openstackgerritZhong Luyao proposed openstack/nimble: Add instance dbapi test cases  https://review.openstack.org/39705507:17
liushengshaohe_feng: but I am afraid that the objects.register_all() need some config options which need to be inited firstly07:18
shaohe_fengliusheng: let me check it.07:19
*** luyao has joined #openstack-nimble07:34
*** luyao has quit IRC08:05
*** lei-zh has quit IRC08:31
openstackgerritZhong Luyao proposed openstack/nimble: Add instance dbapi test cases  https://review.openstack.org/39705508:35
zhenguohi all, I just updated the next meeting time https://wiki.openstack.org/wiki/Meetings/Nimble , please feel free to add new agenda there08:40
*** lei-zh has joined #openstack-nimble08:42
openstackgerritZhong Luyao proposed openstack/nimble: Add instance dbapi test cases  https://review.openstack.org/39705508:44
openstackgerritshihanzhang proposed openstack/python-nimbleclient: Support Instance Resource  https://review.openstack.org/39239908:47
openstackgerritshihanzhang proposed openstack/python-nimbleclient: Support Instance Resource  https://review.openstack.org/39239908:59
shaohe_fengzhenguo: liusheng: the instance_stat CURD related tests will also pass the api request from nimble-api to nimble-engine.09:04
zhenguoshaohe_feng: yes, and you need to mock the ironic api call09:05
shaohe_fengzhenguo: liusheng: so how do we do? use mock? or a fake/real backend nimble-engine server?09:05
zhenguoshaohe_feng: real nimble-engine backend09:06
zhenguoshaohe_feng: for functional tests , we already setup a real env using devstack09:06
zhenguoshaohe_feng: oh, in our gate09:06
liushengzhenguo: shaohe_feng I am struggling for that :)09:07
liushengzhenguo: but may we also need to start a nimble-engine with mocked ironic ?09:07
shaohe_fengliusheng: zhenguo: I'd like luyao to add these testcase, it is helpful for her to understand how nimble works.09:07
liushengshaohe_feng: sure09:07
shaohe_fengliusheng: zhenguo: you can help her.09:08
zhenguoshaohe_feng: sure09:09
shaohe_fengliusheng: zhenguo: she is a serious girl. you can seen her testcase patch, the coverage is good.  https://review.openstack.org/#/c/397055/609:10
zhenguolusheng, shaohe_feng: yes, really a good addition to nimble team :P09:11
liushengawsome!09:11
shaohe_fengliusheng: how can I get your real nimble-engine backend patch09:11
shaohe_fengliusheng: zhenguo: she is still a student.  :P09:11
liushengshaohe_feng: did't get ready yet, just testing locally09:12
zhenguoshaohe_feng: awsome09:12
zhenguoliusheng, shaohe_feng: let me check how ironic api functinal tests work09:13
shaohe_fengzhenguo: OK.09:13
zhenguoliusheng, shaohe_feng: oh, it's an empty directory :(09:14
zhenguoliusheng, shaohe_feng: in fact, in ironic unit api tests, it mocks the conductor api call09:16
liushengI doubt if the instance CURD functional tests really need to pass api requests to nimble-engine ? or only in nimble-api and and there will be functional tests for nimble-engine ?09:16
zhenguoliusheng: yes, seems it's ok for api functional tests09:18
*** openstackgerrit has quit IRC09:18
liushengzhenguo: if so, we can just mock the RPC09:18
zhenguoliusheng, shaohe_feng: yes,09:19
*** openstackgerrit has joined #openstack-nimble09:19
shaohe_fengzhenguo: OK, so we do not need devstack to start ironic for our api functional test, right?09:20
liushengzhenguo: another way, we can use gabbi test, it seems based on the evn installed by the gate job09:20
zhenguoliusheng, shaohe_feng: but seems we really use the env on our gate now09:20
zhenguolusheng, shaohe_feng: according to the logs09:21
zhenguoliusheng, shaohe_feng: oh, sorry, it's just api and db, not related to nimble engine now09:21
liushengzhenguo: may it only depends on the packages, not the running service, right ?09:22
zhenguoliusheng, shaohe_feng: still I'm thing whether tempest should cover functional tsets?09:23
*** yuntongjin has quit IRC09:24
shaohe_fengzhenguo: it should. but IMHO, I'm afraid the coverage.09:24
shaohe_fengzhenguo: usually, we can add a new fuction with the API fuctional testcase, but seldom with tempest testcase.09:25
zhenguoshaohe_feng, liusheng: I found seems ironic moved api functional tests to unit tests09:25
liushengmay we can consider the gabbi test, FYI: https://github.com/openstack/aodh/blob/master/aodh/tests/functional/gabbi/gabbits/alarms.yaml09:25
liushengI don't know the internal mechanism of gabbi, but seems it cover the api reqeust09:26
zhenguoliusheng: seems we can try, does other projects use it besides aodh?09:28
shaohe_fengliusheng: that's need to dig into how it works09:28
zhenguoshoahe_feng: haha, liusheng is the PTL of aodh project :P09:28
*** luyao has joined #openstack-nimble09:28
liushengzhenguo: Nova also use this09:29
zhenguoliusheng: it can cover the real env besides api module?09:29
shaohe_fengliusheng: awsome. so you should know gabbi well.09:29
zhenguoliusheng, shaohe_feng: before we switch to gabbi, let's talk about functional tests more09:30
zhenguoliusheng, shaohe_feng: as I understand api functinal tests should only cover api, right?09:30
liushengzhenguo: it seems is, the api functional tests only cover the api and engine functional test cover the engine09:31
zhenguoliusheng: I found ironic do there tests separately in unit tests api and conductor manager09:32
zhenguoliusheng, shaohe_feng: but not sure why ironic moved these from functional to ut09:34
shaohe_fengzhenguo: I'm read up the doc, what is fuctional test, unit test, and Integration Test.  https://codeutopia.net/blog/2015/04/11/what-are-unit-testing-integration-testing-and-functional-testing/09:35
liushengseems not a clear seperation between functional and ut09:35
*** luyao has quit IRC09:36
shaohe_fengliusheng: zhenguo: so the level shoulb be functional > integration > unit .09:41
shaohe_fengfuctional should use real  backend engine for the docs.09:42
zhenguoshaohe_feng, liusheng: seems it's not that easy to use real env.09:45
zhenguoshaohe_feng, liusheng: as I understand only tempest use real env now09:45
liushengso according this doc, the functional tests only check the responses of API requests ?09:46
shaohe_fengliusheng: seem the fucntional should be from the client to the server. but this is not an authoritative doc for test define.09:49
shaohe_fengliusheng: we need a authoritative doc09:49
zhenguoliusheng, shaohe_feng: Does it make sense that functional tests is for seperated modules, like API functional tests is for api request which mock the rpc call, and engine fucintional tests covers the server side rpc call. integration tests is for all modules?09:49
shaohe_fengzhenguo: intesting, there's also a system test.09:52
shaohe_fengzhenguo: System test: Test that tests a system as a black box. Dependencies on other systems are often mocked or stubbed during the test (otherwise it would be more of an integration test).09:52
zhenguoliusheng, shaohe_feng: oh, my..09:52
shaohe_fengzhenguo: so the level should be functional > System >= integration > unit.09:53
zhenguoliusheng, shaohe_feng: sorry, I have to go for dinner, ttyl :P09:55
shaohe_fengzhenguo: Integration Testing09:55
shaohe_fengAs the name suggests, in integration testing the idea is to test how parts of the system work together – the integration of the parts. Integration tests are similar to unit tests, but there’s one big difference: while unit tests are isolated from other components, integration tests are not. For example, a unit test for database access code would not talk to a real database, but an integration09:55
shaohe_fengtest would.09:55
shaohe_fengzhenguo: OK, have a good dinner.09:55
*** liusheng has quit IRC10:56
*** liusheng has joined #openstack-nimble10:58
zhenguoshaohe_feng, liusheng: I'm back11:00
zhenguoshaohe_feng, liusheng: currently we use pecan.testing for api functional tests which is not a real env with openstack, you can just use 'tox -efunctional' for testing,11:04
zhenguoshaohe_feng: so it doesn't rely on gate to setup a devstack env at all,11:06
openstackgerritZhenguo Niu proposed openstack/nimble: Replace xrange with range as it doesn't exit in python3  https://review.openstack.org/39768911:19
*** lei-zh has quit IRC11:24
openstackgerritMerged openstack/nimble: Replace xrange with range as it doesn't exit in python3  https://review.openstack.org/39768911:46
openstackgerritMerged openstack/nimble: Add instance dbapi test cases  https://review.openstack.org/39705512:20
liushengzhenguo: I am trying to write functional test based on the devstack env, for creating instance, it requires a port type parameter12:42
liushengzhenguo: what is that mean ?12:42
openstackgerritliusheng proposed openstack/nimble: WIP: Add gabbi tests for instance CURD  https://review.openstack.org/39772812:54
zhenguoliusheng: I think seems we don't need to write functional test based on devstack env13:20
*** aarefiev has joined #openstack-nimble13:20
*** aarefiev has left #openstack-nimble13:20
liushengzhenguo: so dont need to cover the process nimble-api -> nimble-engine in functional test ?13:21
zhenguoliusheng: I think so,13:22
zhenguoliusheng: seems functional tests for each module is enough13:22
zhenguoliusheng: what do you think?13:22
liushengzhenguo: we can add test based on gabbi to cover a real instance creation process, but the real creation process may be a bit complex13:23
zhenguoliusheng: oh, I just saw your patch based on gabbi,13:24
zhenguoliusheng: I'm not quite familiar with gabii, if it can work, that would be fine13:24
liushengzhenguo: something wrong about the patch, the gabbi tests cannot be loaded ;P13:24
zhenguoliusheng: the reason I suggestion to use functional for each module is that I think it would more complex to implement13:25
zhenguoliusheng: oh, the reason is that I think all functional tests will be more complex than seperated13:27
liushengzhenguo: yeah, it can be implement thoeretically, but creating a instance depend on a real ironic, a real image, a real network13:28
zhenguoliusheng: yes, if so, I think it should be covered by tempest13:28
zhenguoliusheng: and I think we can introduce tempest plugin quickly13:28
zhenguoliusheng: we can add more tests to templest based on real env, and add functional tests for seperated module like api and engine, then add UTs, seem that would be enough.13:30
liushengzhenguo: agree13:30
zhenguoliusheng: thanks13:30
zhenguoliusheng: so it's ok with currently pecan.testing framework for api tests13:30
zhenguoliusheng: and mock rpcapi call for engine manager13:31
liushengzhenguo: so we can mock the rpc calls add instance CURD functional tests13:31
zhenguoliusheng: yes, I think it's enough.13:31
zhenguoshaohe_feng: are you still around?13:31
*** RuiChen has quit IRC14:00
* zhenguo goes home14:07
*** openstackgerrit has quit IRC15:48
*** openstackgerrit has joined #openstack-nimble15:49

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!