Skip to content

Some rolebindingrestrictions cannot be storage migrated because of a missing namespace #15006

Closed

Description

@smarterclayton

From a prod dataset being tested in #14999. Migration being run on some role binding restrictions is failing.

error:     -n AAA rolebindingrestrictions/match-project-admin-user: namespaces "AAA" not found
error:     -n BBB rolebindingrestrictions/match-project-admin-user: namespaces "BBB" not found

First, this means that something in the update path is checking for namespace existence on these RBRs. However, if the namespace isn't being changed during an RBR, it shouldn't be checked. That's probably the minimal bug that needs to be fixed here.

However, if the namespace doesn't exist, why is the RBR blocking? RBR shouldn't require a namespace to exist in order to mutate it, unless permission checks are required, and if permission checks ARE required, then it needs to be cleaned up prior to deletion, which it apparently was not.

Would like an answer before we deploy 3.6 to a prod env on Wednesday

@jupierce @Miciah

Activity

  1. added this to the 3.6.0 milestone on Jul 2, 2017
  2. deads2k commented on Jul 5, 2017

    @deads2k
    Contributor

    First, this means that something in the update path is checking for namespace existence on these RBRs

    Namespace lifecycle admission plugin?

  3. Miciah commented on Jul 5, 2017

    @Miciah
    Contributor

    Namespace lifecycle admission plugin?

    I don't see a reason that would affect rolebindingrestrictions specifically though.

  4. deads2k commented on Jul 5, 2017

    @deads2k
    Contributor

    I don't see a reason that would affect rolebindingrestrictions specifically though.

    You didn't get cleaned up when a namespace was deleted. I remember a bug about it.

  5. Miciah commented on Jul 5, 2017

    @Miciah
    Contributor

    That would be #13563.

    We cleaned up the rolebindingrestrictions that had been created before we fixed the problem, but maybe this cluster got left out of the cleanup. I'll dig up the script we gave to ops.

    @smarterclayton, do we need to fix anything in migration if these are just rolebindingrestrictions that were created before we fixed the namespace controller to reap rolebindingrestrictions?

  6. jupierce commented on Jul 5, 2017

    @jupierce
    Contributor

    @Miciah sent these scripts to the CD team. We will be running them on our free & starter clusters to ensure there are no hiccups during their eventual migration. @smarterclayton ok to remove as delivery-blocker?

  7. smarterclayton commented on Jul 6, 2017

    @smarterclayton
    ContributorAuthor
  8. smarterclayton commented on Jul 7, 2017

    @smarterclayton
    ContributorAuthor

    Note that this failure breaks upgrades for users (now that storage migration is in the upgrade path). So will have to be fixed in 3.6.x.

  9. assigned and unassigned on Jul 11, 2017
  10. 1 remaining item

  11. enj commented on Jul 11, 2017

    @enj
    Contributor

    @smarterclayton the namespace lifecycle bits are fixed now and I helped @jupierce clean up the upgrade issues. Based on my discussions with @liggitt our customers are unlikely to hit this since online is the primary user of RBR. Thus I do not think we need to add complexity to our ansible flow to handle auto deleting these orphaned objects. WDYT?

  12. smarterclayton commented on Jul 12, 2017

    @smarterclayton
    ContributorAuthor
  13. enj commented on Jul 12, 2017

    @enj
    Contributor

    I do not know what you mean by "full migration" - storage migration runs with --include=* as of openshift/openshift-ansible/pull/4533

  14. smarterclayton commented on Jul 12, 2017

    @smarterclayton
    ContributorAuthor

    Yes, that is full migration.

  15. smarterclayton commented on Jul 12, 2017

    @smarterclayton
    ContributorAuthor

    So I still expect a fix in master (maybe not for 3.6.0) which prevents updates on role binding restrictions that are invalid from failing if the user hasn't changed something. Updates that don't change shouldn't fail, period.

  16. liggitt commented on Jul 18, 2017

    @liggitt
    Contributor

    So I still expect a fix in master (maybe not for 3.6.0) which prevents updates on role binding restrictions that are invalid from failing if the user hasn't changed something. Updates that don't change shouldn't fail, period.

    I thought the point of the migration tool was that there might be changes server-side (in storage content-type or version) that wouldn't be observable from the client side.

  17. modified the milestones: , 3.6.0 on Aug 1, 2017
  18. added a commit that references this issue on Aug 13, 2017
  19. adelton commented on Sep 8, 2017

    @adelton
    Contributor

    @smarterclayton, so what is the best way to determine that user hasn't changed anything?

    Also, how about @liggitt's point that user might not have changed anything but there might be changes forced by something on server's side?

    In general, isn't this mostly about the architecture of the upgrades and user experience? How exactly is this related to component/auth or area/security?

  20. smarterclayton commented on Sep 8, 2017

    @smarterclayton
    ContributorAuthor
  21. enj commented on Sep 8, 2017

    @enj
    Contributor

    what is the best way to determine that user hasn't changed anything?

    So migrate can always tell if something was changed when the resource version returned is different (but the change could be only on the server side and the client did not actually change anything).

    But there is not a good way to guarantee that an update that changes nothing from the client's prescriptive never fails.

  22. added a commit that references this issue on Sep 14, 2017
    83c5b94
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions