Wednesday, 2018-10-03

*** markvoelker has quit IRC00:17
*** markvoelker has joined #openstack-glance00:17
*** markvoelker has quit IRC00:21
*** gyee has quit IRC00:29
*** mhen has quit IRC01:05
*** mhen has joined #openstack-glance01:07
*** markvoelker has joined #openstack-glance02:18
*** markvoelker has quit IRC02:51
*** markvoelker has joined #openstack-glance03:48
*** markvoelker has quit IRC04:21
*** abhishekk has joined #openstack-glance04:28
openstackgerritAbhishek Kekane proposed openstack/glance-specs master: Spec Lite: Rethinking our filesystem access  https://review.openstack.org/60558404:31
*** markvoelker has joined #openstack-glance05:18
*** udesale has joined #openstack-glance05:41
*** ratailor has joined #openstack-glance05:43
*** markvoelker has quit IRC05:52
*** mosulica has joined #openstack-glance05:54
*** dims has quit IRC06:24
*** dims has joined #openstack-glance06:26
*** dims has quit IRC06:34
*** dims has joined #openstack-glance06:35
*** dpawlik has joined #openstack-glance06:39
*** mosulica has quit IRC06:44
*** pcaruana has joined #openstack-glance06:51
*** nguyenhai93 has joined #openstack-glance07:10
*** sdin has joined #openstack-glance07:10
*** MattMan_1 has quit IRC07:18
*** MattMan_1 has joined #openstack-glance07:19
*** nguyenhai_ has quit IRC07:19
*** sdinescu has quit IRC07:19
*** odyssey4me has quit IRC07:19
*** odyssey4me has joined #openstack-glance07:32
*** rcernin has quit IRC07:55
*** odyssey4me has quit IRC08:13
*** markvoelker has joined #openstack-glance08:18
*** odyssey4me has joined #openstack-glance08:27
*** odyssey4me has quit IRC08:51
*** markvoelker has quit IRC08:51
*** odyssey4me has joined #openstack-glance09:05
*** priteau has joined #openstack-glance09:13
*** sdin has quit IRC09:52
*** sdin has joined #openstack-glance09:52
*** sdin has quit IRC09:52
*** sdinescu has joined #openstack-glance09:53
*** kukacz has quit IRC10:12
*** kukacz has joined #openstack-glance10:13
*** abhishekk has quit IRC10:21
*** udesale has quit IRC10:26
*** mvkr has quit IRC10:48
*** markvoelker has joined #openstack-glance10:49
*** mvkr has joined #openstack-glance11:02
*** mosulica has joined #openstack-glance11:12
*** mosulica has quit IRC11:17
*** mosulica has joined #openstack-glance11:20
*** markvoelker has quit IRC11:22
*** ratailor has quit IRC11:37
*** udesale has joined #openstack-glance12:03
*** rosmaita has joined #openstack-glance12:38
*** rosmaita has quit IRC12:45
*** rosmaita has joined #openstack-glance12:46
openstackgerritMerged openstack/glance master: Add missing tests for 2.6 statuses  https://review.openstack.org/59529912:51
*** udesale has quit IRC13:05
*** mvkr has quit IRC13:23
*** mvkr has joined #openstack-glance13:50
*** dpawlik has quit IRC14:27
*** dpawlik has joined #openstack-glance15:19
*** aniketh has joined #openstack-glance15:23
*** dpawlik has quit IRC15:24
*** pcaruana has quit IRC15:33
*** mosulica has quit IRC15:38
*** Luzi has joined #openstack-glance15:47
*** gyee has joined #openstack-glance16:06
*** dims has quit IRC16:28
*** dims_ has joined #openstack-glance16:35
*** Luzi has quit IRC17:02
*** mvkr has quit IRC17:39
imacdonnrosmaita: around?18:16
rosmaitaimacdonn: yep18:17
imacdonnso I had this crazy idea...18:17
* rosmaita is listening18:17
imacdonnstill exploring it ... what if we had the concept of _immutable_properties ... which you could "add", but not "replace"18:17
openstackgerritVictor Coutellier proposed openstack/glance master: Fix cleaning of web-download image import  https://review.openstack.org/60768018:18
imacdonnseemed like the code change would be really trivial ... problem is, the logic to not allow "add" on something that's already set is weird18:18
imacdonnhttps://github.com/openstack/glance/blob/master/glance/api/v2/images.py#L302-L30618:19
imacdonnseems it only does the check if schema version is 418:19
*** imacdonn has quit IRC18:21
*** imacdonn has joined #openstack-glance18:21
imacdonngrr, stupid proxy server18:22
openstackgerritVictor Coutellier proposed openstack/glance master: Fix cleaning of web-download image import  https://review.openstack.org/60768018:22
*** pcaruana has joined #openstack-glance18:24
*** itlinux has joined #openstack-glance18:24
rosmaitaimacdonn: iirc, that's because in version 4 you can't do an 'add' for an existing property; in the later version, add acts like replace if the value exists18:25
imacdonnrosmaita: bummer ... if it worked the "old" way, it'd be quite elegant18:25
imacdonnI had this in mind: http://paste.openstack.org/show/731426/18:26
rosmaitawell, we should probably look into it and make sure what's implemented fits the standard18:26
openstackgerritVictor Coutellier proposed openstack/glance master: Fix cleaning of web-download image import  https://review.openstack.org/60768018:28
rosmaitaimacdonn: your idea for immutable properties is a good one, but i thought that part of the reason to keep them in the readonly_properties list was so that we wouldn't have to write a bunch of new tests to make sure they're not changed anywhere18:31
imacdonnrosmaita: seems to me that "readonly" is defined in multiple different places18:31
rosmaitaprobably, and i wonder whether the lists are consistent with each other18:32
imacdonnrosmaita: the only place I had to change to make PATCH work is https://github.com/openstack/glance/blob/master/glance/api/v2/images.py#L463-L466 - but that's NOT the schema (right?)18:32
imacdonnrosmaita: schema at https://github.com/openstack/glance/blob/master/glance/api/v2/images.py#L1052-L1056 - at least18:33
imacdonnrosmaita: or is that even the schema? :/18:34
*** mvkr has joined #openstack-glance18:34
imacdonnI guess it is - it's used in get_schema() at line 118418:34
rosmaitaright18:35
imacdonnso apparently the PATCH mechanism doesn't care about the schema..... ?18:37
rosmaitai think _validate_change() calls schema.validate()18:40
rosmaitai think part of the problem is that this code was written before the json-patch standard had stabilized, so a lot is managed by hand instead of by library18:42
imacdonnhmm18:43
imacdonnit does call schema.validate(), but that doesn't seem to catch the read-only attribute of checksum18:47
imacdonnhttps://stackoverflow.com/questions/48153961/how-to-validate-input-and-output-on-a-single-json-schema-edge-cases-with-readon18:49
imacdonnsays "readOnly never causes JSON Schema's validation process to fail. It's not an assertion, just an annotation that applications can use to take action as they please. So your server application can handle that however it wants- raise an error if someone attempts to change it, or just silently ignore the new value."18:49
rosmaitathat's pretty nice18:49
rosmaitathat's exactly what we want18:49
imacdonnyeah, if it's stable, it is18:49
*** gyee has quit IRC18:50
*** pcaruana has quit IRC18:50
imacdonnhttp://json-schema.org/latest/json-schema-validation.html#rfc.section.10.318:51
rosmaitai was just looking at thta18:52
rosmaita*that18:52
rosmaita"If "readOnly" has a value of boolean true, it indicates that the value of the instance is managed exclusively by the owning authority, and attempts by an application to modify the value of this property are expected to be ignored or rejected by that owning authority."18:52
rosmaitai guess that doesn't strictly rule out allowing the value to be set?18:53
imacdonnI guess it's up to the "owning authority" to decide18:53
imacdonnI wonder if a lawyer wrote this doc ;)18:53
rosmaita:)18:54
rosmaitasection 3.3 seems to indicate that the annotations (like "readOnly") are informative, but not binding18:55
imacdonnfrom 10. : "These general-purpose annotation keywords provide commonly used information for documentation and user interface display purposes. They are not intended to form a comprehensive set of features. Rather, additional vocabularies can be defined for more complex annotation-based applications."18:56
imacdonnI wonder if we need to define something like "Immutable"18:56
rosmaitaeither that or "controlled"18:59
rosmaitabut it does look like we can keep them as readOnly and still allow them to be set in specific circumstances, which is really what we want19:00
imacdonnthat feels a little awkward to me .... they're either readonly or not .... seems wrong to make them "readonly ... except if the full moon falls on the third Wednesday of October"19:02
rosmaitai don't know, they're *mostly* readOnly -- i mean if you create an image the normal way, you don't get an option19:03
imacdonnthe other part of this that I don't full get ..... the assertion has been made that setting checksum (etc.) should only be allowed if the image status is "queued"19:04
imacdonnwhy would it be bad it we allowed them to be set if (and only if) they are not already set ?19:04
imacdonnThis is why I'm thinking of Immutable, as a generic mechanism for things like this, that might be reusable in the future19:05
rosmaitathat's a good question.  I think the idea is that once the image goes 'active', all these immutable properties should be frozen19:08
rosmaitabut i don't have a really good argument against your proposal off the top of my head19:08
imacdonndoes the schema get exposed via API somewhere? (so a client could use it to form requests)19:10
rosmaitayes, there are GET v2/schema/* calls19:11
rosmaitahttps://developer.openstack.org/api-ref/image/v2/index.html#image-schemas19:12
imacdonnso I'd be a bit concerned about perverting the meaning of standard attrs like readOnly ... in case a future client implementation "takes the schema seriously"19:12
rosmaitayes, that's probably why 'id' isn't readOnly in the schema19:13
*** spartakos has joined #openstack-glance19:25
*** spartakos has quit IRC20:17
*** gyee has joined #openstack-glance20:24
*** spartakos has joined #openstack-glance20:55
*** priteau has quit IRC21:01
*** spartakos has quit IRC21:08
*** spartakos has joined #openstack-glance21:26
*** rosmaita has left #openstack-glance21:35
*** aniketh has quit IRC21:43
*** itlinux has quit IRC22:09
*** spartakos has quit IRC22:17
*** rcernin has joined #openstack-glance22:25
*** spartakos has joined #openstack-glance23:02
*** itlinux has joined #openstack-glance23:48

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