| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-nova - 2018-02-07 | |||
| 20:11:44 | mriedem | by default, we have both versioned and unversioned notifications enabled, | |
| 20:11:56 | mriedem | and versioned notifications do a lot of lazy-loading of fields to build the notification payload | |
| 20:11:58 | cdent | well it's a good idea nonetheless as I'm trying to remove as much stuff I don't care about™ as possible | |
| 20:12:06 | cdent | and at the moment, notifications are basically noise | |
| 20:12:20 | mriedem | yeah - take a note of what impact disabling that makes if you can | |
| 20:12:39 | mriedem | i.e. we might want to consider changing the default | |
| 20:14:49 | mriedem | looks like we might have a rogue unit test http://logs.openstack.org/74/541474/2/check/openstack-tox-py27/a6dfdf8/testr_results.html.gz | |
| 20:16:29 | mriedem | and another one http://logs.openstack.org/08/541008/5/check/openstack-tox-py27/c3a8321/testr_results.html.gz | |
| 20:16:29 | mriedem | gdi | |
| 20:24:41 | mriedem | mordred: apparently that glanceclient.common.utils.strip_version thing isn't working here https://review.openstack.org/#/c/541008/ | |
| 20:26:03 | mordred | mriedem: looking | |
| 20:26:38 | mordred | 541008 | |
| 20:26:40 | mordred | gah | |
| 20:29:43 | mordred | mriedem: well, at least if fails in unittests - that's nice | |
| 20:29:44 | mriedem | mordred: i see the problem | |
| 20:29:56 | mriedem | it doesn't expect the 'image' prefix on the path | |
| 20:30:04 | mriedem | >>> url = 'http://23.253.94.203/v2' | |
| 20:30:04 | mriedem | >>> url_parts = urlparse.urlparse(url) | |
| 20:30:04 | mriedem | >>> url_parts | |
| 20:30:04 | mriedem | ParseResult(scheme='http', netloc='23.253.94.203', path='/v2', params='', query='', fragment='') | |
| 20:30:04 | mriedem | >>> utils.strip_version(url) | |
| 20:30:05 | mriedem | ('http://23.253.94.203', 2.0) | |
| 20:30:05 | mriedem | >>> | |
| 20:30:57 | mordred | oh. bother. yeah | |
| 20:37:00 | mriedem | https://bugs.launchpad.net/python-glanceclient/+bug/1748009 | |
| 20:37:01 | openstack | Launchpad bug 1748009 in Glance Client "glanceclient.common.utils.strip_version doesn't handle a service type in the path" [Undecided,New] | |
| 20:37:18 | mordred | mriedem: update coming for ya | |
| 20:38:16 | mriedem | here is my hacktastic workaround | |
| 20:38:17 | mriedem | >>> url.replace('image/', '') | |
| 20:38:17 | mriedem | 'http://23.253.94.203/v2' | |
| 20:38:17 | mriedem | >>> url = url.replace('image/', '') | |
| 20:38:17 | mriedem | >>> utils.strip_version(url) | |
| 20:38:17 | mriedem | ('http://23.253.94.203', 2.0) | |
| 20:40:55 | mordred | mriedem: right - but that's not going to work if you need image in the url | |
| 20:42:41 | mordred | mriedem: I think it's better to just ditch strip_version, lop off a trailing /v2 and be done with it - then we can circle back around and talk about a better plan for all of this in dublin :) | |
| 20:44:01 | mriedem | yeah good point | |
| 20:46:07 | mriedem | >>> import re | |
| 20:46:07 | mriedem | >>> url = 'http://23.253.94.203/image/v2' | |
| 20:46:07 | mriedem | >>> re.sub('v\d+\.?\d*', '', url) | |
| 20:46:07 | mriedem | 'http://23.253.94.203/image/' | |
| 20:46:07 | mriedem | >>> | |
| 20:46:16 | mriedem | \O/ | |
| 20:47:35 | openstackgerrit | Merged openstack/python-novaclient master: Fix listing of instances above API max_limit https://review.openstack.org/534222 | |
| 20:48:10 | dansmith | mriedem: that would match "v2." right? | |
| 20:48:45 | dansmith | and it would also match "myapi-123.novav2.foo.com" | |
| 20:48:48 | mriedem | farq yes it will | |
| 20:49:05 | mriedem | i'm basically copying the existing glanceclient utility http://git.openstack.org/cgit/openstack/python-glanceclient/tree/glanceclient/common/utils.py#n383 | |
| 20:49:19 | mriedem | well, | |
| 20:49:30 | mriedem | you can always use CONF.glance.api_servers (like everyone has had to forever) if you don't like it | |
| 20:49:56 | dansmith | I guess we do this a lot, but re magic replacements on the url we don't control is playing with fire | |
| 20:50:26 | mriedem | i know | |
| 20:50:28 | mriedem | how about | |
| 20:50:28 | mriedem | >>> re.sub('/v\d+\.?\d*', '/', url) | |
| 20:50:28 | mriedem | 'http://23.253.94.203/image/' | |
| 20:50:42 | mriedem | since / is a special character, | |
| 20:50:49 | mriedem | i don't know if it's legit to have myapi-123.nova/v2.foo.com | |
| 20:50:59 | dansmith | it's not | |
| 20:51:11 | mriedem | so is that a smaller fire at least? | |
| 20:51:16 | mriedem | otherwise we have to release note this bug | |
| 20:51:19 | dansmith | so I would group the dot and the decimal and require them together or not at all | |
| 20:51:38 | dansmith | (\.\d+)? | |
| 20:51:51 | dansmith | and require / at the end immediately after the last digit | |
| 20:52:06 | dansmith | so "/v2.0oohhmy/" doesn't match | |
| 20:54:35 | dansmith | naw mean? | |
| 20:54:52 | mriedem | i don't regex well | |
| 20:55:17 | mriedem | >>> re.sub('/v\d+(\.\d+)?', '', 'http://23.253.94.203/image/v2.0') | |
| 20:55:18 | mriedem | 'http://23.253.94.203/image' | |
| 20:55:18 | mriedem | ? | |
| 20:56:01 | dansmith | re.sub('/\d+(\.\d+)?/', '/', url) | |
| 20:56:44 | mriedem | that doesn't work | |
| 20:56:58 | dansmith | hrm yeah | |
| 20:57:59 | openstackgerrit | Merged openstack/nova master: XenAPI: Provide support matrix and doc for VGPU https://review.openstack.org/540808 | |
| 20:58:48 | dansmith | because no trailing slash in your example | |
| 20:59:05 | dansmith | so I guess you can't do that | |
| 20:59:10 | mriedem | yar | |
| 20:59:16 | dansmith | does pinning to $ work because you know it'll be the end? | |
| 20:59:51 | dansmith | re.sub(r'/v\d+(\.\d+)?/?$', '/', 'http://thing.novav2.0oh.v2.foo/image/v2/') | |
| 21:00:02 | dansmith | allow one trailing slash, but otherwise the v2 has to be at the end | |
| 21:00:28 | dansmith | anyway, I'm probably being too OCD about it | |
| 21:00:57 | mriedem | yeah that works too | |
| 21:01:21 | mriedem | i might just add a known issue release note to the patch as well, | |
| 21:01:36 | mriedem | saying, we make a best attempt given the glanceclient bug, but if it doesn't work for you, use CONF.glance.api_servers | |
| 21:01:44 | dansmith | yeah | |
| 21:02:36 | melwitt | cells meeting | |
| 21:07:12 | cdent | dansmith: turns out I didn't have notifications turned on | |
| 21:07:18 | dansmith | cdent: dang :) | |
| 21:07:49 | cdent | so rabbit's a pig | |
| 21:08:09 | cdent | evidently it's a pig without realy doing anything | |
| 21:10:39 | mordred | mriedem: http://paste.openstack.org/show/665249 | |
| 21:11:58 | mriedem | cdent: are you sure? the default is both - did you explicitly configure it? | |
| 21:13:05 | cdent | mriedem: I may be confused. As I understand both is the default only if you have 'notify_on_state_change' set to something and the default for that is to not be set. | |
| 21:13:35 | mriedem | cdent: notify_on_state_change is only for instance updates | |
| 21:13:41 | mriedem | we notify the shit out of you for everything else | |
| 21:13:44 | mriedem | any action taken on an instance | |
| 21:13:53 | mriedem | plus steady state | |
| 21:14:01 | mriedem | "NOTIFY HI I AM STILL WORKING!" | |
| 21:14:11 | cdent | hmmm, the docs are not helping me much here, I will try harder | |
| 21:14:44 | mriedem | https://docs.openstack.org/nova/latest/configuration/config.html#notifications | |
| 21:15:04 | mriedem | set notification_format=unversioned | |
| 21:15:13 | mriedem | i guess we don't have anything for just disabling notifications altogether :( | |