| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-sdks - 2020-03-02 | |||
| 16:11:54 | mordred | dtantsur: cool! | |
| 16:12:03 | mordred | tosky: looking | |
| 16:15:45 | mordred | tosky: 3 things. a) I'd still prefer migrating to sdk there, since microversion support is solid and we use it in other places and all. HOWEVER b) I don't think we should block forward progress on that, we can certainly migrate later c) that patch should probably be fixed to pass tests - all of the previous blockers that existed at the time of that patch originally should not exist anymore | |
| 16:18:25 | tosky | mordred: that's good to hear (all of it) - could you please comment on the patch? :) | |
| 16:19:18 | brtknr | mordred: so uuid not being available too is possibly a bug? | |
| 16:20:33 | mordred | brtknr: yeah, possibly so. where are you seeing the issue? | |
| 16:20:56 | brtknr | for os_coe_cluster and os_coe_cluster_template modules, only id is returned, not uuid | |
| 16:21:24 | brtknr | looks like the corresponding ansible module expects to see uuid field which leads to issues with idempotency | |
| 16:21:41 | mordred | brtknr: that's super weird :) | |
| 16:21:46 | brtknr | sorry the get_coe_cluster and get_coe_cluster_template functions | |
| 16:22:42 | mordred | brtknr: oh - that's even weirder. that's teh cloud layer, becuase it's for ansible. I'm not sure that's _ever_ returned uuid - so I have no idea how those ansible modules worked? looking further though .,.. | |
| 16:23:04 | brtknr | mordred: wait, only get_coe_cluster has this problem | |
| 16:23:15 | brtknr | get_coe_cluster_template seems to return uuid as an alias | |
| 16:24:09 | mordred | brtknr: yes - I agree with you | |
| 16:24:18 | mordred | cluster template adds it ba k | |
| 16:24:37 | brtknr | mordred: can you show me the code? | |
| 16:25:04 | brtknr | mordred: dont worry, i will try to find it myself, i should stop being lazy | |
| 16:25:09 | mordred | brtknr: https://opendev.org/openstack/openstacksdk/src/branch/master/openstack/cloud/_normalize.py#L1026-L1032 is where cluster_template adds it back if strict == False | |
| 16:25:30 | mordred | and you can see that https://opendev.org/openstack/openstacksdk/src/branch/master/openstack/cloud/_normalize.py#L971-L997 doens't do a similar thing | |
| 16:26:07 | brtknr | ouch | |
| 16:26:29 | brtknr | who'd like to propose a patch? | |
| 16:26:53 | brtknr | I'm happy to if people are busy :) | |
| 16:28:07 | brtknr | Actually I am not sure what this strict_mode is about | |
| 16:31:14 | brtknr | found the reno: https://github.com/openstack/openstacksdk/blob/master/releasenotes/notes/strict-mode-d493abc0c3e87945.yaml | |
| 16:35:53 | mordred | brtknr: the idea was that we'd have a consistent interface peopel could count on - as well as fallback values | |
| 16:36:28 | mordred | however - that concept pre-dates the merge of shade and sdk. with the sdk objects we have the opportunity to define aliases - and that seems to be a better long-term experience for users anyway | |
| 16:37:03 | mordred | we've been working on shifting the shade layer to using the sdk resource objects and getting rid of that normalize layer - but havne't made it to the coe methods yet | |
| 16:37:16 | openstackgerrit | Rodolfo Alonso Hernandez proposed openstack/openstacksdk master: Include "fields" to "SecurityGroup" query parameters https://review.opendev.org/710820 | |
| 16:37:58 | mordred | brtknr: if you have a sec, you could probably just cargo-cult in an if not strict_mode: add back uuid patch to keep it simple for the time being - and we can see about migrating the methods as a followup | |
| 16:39:05 | larsks | mordred: Do you know if there is a particular reason that volume.volumes(details=True) doesn't return the user_id information from the remote response? | |
| 16:41:04 | openstackgerrit | Bharat Kunwar proposed openstack/openstacksdk master: Return uuid alias for coe_cluster in non strict mode https://review.opendev.org/710823 | |
| 16:41:08 | brtknr | mordred: ^ | |
| 16:41:36 | mordred | larsks: looking | |
| 16:42:09 | mordred | brtknr: looks great. it's possible a test mock will need to get updated as a result - but let's see how it goes | |
| 16:42:31 | openstackgerrit | Rodolfo Alonso Hernandez proposed openstack/python-openstackclient master: Add "fields" parameter to ListSecurityGroup query https://review.opendev.org/710825 | |
| 16:43:34 | mordred | larsks: there is no mention of user_id in openstack/block_storage/v3/volume.py - so I think it's purely that it's missing and not anything on purpose | |
| 16:43:56 | larsks | mordred: thanks. I was just curious if the omission was intentional or not. I'll submit a change. | |
| 16:45:08 | brtknr | mordred: locally, all my tox -e py36 failures are related to cloud devstack not found as I export OS_CLOUD=devstack to my env vars | |
| 16:46:02 | mordred | brtknr: hah. nice | |
| 16:46:12 | mordred | brtknr: well - let's see what zuul tells us :) | |
| 16:46:23 | brtknr | mordred: also TIL what cargo cult means | |
| 16:46:42 | mordred | brtknr: :) | |
| 16:47:19 | brtknr | If this patch goes through, it will void this patch: https://review.opendev.org/#/c/709734/ | |
| 16:48:44 | brtknr | py36: commands succeeded | |
| 16:48:46 | brtknr | congratulations :) | |
| 16:48:57 | brtknr | after unsetting OS_CLOUD | |
| 16:49:26 | mordred | brtknr: I think we should land that patch too - it describes the current state - and somone might have those modules and _not_ latest sdk - and the id codepath you did is always going to work | |
| 16:50:00 | mordred | when the uuid codepath lands in sdk it'll improve things for people and then we can add a doc that says uuid will be an alias in the return value if sdk is new enough | |
| 16:50:07 | brtknr | hmm this seems to highlight an underlying problem, why is tox -e py36 fail when I export OS_CLOUD= | |
| 16:50:28 | brtknr | mordred: sounds good to me | |
| 16:50:37 | brtknr | I will revert the change to the doc | |
| 16:50:54 | brtknr | btw how the hell do you use ansible-collection-openstack? | |
| 16:51:16 | brtknr | Its not available on galaxy yet so cant use ansible-galaxy to install it | |
| 16:51:42 | smcginnis | brtknr: I haven't been following the conversation here, but sound like the OS_CLOUD issue might be a side effect of this: https://opendev.org/openstack/ansible-collections-openstack/src/branch/master/tox.ini#L10 | |
| 16:51:56 | mordred | brtknr: no - don't revert it - I think it's solid | |
| 16:52:01 | mordred | brtknr: it's the right thing | |
| 16:52:21 | mordred | brtknr: you need to build a tarball from source then you can install the tarball | |
| 16:52:30 | mordred | we're working on getting galaxy pub working | |
| 16:52:43 | mordred | brtknr: I recommend using tox -ebuild to make the tarball | |
| 16:52:50 | mordred | otherwise it's going to have a sad | |
| 16:52:59 | brtknr | revert line 190 here: https://review.opendev.org/#/c/709734/4/plugins/modules/os_coe_cluster.py | |
| 16:53:16 | mordred | no - don't revert that | |
| 16:53:21 | mordred | your comment there is correct | |
| 16:53:43 | brtknr | Ah okay fair enough | |
| 16:53:51 | mordred | that _is_ the situation most users will encounter - they won't see uuid unless they install an as-yet-unreleased sdk :) | |
| 16:54:17 | brtknr | mordred: is it correct that when a cluster gets *created* then uuid is returned? | |
| 16:54:35 | brtknr | shouldn't the uuid get normalised in the same way for create requests too? | |
| 16:54:38 | mordred | it shouldn't - it should be the same data structure all the time | |
| 16:54:40 | mordred | yup | |
| 16:55:07 | brtknr | ok so thats another bummer, it returns uuid at present | |
| 16:55:15 | brtknr | when cluster get created | |
| 16:55:29 | mordred | wow really? | |
| 16:56:09 | brtknr | yes sorry | |
| 16:56:20 | mordred | so that means we're not running normalize on the result of create - which is sadmaking. maybe we need to do a workaround in the ansible module itself | |
| 16:56:53 | mordred | to grab the id in both cases with a get('id', get('uuid') - then make sure both id and uuid are set in the dict before we return to teh ansible user | |
| 16:57:03 | mordred | cause otherwise this is just a mess for the user | |
| 16:58:31 | brtknr | that is the premise of the patch | |
| 16:58:50 | brtknr | its what i am already proposing we do with that patch | |
| 17:00:01 | mordred | cool. then yes - I think we should land that patch asap | |
| 17:00:13 | mordred | Shrews: ^^ feel like an easy +A? I know you like patches with no context | |
| 17:00:25 | Shrews | so much | |
| 17:00:27 | brtknr | :D | |
| 17:00:38 | mordred | brtknr: oh - actually - one more thing... | |
| 17:01:47 | mordred | brtknr: real quick ... or I can update the patch if you're packing up | |
| 17:01:54 | mordred | brtknr: (left inline comment) | |
| 17:02:10 | Shrews | mordred: let's pretend i haven't read the backscroll yet. is 709734 the thing you referred to? | |
| 17:03:08 | Shrews | that looks doubtful. /me just reads bs | |
| 17:03:12 | mordred | Shrews: yes. and the tl;dr is that normalization of cluster_template dicts is blown and we forgot to add the 'uuid' field back to the dict, but the ansible docs and module refer to uuid not id | |
| 17:04:07 | mordred | there's an sdk fix to add uuid - but of course latest module doesn't mean latest sdk - so there's also a patch to the module to work around the fact that it might not get uuid back - but a user might be expecting it to exist because of the docs saying it's there | |
| 17:07:25 | brtknr | mordred: done | |
| 17:07:26 | openstackgerrit | Bharat Kunwar proposed openstack/ansible-collections-openstack master: os_coe_cluster: Retrive id/uuid correctly https://review.opendev.org/709734 | |
| 17:08:05 | mordred | brtknr: thanks! | |
| 17:08:16 | brtknr | is cluster['id'] = cluster['uuid'] = cluster_id okay? | |
| 17:08:39 | brtknr | mordred: or is that bad practice? | |
| 17:08:39 | Shrews | shouldn't the changelog fragment at least mention the module being fixed? not sure that that is clear when just reading the resulting log | |
| 17:09:38 | brtknr | Shrews: done | |
| 17:09:39 | openstackgerrit | Bharat Kunwar proposed openstack/ansible-collections-openstack master: os_coe_cluster: Retrive id/uuid correctly https://review.opendev.org/709734 | |
| 17:09:43 | mordred | brtknr: I think it's fine in this case - not sure if pep8 will agree or not :) | |
| 17:10:31 | brtknr | I'm running pep8 locally | |
| 17:10:37 | brtknr | band it succeeds | |