~lutostag/ubuntu/utopic/maas/1.5.2

« back to all changes in this revision

Viewing changes to utilities/maasdb

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez
  • Date: 2012-03-07 12:46:17 UTC
  • mto: (20.1.1 quantal) (1.2.1)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: package-import@ubuntu.com-20120307124617-tdctc6l9bur4f2ci
Tags: upstream-0.1+bzr232+dfsg
ImportĀ upstreamĀ versionĀ 0.1+bzr232+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
145
145
    if test -d "$DATADIR/base"
146
146
    then
147
147
        maasdb_stop_cluster "$DATADIR"
148
 
        rm -rf -- "$DATADIR"
 
148
        # Removing the data directory may fail because of a race condition
 
149
        # where db/global is nonempty because of a statistics write.  Rather
 
150
        # than block on shutdown, be optimistic and spin on retries.
 
151
        while ! rm -rf -- "$DATADIR"
 
152
        do
 
153
            # If this fails for a more persistent reason, too bad.  Ctrl-C.
 
154
            echo "Retrying deletion of $DATADIR." >&2
 
155
            sleep 0.01
 
156
        done
149
157
    fi
150
158
}
151
159