Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-40653

Data roles are lost in upgrade from 6.6 - 7.0

    XMLWordPrintable

Details

    Description

      1. Install 6.6.0-7891 - Install travel-sample bucket + create test bucket. Create 3 users - reader (data_reader-test), writer (data_writer-test) and test (full admin)
      2. Offline upgrade to build 7.0.0-2694

      Expected Result - Roles should stay intact after upgrade
      Actual Result - reader and writer users have lost their - data_writer and data_reader roles.

      Note memached crashes during upgrade - https://issues.couchbase.com/browse/MB-40650 -

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          dfinlay Dave Finlay added a comment -

          So, I still see the users in ns-server. You can open an Erlang shell and use the following command to check what's in the user database. Here's what I see:

          21> {ok, R} = dets:open_file("users.dets"), [V || V = {docv2, {user, _ }, _, _} <-dets:traverse(R, fun(X) -> {continue, X} end)].                           
          [{docv2,{user,{"writer",local}},
                  [{roles,[{data_writer,[{"test",
                                          <<"bd4575a1e479a32f14226258615a5700">>},
                                         any,any]}]},
                   {name,[]},
                   {groups,[]}],
                  [{rev,{2,<<"Ô\r\nS">>}},
                   {deleted,false},
                   {last_modified,1595930974065}]},
           {docv2,{user,{"reader",local}},
                  [{roles,[{data_reader,[{"test",
                                          <<"bd4575a1e479a32f14226258615a5700">>},
                                         any,any]}]},
                   {name,[]},
                   {groups,[]}],
                  [{rev,{2,<<"Úª¿í">>}},
                   {deleted,false},
                   {last_modified,1595930974031}]},
           {docv2,{user,{"test",local}},
                  [{roles,[admin]},{name,[]},{groups,[]}],
                  [{rev,{1,<<"y³¡ð">>}},
                   {deleted,false},
                   {last_modified,1595930573328}]}]
          

          What caused you to think the roles were dropped?

          dfinlay Dave Finlay added a comment - So, I still see the users in ns-server. You can open an Erlang shell and use the following command to check what's in the user database. Here's what I see: 21> {ok, R} = dets:open_file("users.dets"), [V || V = {docv2, {user, _ }, _, _} <-dets:traverse(R, fun(X) -> {continue, X} end)]. [{docv2,{user,{"writer",local}}, [{roles,[{data_writer,[{"test", <<"bd4575a1e479a32f14226258615a5700">>}, any,any]}]}, {name,[]}, {groups,[]}], [{rev,{2,<<"Ô\r\nS">>}}, {deleted,false}, {last_modified,1595930974065}]}, {docv2,{user,{"reader",local}}, [{roles,[{data_reader,[{"test", <<"bd4575a1e479a32f14226258615a5700">>}, any,any]}]}, {name,[]}, {groups,[]}], [{rev,{2,<<"Úª¿í">>}}, {deleted,false}, {last_modified,1595930974031}]}, {docv2,{user,{"test",local}}, [{roles,[admin]},{name,[]},{groups,[]}], [{rev,{1,<<"y³¡ð">>}}, {deleted,false}, {last_modified,1595930573328}]}] What caused you to think the roles were dropped?
          ritam.sharma Ritam Sharma added a comment - - edited

          With latest build, the user show up correctly. For user that are attached with bucket[*], the role translation is correct - [*.*.*].

          Enterprise Edition 7.0.0 build 3545

          ritam.sharma Ritam Sharma added a comment - - edited With latest build, the user show up correctly. For user that are attached with bucket [*] , the role translation is correct - [*.*.*] . Enterprise Edition 7.0.0 build 3545

          People

            ritam.sharma Ritam Sharma
            ritam.sharma Ritam Sharma
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty