CouchDB
  1. CouchDB
  2. COUCHDB-680

Security on CouchDB set via Futon does not persist after server restart

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 0.10.1
    • Fix Version/s: 1.3
    • Component/s: None
    • Environment:

      CouchDB 0.11.0b915670 on windowsXP

    • Skill Level:
      Regular Contributors Level (Easy to Medium)

      Description

      I can set the security on a database via Futon. However a server reboot wipes out the setting.

        Activity

        Hide
        Chris Anderson added a comment -

        Can anyone reproduce this?

        I don't have Windows handy, but I've never seen anything like this on OS X. How much time are you giving CouchDB after creating the _security object? Are you creating any documents or just immediately restarting? What method are you using for restart?

        Maybe we should add an ensure_full_commit after the _security update.

        I'll need to see this reproduced before I can start to fix it.

        Show
        Chris Anderson added a comment - Can anyone reproduce this? I don't have Windows handy, but I've never seen anything like this on OS X. How much time are you giving CouchDB after creating the _security object? Are you creating any documents or just immediately restarting? What method are you using for restart? Maybe we should add an ensure_full_commit after the _security update. I'll need to see this reproduced before I can start to fix it.
        Hide
        Mark Hammond added a comment -

        I can't reproduce this on a 0.11 snapshot. If you can reproduce this, it might be worthwhile to check if a server reboot really is required or just a couchdb restart - I'd be very surprised if it was the former.

        Show
        Mark Hammond added a comment - I can't reproduce this on a 0.11 snapshot. If you can reproduce this, it might be worthwhile to check if a server reboot really is required or just a couchdb restart - I'd be very surprised if it was the former.
        Hide
        Ben Schwarz added a comment -

        I could have sworn that I had reported the exact same issue. This was on mac running HEAD.
        The objects are created in futon, there when refreshed login, logout, still persisted.

        Restarting the couch server and refreshing the security options for the database in futon shows
        no security whatsoever.

        I since stopped testing / trying to use the feature because I deemed it as "not ready yet".

        I'd suggest a re-test on HEAD

        Show
        Ben Schwarz added a comment - I could have sworn that I had reported the exact same issue. This was on mac running HEAD. The objects are created in futon, there when refreshed login, logout, still persisted. Restarting the couch server and refreshing the security options for the database in futon shows no security whatsoever. I since stopped testing / trying to use the feature because I deemed it as "not ready yet". I'd suggest a re-test on HEAD
        Hide
        Chris Anderson added a comment -

        I'm unable to reproduce this (tried a few times on my machine.)

        The only things I can think of are:

        A) It's really a Futon issue that's being reported as a DB issue.

        B) You are restarting CouchDB so quickly after updating the security objects that it doesn't have time to fsync. I've added a call to ensure_full_commit so that PUT to /db/_security will not return until after an fsync. I think this is a fine thing to do as setting the security will happen rarely, and the consequences of losing such an update due to power outage are greater than the consequences of losing a document update.

        This was added in r918855 and backported to 0.11.x in r918856. Please update to the latest code and try to reproduce.

        If no one is able to reproduce I will close this issue.

        Thanks,
        Chris

        Show
        Chris Anderson added a comment - I'm unable to reproduce this (tried a few times on my machine.) The only things I can think of are: A) It's really a Futon issue that's being reported as a DB issue. B) You are restarting CouchDB so quickly after updating the security objects that it doesn't have time to fsync. I've added a call to ensure_full_commit so that PUT to /db/_security will not return until after an fsync. I think this is a fine thing to do as setting the security will happen rarely, and the consequences of losing such an update due to power outage are greater than the consequences of losing a document update. This was added in r918855 and backported to 0.11.x in r918856. Please update to the latest code and try to reproduce. If no one is able to reproduce I will close this issue. Thanks, Chris
        Hide
        Jan Lehnardt added a comment -

        Bump to 1.3.x.

        Show
        Jan Lehnardt added a comment - Bump to 1.3.x.

          People

          • Assignee:
            Unassigned
            Reporter:
            Phat Loc
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development