Friday, 2017-04-14

*** guoshan has joined #senlin00:22
*** catintheroof has joined #senlin00:41
*** zhenguo has joined #senlin00:52
*** guoshan has quit IRC01:05
*** guoshan has joined #senlin01:06
*** guoshan has quit IRC01:10
*** XueFeng has joined #senlin01:24
*** dixiaoli has joined #senlin01:25
*** catintheroof has quit IRC01:30
*** catintheroof has joined #senlin01:30
*** catintheroof has quit IRC01:31
yuanbinQiming, https://review.openstack.org/#/c/455211/ this patch , I don't unstand mean, when we remove 'is_profile_only = resource.Body' POST PATCH will miss 'profile-only'01:33
Qimingwell, I dont understand your question, ;)01:34
*** yanyanhu has joined #senlin01:34
*** guoshan has joined #senlin01:35
Qimingprofile_only is made part of the resource body01:36
yuanbinQiming, I mean, when i use profile-only=True, the cluster profile will be change, but the cluster has exist node don't apply new profile01:36
Qimingyes, that was the goal of this parameter01:37
yuanbinQiming, but i use profile-only=True,  -d '{"cluster": {"name": null, "profile_id": "profile_base", "id": "903d7af7-1552-481d-ab44-145d9d66d801", "timeout": null, "metadata": {}}}' but the para not find profile-only param01:37
*** guoshan has quit IRC01:37
*** guoshan_ has joined #senlin01:37
Qimingwhen update the cluster, we only update its profile, we don't update nodes01:37
yuanbinQiming, so, the change will be faild01:37
yuanbinQiming, yes01:38
Qimingwhat was your command for cluster update?01:38
yuanbinQiming,  senlin --debug cluster-update --profile profile_base --profile-only=True cluster_00101:39
Qiminglooking01:41
openstackgerritQiming Teng proposed openstack/senlin master: Fix setup-service script error  https://review.openstack.org/45000601:41
Qimingwhat is your version of openstacksdk?01:41
Qiminghave you applied that patch?01:41
Qimingor you dont have the is_profile_only = resource.Body('profile_only') line?01:42
yuanbinQiming, openstacksdk 0.9.1301:43
Qimingyou need the lastest version and you need the patch01:43
yuanbinI have applied patch ,_query_mapping = resource.QueryParameters(01:43
yuanbin        'name', 'status', 'sort', 'global_project', 'profile_only',01:43
Qimingthat is wrong01:44
Qimingplease check https://review.openstack.org/#/c/455211/01:44
Qimingthe latest patchset01:44
yuanbinQiming, I use is_profile_only = resource.Body('profile_only') , will be ok01:44
Qimingyes01:45
Qimingthat is the correct solution01:45
Qimingquery_mapping is meant for cluster_list01:45
Qimingwhen you list clusters, what are the query parameters you can pass01:45
yuanbinQiming, https://review.openstack.org/#/c/455211/ this patch fix be me01:45
yuanbins/be/by me01:45
Qiming'profile_only' is certainly not part of cluster listing query01:46
Qimingyou should not have added 'profile_only' to the _query_mapping field01:47
yuanbinQiming, ok01:47
Qimingand you should have changed profile_only to is_profile_only when adding it as a cluster 'property'01:47
Qimingin other words, patchset 5 looks good now01:47
yuanbinQiming, ok, thanks01:48
Qimingyuanbin, when you have time, please help review this: https://review.openstack.org/45000601:49
QimingI have reworked your patch01:49
yuanbinQiming, ok01:49
yuanbinQiming, https://review.openstack.org/450006 Thank you for let me learn such usage , I think is very good!02:06
openstackgerrityangyide proposed openstack/senlin master: Improve check_object for health_policy_poll recover  https://review.openstack.org/45618702:12
*** zhurong has joined #senlin02:32
*** zhurong has quit IRC04:02
*** guoshan_ has quit IRC04:07
*** dixiaoli has quit IRC04:21
*** zhurong has joined #senlin04:30
*** dixiaoli has joined #senlin05:23
*** zhurong has quit IRC06:20
*** dixiaoli has quit IRC06:27
*** zhurong has joined #senlin06:32
yuanbinyanyanhu, I have a problem in this https://bugs.launchpad.net/senlin/+bug/1682698 ?06:41
openstackLaunchpad bug 1682698 in senlin "senlin validate_for_update faild" [Undecided,New] - Assigned to chenyb4 (chenyb4)06:41
yuanbinyanyanhu, In this check, well be allways return False06:42
yanyanhuhi, yuanbin, let me check it06:42
yanyanhuhi, yuanbin, just as you said in bug report ""BLOCK_DEVICE_MAPPING_V2", "SECURITY_GROUPS" and other is don't configure "updatable=True" parameter, so validate_for_update will always return false"06:46
yuanbinyanyanhu, yes06:47
yanyanhuso any issue with this logic?06:47
yuanbinyanyanhu, when update image, this validate_for_update will be faild, so, the next well be don't execute06:49
yanyanhureturn false mean users are trying to update some properties that are not updatable06:49
yanyanhuif the return value is true, that means all properties changed in new profile are updatable and thus the validation passed06:50
yanyanhuumm, updating image shouldn't fail I guess.06:51
yanyanhulet me check nova server profile06:51
yanyanhuhttp://git.openstack.org/cgit/openstack/senlin/tree/senlin/profiles/os/nova/server.py#n15806:52
yuanbinyanyanhu, if not self.validate_for_update(new_profile):  return False, validate_for_update  has return False, so the next don't execute06:52
yanyanhuyuanbin, yes, validate_for_update function returning false means you're trying to update an "non-updatable" property06:53
yuanbinyuanbin, I think logic is validate(newprofile, updatexxx)  if newprofile allown updatable return True06:53
yanyanhuso the update operation will finally fail06:53
yanyanhuI guess it is designed like this06:54
yanyanhuyuanbin, yes, what you said is right06:54
yanyanhuand it doesn't conflict to what I said : )06:54
yanyanhue.g. you are trying to update image which is an updatable property, then validate_for_update function will return true06:55
yanyanhuand then the following updating operation will get chance to be executed06:55
yanyanhuhowever, if you try to update the property, lets say, "BLOCK_DEVICE_MAPPING_V2" which is not updatable06:56
yuanbinyanyanhu, but i want to update BLOCK_DEVICE_MAPPING_V2, and i add BLOCK_DEVICE_MAPPING_V2 updateable=True, the error appear "SECURITY_GROUPS" don't update ? but i don't update "SECURITY_GROUPS"06:56
yanyanhuthen validate_for_update will return false and then block the following update operation06:57
yanyanhuumm, that is weird06:57
yuanbinyanyanhu, yes, this logic is not probrom06:57
yanyanhuso you didn't change the value of "SECURITY_GROUPS" property?06:57
yanyanhuif so, sounds like a bug06:58
yanyanhuyou can see that updatable check will be done only when property is changed06:59
yanyanhuhttp://git.openstack.org/cgit/openstack/senlin/tree/senlin/profiles/base.py#n48506:59
yuanbinyanyanhu, yes, please let me try again06:59
yanyanhumaybe you can add some log here to see what happen?06:59
yuanbinyanyanhu, log display "SECURITY_GROUPS" is not updateable07:00
Qimingyanyanhu, maybe be this line is doing things wrong? if self.properties.get(k, None) != v:07:01
Qimingsuppose the new_profile doesn't contain security group property07:02
Qimingbut the current existing has security group specified07:02
yanyanhuif so http://git.openstack.org/cgit/openstack/senlin/tree/senlin/profiles/base.py#n48407:03
yanyanhuthis check will be false07:03
yanyanhuand line485 won't get executed I think07:03
Qimingline 484 will return ('security_group', None)07:03
yanyanhuI mean security_group key,value is not in new_profile.properties.items()07:03
Qimingsometimes, an unspecified property still appears in the dict07:04
Qimingbut its value is None07:04
yanyanhuso line 485 will be skipped for security_group key07:04
yanyanhuhi, Qiming, what you mean by "ometimes, an unspecified property still appears in the dict"07:05
Qiminghttp://git.openstack.org/cgit/openstack/senlin/tree/senlin/profiles/os/nova/server.py#n59007:05
Qimingsee this line07:05
yanyanhuyou mean the return value of "new_profile.properties.items()" is incorrect?07:05
Qimingit means self.SECURITY_GROUP will be in self.properties not matter it is provided or not07:06
yanyanhuQiming, yes, it is possible07:06
Qimingbut that line is not throwing invalid key exception07:06
yanyanhucan't clearly recall how the schema is built07:06
Qimingwe had to check whether security group is specified on line 59107:07
Qimingsimilarly, this line will return ('security_groups', None): http://git.openstack.org/cgit/openstack/senlin/tree/senlin/profiles/base.py#n48407:07
Qimingeven if the new profile didn't intend to change it07:08
yanyanhuif so, that means new profile is different from old one07:08
yanyanhuI think07:08
yanyanhusince we have security_group specified in old profile, however, this property is removed in new one07:08
yanyanhuso this is a change need to be validated?07:09
yanyanhuand validation failure is expected actually I feel?07:09
Qimingwe were using PATCH word for update07:09
Qimingwhich means the request can contain only the fields it wants to update07:09
yanyanhuok, I see07:10
yanyanhuif so, how can user to remove the sec_group by profile updating?07:10
Qimingif users want to remove security groups, they should do 'security_groups: []'07:10
yanyanhuhmm, that makes sense07:10
Qimingso a quick fix could be just test if v is None on line 48507:11
yanyanhuif so, we may need to add some description for this logic07:11
yanyanhuQiming, yes, that will work07:11
Qimingand only do the comparison if there is a new value specified07:11
Qimingthis is a good example how 'v is None' and 'not v' differs07:12
yanyanhuok, that makes sense.07:12
yanyanhuBut I suggest to add some description here to avoid misunderstanding for the usage of "profile update" interface.07:15
*** ruijie has quit IRC07:15
yanyanhusince it works in patch way rather than put07:15
*** ruijie has joined #senlin07:16
yanyanhuand we need to perform similar check when handling all other properties like key_name, network, etc.07:19
yanyanhusince we need to treat new_profile as an increment of old/existing profile rather than a new complete profile07:23
*** dixiaoli has joined #senlin07:24
yuanbinyanyanhu, I try again, the probrom is not appear, I think i configure BLOCK_DEVICE_MAPPING_V2 updateable=true configure error07:41
yanyanhuyuanbin, good to hear that : )07:41
Qimingyes, agreed, yanyanhu07:47
openstackgerritXueFeng Liu proposed openstack/senlin master: Supports nova server non-admin integration test  https://review.openstack.org/45533108:04
openstackgerritMerged openstack/senlin master: Fix setup-service script error  https://review.openstack.org/45000608:04
openstackgerritMerged openstack/senlin master: Improve check_object for health_policy_poll recover  https://review.openstack.org/45618708:04
openstackgerritMerged openstack/senlin master: Use 'nosetests -v' replace './run_tempest.sh -N'  https://review.openstack.org/45667708:04
openstackgerritMerged openstack/senlin master: add health_check() to engine.cluster  https://review.openstack.org/45643208:04
openstackgerritXueFeng Liu proposed openstack/senlin master: Supports nova server non-admin integration test  https://review.openstack.org/45533108:14
*** yuanying has joined #senlin08:19
*** yuanying_ has quit IRC08:21
*** zhurong has quit IRC10:03
*** dixiaoli has quit IRC10:04
*** XueFeng has quit IRC10:13
*** yanyanhu has quit IRC10:51
openstackgerritMerged openstack/senlin master: Fix ovo object for requests  https://review.openstack.org/45589111:35
*** Guest52586 has quit IRC12:50
*** zigo has joined #senlin12:58
*** ruijie_ has joined #senlin14:25
*** ruijie has quit IRC14:28
*** Qiming has quit IRC15:22
*** Qiming has joined #senlin15:30
*** catintheroof has joined #senlin16:45
*** catintheroof has quit IRC16:46
*** catintheroof has joined #senlin16:47
*** catintheroof has quit IRC20:02
*** catintheroof has joined #senlin23:16

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