Remove-user doesn't remove user from list-shares

Bug #1613444 reported by Leo Zhang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Critical
Horacio Durán

Bug Description

Remove-user command removed user from list-users, but the user still exists in list-shares:

details:

leozhang@leozhang-HP-ENVY-dv6-Notebook-PC:~$ juju version
2.0-beta16-xenial-amd64

leozhang@leozhang-HP-ENVY-dv6-Notebook-PC:~$ juju add-user leo
User "leo" added
Please send this command to leo:
    juju register MHcTA2xlbzBEDC1bZmQzNDpkN2ExOjM3MWQ6N2FkZDoyMTY6M2VmZjpmZTFjOmUwOV06MTcwNzATEzEwLjEwOS4yMDcuMzQ6MTcwNzAEIEq-pc56zPcxtmXuMi8h5IpZA-95hXm36kTSdMqMRLXzEwhseGQtdGVzdAA=

"leo" has not been granted access to any models. You can use "juju grant" to grant access.
leozhang@leozhang-HP-ENVY-dv6-Notebook-PC:~$ juju register MHcTA2xlbzBEDC1bZmQzNDpkN2ExOjM3MWQ6N2FkZDoyMTY6M2VmZjpmZTFjOmUwOV06MTcwNzATEzEwLjEwOS4yMDcuMzQ6MTcwNzAEIEq-pc56zPcxtmXuMi8h5IpZA-95hXm36kTSdMqMRLXzEwhseGQtdGVzdAA=
WARNING: The controller proposed "lxd-test" which clashes with an existing controller. The two controllers are entirely different.

Enter a name for this controller: leo-test

Enter a new password:
Confirm password:

Welcome, leo. You are now logged into "leo-test".

There are no models available. You can add models with
"juju add-model", or you can ask an administrator or owner
of a model to grant access to that model with "juju grant".

leozhang@leozhang-HP-ENVY-dv6-Notebook-PC:~$ juju switch lxd-test
leo-test (controller) -> lxd-test:admin@local/default
leozhang@leozhang-HP-ENVY-dv6-Notebook-PC:~$ juju grant leo write default
leozhang@leozhang-HP-ENVY-dv6-Notebook-PC:~$ juju list-shares
NAME ACCESS LAST CONNECTION
admin@local (admin) admin just now
leo@local write never connected

leozhang@leozhang-HP-ENVY-dv6-Notebook-PC:~$ juju list-users
NAME DISPLAY NAME DATE CREATED LAST CONNECTION
admin admin 54 minutes ago just now
leo 1 minute ago 1 minute ago

leozhang@leozhang-HP-ENVY-dv6-Notebook-PC:~$ juju remove-user leo
WARNING! This command will remove the user "leo" from the "lxd-test" controller.

Continue (y/N)? y
User "leo" removed
leozhang@leozhang-HP-ENVY-dv6-Notebook-PC:~$ juju list-users
NAME DISPLAY NAME DATE CREATED LAST CONNECTION
admin admin 55 minutes ago just now

leozhang@leozhang-HP-ENVY-dv6-Notebook-PC:~$ juju list-shares
NAME ACCESS LAST CONNECTION
admin@local (admin) admin just now
leo@local write never connected

Curtis Hovey (sinzui)
Changed in juju-core:
status: New → Triaged
importance: Undecided → Critical
tags: added: blocker ci list-shares regression revoke
Ian Booth (wallyworld)
tags: removed: blocker
Changed in juju-core:
milestone: none → 2.0-beta16
Changed in juju-core:
assignee: nobody → Horacio Durán (hduran-8)
milestone: 2.0-beta16 → 2.0-beta17
Changed in juju-core:
milestone: 2.0-beta17 → 2.0-beta16
Changed in juju-core:
status: Triaged → In Progress
Revision history for this message
Horacio Durán (hduran-8) wrote :

User Removal is leaving behind ModelUsers, it is a bit tricky as modelUsersC is not a global collection and therefore should find a way to craft the txn by hand and run it without id mangling.
I am working on a way to delete these modelUsers or at least prevent the relevant functions to return modelUsers for users marked as deleted.

affects: juju-core → juju
Changed in juju:
milestone: 2.0-beta16 → none
milestone: none → 2.0-beta16
Revision history for this message
Horacio Durán (hduran-8) wrote :
Curtis Hovey (sinzui)
Changed in juju:
milestone: 2.0-beta16 → 2.0-beta17
Changed in juju:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.