Monday, 2017-09-04

*** zhurong has joined #openstack-karbor01:09
*** dixiaoli has joined #openstack-karbor01:11
*** edisonxiang has quit IRC01:12
*** liujiong has joined #openstack-karbor01:18
*** dims has quit IRC01:21
*** dims has joined #openstack-karbor01:33
*** jiaopengju has joined #openstack-karbor01:50
*** zhurong_ has joined #openstack-karbor03:23
*** zhurong_ has quit IRC03:25
*** zhurong has quit IRC03:56
*** gouthamr has quit IRC05:41
jiaopengjuhi chenying yuval, if you have time, please help review this patch, thank you. https://review.openstack.org/#/c/500371/06:04
*** zhurong has joined #openstack-karbor06:08
chenyingjiaopengju: Ok I will.06:10
jiaopengjuchenying: thank you :)06:11
jiaopengjuchenying yuval: for this bug , “Failed to restore server if the network rebuild ”, https://bugs.launchpad.net/karbor/+bug/1713887 , do you have any ideas?06:13
openstackLaunchpad bug 1713887 in Karbor "Failed to restore server if the network rebuild" [Undecided,New]06:13
openstackgerritMerged openstack/karbor master: Fix checkpoints pagination error  https://review.openstack.org/50037106:16
chenyingjiaopengju: IMO, by default, the usecase of restoring the server, the network of this server will be same as the nova plugin do now.06:24
jiaopengjuchenying: I agree with you06:24
chenyingjiaopengju: There may be another usecase, restore servers to another OpenStack environment,.06:25
jiaopengjuchenying: Yes, should we add parameters for this usecase?06:25
chenyingjiaopengju:  restore servers to another OpenStack environment is more like the usecase about restore cross-site, we may need think carefully about it.06:27
chenyingjiaopengju: In this usecase, the network topology will be rebuild.06:28
chenyingping yuval06:28
jiaopengjuchenying: For the usecase of in one environment, if the users delete the private network, all the servers based on the deleted private network will be invalid06:30
jiaopengjus/all the servers/all the servers backup06:31
chenyingjiaopengju: For the usecase of in one environment, I think we can pass the network as the parameters of this server in plan.06:34
jiaopengjuchenying: ok, get it06:34
yuvalhey chenying06:43
* yuval is reading https://bugs.launchpad.net/karbor/+bug/171388706:44
openstackLaunchpad bug 1713887 in Karbor "Failed to restore server if the network rebuild" [Undecided,New]06:44
chenyinghi yuval Good morning.06:45
yuvalchenying: good afternoon :)06:45
chenyingyuval Now I have a question about k8s protectable want to discuss with you.06:45
yuvalchenying: sure, one sec, I'm reading https://bugs.launchpad.net/karbor/+bug/171388706:46
openstackLaunchpad bug 1713887 in Karbor "Failed to restore server if the network rebuild" [Undecided,New]06:46
chenyingyuval: OK06:46
yuvaljiaopengju: chenying: regarding https://bugs.launchpad.net/karbor/+bug/171388706:48
openstackLaunchpad bug 1713887 in Karbor "Failed to restore server if the network rebuild" [Undecided,New]06:48
jiaopengjuhi yuval06:49
yuvaljiaopengju: chenying: we have no way to know if the restored network A is the same as the original network A. Maybe some time passed and user made many changes to the restored network A?06:49
yuvaljiaopengju: chenying: therefor, I think we should let the server be restored even if we cannot connect it to the network06:49
chenyingyuval: I discuss it with jiaopengju now.06:49
yuvaljiaopengju: chenying: and let the user specify in the parameter to which network to attach, in case it is a different one06:50
chenyingyuval jiaopengju: Yes06:50
chenyingFor the usecase of in one environment, I think we can pass the network as the parameters of this server in plan.06:50
jiaopengjuyuval chenying: this solution is ok.06:51
chenyingyuval jiaopengju: let the server be restored even if we cannot connect it to the network ------Does it means that the user also can configure the network of the restored server manually?06:51
yuvalchenying: after the server is restored, the user can do whatever they want06:52
chenyingyuval jiaopengju: and let the user specify in the parameter to which network to attach, in case it is a different one --------The network that the user want to use can be as the parameters of this server in plan.06:53
yuvalchenying: yes06:53
jiaopengjuyuval chenying: It seems that this is the only way, because we can not change the network id06:54
chenyingjiaopengju: It seems that this is the only way, because we can not change the network id -----sorry, what do you mean? the new network whatever they want can be as the  the parameters of this server in plan.06:55
jiaopengjuchenying: I means we can not change the restored network id06:56
jiaopengjuchenying: but we can specify the server’s attach network id06:56
chenyingjiapengju: Yes we don't need change the restore network id.06:59
jiaopengju:)07:00
chenyingjiapengju: So are we all clear about the solution about this bug? do you have any other question?07:00
jiaopengjuchenying: I’m clear. I will try to fix this bug soon.07:01
chenyingyuval: Are you free now? So can we continue discussing the pod protectable?07:01
yuvalchenying: yes07:02
chenyingyuval:  Although the uid of pod resource can be returned from the k8s cluster. But the k8s only expose a get pod API with the parameter pod name.07:03
chenyingyuval: The pod( like other resources) name and the namespace are the only key for the pod resource.07:03
yuvalchenying: umm, ok?07:05
chenyingyuval: After I have a look at some discussion about the api about the resource uid in k8s community. The uid will not be used for the resource operation in api.07:05
chenyingyuval: In karbor protectable, the show api . The parameter of show_resource method is resource_id.07:06
*** zhurong has quit IRC07:08
chenyingyuval: So I am thinking about fill the Resource id with the pod name? Do you have any idea about it?07:12
yuvalchenying: I'm reading https://kubernetes.io/docs/api-reference/v1.7/#objectmeta-v1-meta07:12
yuvalchenying: and it says: UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. Populated by the system.07:12
yuvalchenying: on a second look, yes, it seems like name is unique and it used for read/update operations07:13
chenyingyuval: yes  but the uid as the resource key is not used in any restfull api of the k8s.07:14
chenyingyuval: So the uid of pod in protectable response is useless. https://review.openstack.org/#/c/499047/4/karbor/services/protection/protectable_plugins/pod.py07:17
yuvalchenying: I understand. Is there a problem using namespace + name?07:22
yuvalchenying: get this:07:26
yuvalObjectives for names and UIDs:07:26
yuvalUniquely identify (via a UID) an object across space and time.07:26
yuvalUniquely name (via a name) an object across space07:26
yuvalchenying: name should be used and not uid07:27
yuval(taken from https://github.com/kubernetes/community/blob/master/contributors/design-proposals/identifiers.md )07:27
chenyingyuval:  using namespace + name is better. The size of resource id field in datbase is  only considering option.07:27
yuvalchenying: let's change it then07:27
yuvalchenying: not sure, but maybe there are validations protectable id to be like uuid07:27
yuvalchenying: (which is not good)07:28
chenyingyuval: As I know, there is not validations protectable id to be like uuid about the preotectable show api.07:29
yuvalchenying: I said maybe, I'm not sure :)07:29
chenyingyuval: So namespace + name will be used for pod resource_id in pod protectable plugin.07:30
chenyingyuval: I will update the patch.07:30
chenyingyuval: I find that there are much difference about concept design and api design between openstacl and k8s community. T.T07:32
chenyingS/openstacl/openstack07:33
yuvalchenying: yep, there are similiarities but also many dissimilarities07:33
chenyingyuval:  Using namespace + name as the resource_id of pod.  There may be a problom in plan API. There are validations resource id to be like uuid.07:36
chenyingyuval: The validations about resource_id is in karborclient.07:37
chenyingping yuval07:43
chenyingyuval: Now only the proectable show api need the namespace and name as the api request, how about add some messages about it in karborclient.07:47
chenyingyuval: We don't change the uid value as the resource id field for pod resouce. In karbor protection service, in pod protect plugins, we also can get the pod name and namepsace from the plan via the uid of this pod.07:49
yuvalchenying: don't understand. What do you mean in "add some messages about it"?07:50
yuvalchenying: can you take a look at: https://review.openstack.org/#/c/500449/07:51
chenyingyuval: OK.07:51
chenyingyuval: Add add some messages about the pod protectable show api. Like "Pass the name of the pod as the protectable_id"07:55
chenyingyuval: I worry about that changing the resource_id format of the pod will bring lots of change about karbor protection server not only the validations protectable id to be like uuid.07:57
chenyingyuval: For example:07:57
chenyingyuval: We can pass the pod name as the  resource_id of protectable-show-instance cmd.07:57
chenyingroot@ubuntu:/opt# karbor protectable-list-instances OS::Kubernetes::Pod07:58
chenying+--------------------------------------+---------------------+--------------+---------------------+----------------------------+07:58
chenying| Id                                   | Type                | Name         | Dependent resources | Extra info                 |07:58
chenying+--------------------------------------+---------------------+--------------+---------------------+----------------------------+07:58
chenying| 128caf07-9124-11e7-a930-fa163e18e097 | OS::Kubernetes::Pod | busybox-test | []                  | {u'namespace': u'default'} |07:58
chenying+--------------------------------------+---------------------+--------------+---------------------+----------------------------+07:58
chenyingroot@ubuntu:/opt# karbor protectable-show-instance OS::Kubernetes::Pod07:58
chenyingusage: karbor protectable-show-instance07:58
chenying                                        [--parameters [<key=value> [<key=value> ...]]]07:58
chenying                                        <protectable_type> <protectable_id>07:58
chenyingkarbor protectable-show-instance: error: too few arguments07:58
chenyingroot@ubuntu:/opt# karbor protectable-show-instance OS::Kubernetes::Pod busybox-test07:58
chenying+---------------------+--------------------------------------+07:58
chenying| Property            | Value                                |07:58
chenying+---------------------+--------------------------------------+07:58
chenying| dependent_resources | []                                   |07:58
chenying| extra_info          | {u'namespace': u'default'}           |07:58
chenying| id                  | 128caf07-9124-11e7-a930-fa163e18e097 |07:58
chenying| name                | busybox-test                         |07:58
chenying| type                | OS::Kubernetes::Pod                  |07:58
chenying+---------------------+--------------------------------------+07:58
chenyingS/server/service07:59
yuvalwhy the id is 128caf07-9124-11e7-a930-fa163e18e097 and not "default:busybox-test"?08:00
chenyingyuval: Now the implementation of the protectable plugin has not been changed[1].  https://review.openstack.org/#/c/499047/4/karbor/services/protection/protectable_plugins/pod.py08:02
chenyingyuval: I worry about that changing the resource_id format of the pod will bring lots of change about karbor protection server not only the validations protectable id to be like uuid.08:02
yuvalchenying: like what?08:04
chenyingyuval: Or skip the validations resource id to be like uuid about the pod resource firstly? I know there are some validations resource id about plan API.08:06
yuvalchenying: if we don't allow names as uuid, is there another way?08:07
chenyingyuval:  In karbor protection service, in pod protect plugins, we also can get the pod name and namepsace from the plan via the uid of this pod.08:08
yuvalchenying: I have to go, be back later08:09
yuvalchenying: sorry08:09
chenyingyuval: When will you come back? We can discuss it then.08:09
yuvalchenying: ~2 hours08:10
chenyingyuval: sure.08:10
*** yamamoto has quit IRC08:35
*** edisonxiang has joined #openstack-karbor08:44
*** yamamoto has joined #openstack-karbor08:46
jiaopengjuping edisonxiang08:49
edisonxiangjiaopengju: hey08:56
jiaopengjuedisonxiang: I’m trying to fix a bug in dashborad: “checkpoints listing”. But I don’t know where prev_marker = self.request.GET.get(08:58
jiaopengju            tables.CheckpointsTable._meta.prev_pagination_param, None) was initialized.08:58
jiaopengjuthe code is in checkpoints/views.py08:59
*** yamamoto has quit IRC08:59
jiaopengjuedisonxiang: the code is in checkpoints/views.py08:59
edisonxiangjiaopengju: OK. Good Catch. I will check it and response to you.09:00
jiaopengjuedisonxiang: thank you09:00
jiaopengjuedisonxiang: I want to find where the valume of prev_pagination_param was seted.09:01
jiaopengjus/valume/value/09:01
edisonxiangunderstood09:02
*** yamamoto has joined #openstack-karbor09:11
*** yamamoto has quit IRC09:13
jiaopengjuedisonxiang: you can see the bug description here https://bugs.launchpad.net/karbor-dashboard/+bug/171490909:14
openstackLaunchpad bug 1714909 in karbor-dashboard "Previous page in checkpoints pagination not work " [Undecided,In progress] - Assigned to jiaopengju (pj-jiao)09:14
edisonxiangthanks09:15
openstackgerritMerged openstack/karbor master: Add kubernetes client to Karbor  https://review.openstack.org/49877909:20
*** liujiong has quit IRC09:35
*** liujiong has joined #openstack-karbor09:35
*** dixiaoli has quit IRC09:38
edisonxianghello jiaopengju09:45
jiaopengjuhi edisonxiang09:45
edisonxiang"tables.CheckpointsTable._meta.prev_pagination_param" default value is "prev_marker"09:46
edisonxiang(Pdb) p tables.CheckpointsTable._meta.prev_pagination_param09:46
edisonxiang'prev_marker'09:46
jiaopengjuwhere to change it after the listing?09:47
edisonxiangyou can set it at https://github.com/openstack/karbor-dashboard/blob/master/karbor_dashboard/checkpoints/tables.py#L13709:49
edisonxianglike this https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/snapshots/tables.py#L19609:50
edisonxiangthe default value is "pre_marker".09:52
edisonxiangself.request.GET.get(09:52
edisonxiangtables.CheckpointsTable._meta.prev_pagination_param, None) this values is used for "sort"09:52
jiaopengjuwhere to change ‘self.request.GET.get(‘pre_marker’)’09:53
jiaopengju?09:53
edisonxiangtwo chioces: asc or des (https://github.com/openstack/karbor-dashboard/blob/master/karbor_dashboard/api/karbor.py#L401)09:53
edisonxiangI think we did not use it09:54
jiaopengjuhttps://github.com/openstack/karbor-dashboard/blob/master/karbor_dashboard/checkpoints/views.py#L13709:55
edisonxiangthe value is always none09:56
edisonxiangso line 146 is none too, https://github.com/openstack/karbor-dashboard/blob/master/karbor_dashboard/checkpoints/views.py#L14609:56
jiaopengjuno, if the length of the checkpoint list is more than 20, the valume will not be none09:56
jiaopengjuI have tested it.09:57
edisonxiang:(09:57
jiaopengjuSo my doubt is who changes the prev_marker value here?09:58
edisonxiangi will send a snapshot to you09:59
edisonxiangplease accept it10:00
edisonxiangI think when the user click the title colume, it will trigger it10:00
jiaopengjuI cannot download it :(10:02
edisonxiangI send to your email box10:03
edisonxiangjiaopengju@cmss.chinamobile.com10:03
jiaopengjuget it, thank you10:03
edisonxiangyou are welcome10:03
*** yamamoto has joined #openstack-karbor10:04
jiaopengjuI have some ideas now through your post links, I will try to find the reason later.10:04
*** jiaopengju has quit IRC10:10
*** liujiong_lj has joined #openstack-karbor10:57
*** liujiong has quit IRC11:00
*** liujiong_lj has quit IRC11:44
openstackgerritchenying proposed openstack/karbor master: Add kubernetes pod protectable plugin to Karbor  https://review.openstack.org/49904711:50
chenyingping yuval11:50
yuvalhey chenying11:50
chenyinghi I have updated the pod protectable patch. Could you pleas review it?11:51
chenyingyuval: I have thinked carefully about allowing the namespace+name as the the resource_id of the pod, we just need skip some validations resource id about pod in plan and restore API. I worry about it will bring other changes, it seem not.11:51
yuvalchenying: we can not do selective validations11:52
chenyingyuval: So dou you have any idea?11:52
chenyingyuval: Or we delete the validations resource id to be like uuid11:53
yuvalchenying: any implications for removing these validations11:53
yuval?11:53
chenyingyuval: By defaut, we think the resource are all from the openstack project, like cinder, nova, manila. So all these resouces in these project have a resouce id uuid like.11:55
yuvalchenying: btw, what if the namespace + name are very very long?11:56
chenyingyuval: But as you know, not only the resouce in openstack  are supportted by karbor. We also need to conisder some resouces not in uuid like the pod in k8s.11:56
yuvalchenying: I have another idea11:57
yuvalchenying: make the uuid some kind of hash of the namespace + name, and add the detailed namespace and name in extra_info11:57
yuvalchenying: therefor the uuid is the same if namespace + name is the same, and we don't need to change the db11:57
yuvalchenying: makes sense?11:58
chenyingyuval: The namespace have already in the extra_info.11:58
chenyingyuval: make the uuid some kind of hash of the namespace + name. ---I am not very clear about it.11:58
chenyingyuval: make the uuid some kind of hash of the namespace + name----- what is the difference with just using the uid of the pod?11:59
yuvalchenying: uuid of pod might change over time11:59
chenyingyuval: As you know, we don't really use the uid in karbor. we just use the namespace and the name in karbor service. here uid just a symbol.12:00
chenyingyuval: Even the uid of pod is changed in k8s. We also can get the pod using the namepsace +name form karbor.12:01
yuvalchenying: but that means the same pod over time might show as two different resources12:02
yuvalchenying: if we add one pod to the plan, it might have a different uuid later12:02
yuvalchenying: not good for the user12:02
yuvalchenying: if we create a uuid-like string which comprises of a hash of the name+namespace, it is unique12:02
chenyingyuval:  if we add one pod to the plan, it might have a different uuid later--- we just only add the uid to plan, we also can add namespace+ name to the resouce in plan. The uid of pod will never be used by karbor. just a symbol.12:04
chenyingwe not only add the uid to plan12:04
yuvalchenying: we need to keep this invariant: same pod = same karbor id12:04
chenyingyuval: a uuid-like string which comprises of a hash of the name+namespace  ---- can we parse the namespace and name value from this a uuid-like hash string?12:07
chenyingyuval: not only the uid of the pod, even the a uuid-like hash string  which comprises of a hash of the name+namespace. They are all can not used for getting pod from k8s. Only the namespace and name can be used for getting pod form K8S.12:11
chenyingyuval: They are all can not used for getting pod from k8s directly.12:11
chenyingyuval: ?12:14
chenyingyuval: You mean that want to keep invariant: a pod with same namespace and name = same resouce id (uuid) in karbor plan? even this uuid is not used for getting pod from k8s?12:17
openstackgerritOpenStack Proposal Bot proposed openstack/karbor master: Updated from global requirements  https://review.openstack.org/50000412:17
chenyingping yuval12:20
yuvalchenying: we can't parse it from the hash, but it will be in the extra_info12:24
yuvalchenying: look, two things, which must be together: 1) keep the namespace AND name in extra_info 2) the pod id will be a uuid-like hash of the name+namespace12:24
chenyingyuval: 1) keep the namespace AND name in extra_info ---when we design the extra_info for protectable resouce, we limit that the extra_info can not be used in karbor protection service.  It is only used for showing the detail of resocuce.12:26
chenyingyuval: How about add namespace+name to the name filed of resouce? So that it can be used in workflow and plugin of karbor.12:27
yuvalchenying: what do you mean they are not used in the protection service?12:32
yuvalchenying: do you mean that you can not access them in protect/restore ops?12:32
chenyingyuval: Yes.12:33
yuvalchenying: any problem changing that?12:33
chenyingyuval: The extra_info can not be accessed.12:33
yuvalchenying: any problem changing that?12:33
chenyingyuval: :/12:34
yuvalchenying: what?12:34
yuvalchenying: can we make extra_info accessible to protect/restore?12:35
chenyingyuval: Yes It can be changed. Another idea is that adding namespace+name to the name filed of resouce.12:35
yuvalchenying: well, that's ok, but we still have to make the id of the resource unique12:35
yuvalchenying: so that id resource1 == resource2, resource1.id == resource2.id12:36
yuvalchenying: and if resource1 != resource2, resource1.id != resource2.id\12:36
chenyingyuval: OK  1) adding namespace+name to the name filed of resouce. 2) the pod id will be a same uuid-like hash of the same name+namespace12:36
yuvalchenying: sounds good?12:37
yuvalchenying: sounds good to me12:37
chenyingyuval: One problem about protectable-show-instance cmd.12:39
yuvalchenying: ?12:39
chenyingroot@ubuntu:/opt# karbor protectable-show-instance OS::Kubernetes::Pod12:39
chenyingusage: karbor protectable-show-instance12:39
chenying                                         [--parameters [<key=value> [<key=value> ...]]]12:39
chenying                                       <protectable_type> <protectable_id>12:39
yuvalwhats the problem?12:40
chenyingyuval: This cmd, only pass the protectable_id of the pod, we can not get the pod from this api.12:40
yuvalchenying: what are the parameters for?12:40
chenyingyuval: we may need pass the name and namsspace from the parameters.12:40
yuvalchenying: if that solution is not good, we'll have to make the id not be uuid, but name+namespace12:42
chenyingyuval: if that solution is not good----- do you think there are something that we have not considered?12:45
yuvalchenying: resource graph for protect12:45
chenyingyuval: the uuid is unique and the name field (namespace+name) is unique. I think the resouce graph is OK.12:46
openstackgerritchenying proposed openstack/karbor master: Add kubernetes pod protectable plugin to Karbor  https://review.openstack.org/49904713:21
chenyingping yuval13:22
chenyingyuval: According to our discussion, the pod protectable patch has been updated. Could you please review it?13:22
chenyingyuval: I will test the resouce graph of protect/restore with pod resouces tomorrow.13:23
*** jiaopengju has joined #openstack-karbor13:24
chenyingyuval: http://paste.openstack.org/show/620338/  The uuid is unique and same from get and list api about the pod.13:32
yuvalchenying: looks good13:40
chenyingyuval In the later patch, I will test the resouce graph of protect/restore ASAP.13:42
*** jiaopengju has quit IRC15:33
*** gouthamr has joined #openstack-karbor15:37
*** gouthamr has quit IRC18:19
*** gouthamr has joined #openstack-karbor18:20
*** zhonghua has joined #openstack-karbor18:32
*** zhonghua2 has quit IRC18:35
*** dims has quit IRC18:44
*** dims has joined #openstack-karbor18:47

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