| 1 | Sat Sep 3 12:09:20 PDT 2011 Kevan Carstensen <kevan@isnotajoke.com> |
|---|
| 2 | * cli: make --mutable-type imply --mutable in 'tahoe put' |
|---|
| 3 | |
|---|
| 4 | New patches: |
|---|
| 5 | |
|---|
| 6 | [cli: make --mutable-type imply --mutable in 'tahoe put' |
|---|
| 7 | Kevan Carstensen <kevan@isnotajoke.com>**20110903190920 |
|---|
| 8 | Ignore-this: 23336d3c43b2a9554e40c2a11c675e93 |
|---|
| 9 | ] { |
|---|
| 10 | hunk ./src/allmydata/scripts/cli.py 196 |
|---|
| 11 | if self['mutable-type'] and self['mutable-type'] not in ("sdmf", "mdmf"): |
|---|
| 12 | raise usage.UsageError("%s is an invalid format" % self['mutable-type']) |
|---|
| 13 | |
|---|
| 14 | + if self['mutable-type']: |
|---|
| 15 | + self['mutable'] = True |
|---|
| 16 | + |
|---|
| 17 | |
|---|
| 18 | def getSynopsis(self): |
|---|
| 19 | return "Usage: %s put [options] LOCAL_FILE REMOTE_FILE" % (self.command_name,) |
|---|
| 20 | hunk ./src/allmydata/test/test_cli.py 1201 |
|---|
| 21 | d.addCallback(self._check_sdmf_json) |
|---|
| 22 | return d |
|---|
| 23 | |
|---|
| 24 | + def test_mutable_type_implies_mutable(self): |
|---|
| 25 | + self.basedir = "cli/Put/mutable_type_implies_mutable" |
|---|
| 26 | + self.set_up_grid() |
|---|
| 27 | + data = "data" * 100000 |
|---|
| 28 | + fn1 = os.path.join(self.basedir, "data") |
|---|
| 29 | + fileutil.write(fn1, data) |
|---|
| 30 | + d = self.do_cli("put", "--mutable-type=mdmf", fn1) |
|---|
| 31 | + d.addCallback(lambda (rc, cap, err): |
|---|
| 32 | + self.do_cli("ls", "--json", cap)) |
|---|
| 33 | + # This will fail if an immutable file is created instead of a |
|---|
| 34 | + # mutable file. |
|---|
| 35 | + d.addCallback(self._check_mdmf_json) |
|---|
| 36 | + d.addCallback(lambda ignored: |
|---|
| 37 | + self.do_cli("put", "--mutable-type=sdmf", fn1)) |
|---|
| 38 | + d.addCallback(lambda (rc, cap, err): |
|---|
| 39 | + self.do_cli("ls", "--json", cap)) |
|---|
| 40 | + d.addCallback(self._check_sdmf_json) |
|---|
| 41 | + return d |
|---|
| 42 | + |
|---|
| 43 | def test_put_to_mdmf_cap(self): |
|---|
| 44 | self.basedir = "cli/Put/put_to_mdmf_cap" |
|---|
| 45 | self.set_up_grid() |
|---|
| 46 | } |
|---|
| 47 | |
|---|
| 48 | Context: |
|---|
| 49 | |
|---|
| 50 | [improve the storage/mutable.py asserts even more |
|---|
| 51 | warner@lothar.com**20110901160543 |
|---|
| 52 | Ignore-this: 5b2b13c49bc4034f96e6e3aaaa9a9946 |
|---|
| 53 | ] |
|---|
| 54 | [storage/mutable.py: special characters in struct.foo arguments indicate standard as opposed to native sizes, we should be using these characters in these asserts |
|---|
| 55 | wilcoxjg@gmail.com**20110901084144 |
|---|
| 56 | Ignore-this: 28ace2b2678642e4d7269ddab8c67f30 |
|---|
| 57 | ] |
|---|
| 58 | [docs/write_coordination.rst: fix formatting and add more specific warning about access via sshfs. |
|---|
| 59 | david-sarah@jacaranda.org**20110831232148 |
|---|
| 60 | Ignore-this: cd9c851d3eb4e0a1e088f337c291586c |
|---|
| 61 | ] |
|---|
| 62 | [test_mutable.Version: consolidate some tests, reduce runtime from 19s to 15s |
|---|
| 63 | warner@lothar.com**20110831050451 |
|---|
| 64 | Ignore-this: 64815284d9e536f8f3798b5f44cf580c |
|---|
| 65 | ] |
|---|
| 66 | [mutable/retrieve: handle the case where self._read_length is 0. |
|---|
| 67 | Kevan Carstensen <kevan@isnotajoke.com>**20110830210141 |
|---|
| 68 | Ignore-this: fceafbe485851ca53f2774e5a4fd8d30 |
|---|
| 69 | |
|---|
| 70 | Note that the downloader will still fetch a segment for a zero-length |
|---|
| 71 | read, which is wasteful. Fixing that isn't specifically required to fix |
|---|
| 72 | #1512, but it should probably be fixed before 1.9. |
|---|
| 73 | ] |
|---|
| 74 | [NEWS: added summary of all changes since 1.8.2. Needs editing. |
|---|
| 75 | Brian Warner <warner@lothar.com>**20110830163205 |
|---|
| 76 | Ignore-this: 273899b37a899fc6919b74572454b8b2 |
|---|
| 77 | ] |
|---|
| 78 | [test_mutable.Update: only upload the files needed for each test. refs #1500 |
|---|
| 79 | Brian Warner <warner@lothar.com>**20110829072717 |
|---|
| 80 | Ignore-this: 4d2ab4c7523af9054af7ecca9c3d9dc7 |
|---|
| 81 | |
|---|
| 82 | This first step shaves 15% off the runtime: from 139s to 119s on my laptop. |
|---|
| 83 | It also fixes a couple of places where a Deferred was being dropped, which |
|---|
| 84 | would cause two tests to run in parallel and also confuse error reporting. |
|---|
| 85 | ] |
|---|
| 86 | [Let Uploader retain History instead of passing it into upload(). Fixes #1079. |
|---|
| 87 | Brian Warner <warner@lothar.com>**20110829063246 |
|---|
| 88 | Ignore-this: 3902c58ec12bd4b2d876806248e19f17 |
|---|
| 89 | |
|---|
| 90 | This consistently records all immutable uploads in the Recent Uploads And |
|---|
| 91 | Downloads page, regardless of code path. Previously, certain webapi upload |
|---|
| 92 | operations (like PUT /uri/$DIRCAP/newchildname) failed to pass the History |
|---|
| 93 | object and were left out. |
|---|
| 94 | ] |
|---|
| 95 | [Fix mutable publish/retrieve timing status displays. Fixes #1505. |
|---|
| 96 | Brian Warner <warner@lothar.com>**20110828232221 |
|---|
| 97 | Ignore-this: 4080ce065cf481b2180fd711c9772dd6 |
|---|
| 98 | |
|---|
| 99 | publish: |
|---|
| 100 | * encrypt and encode times are cumulative, not just current-segment |
|---|
| 101 | |
|---|
| 102 | retrieve: |
|---|
| 103 | * same for decrypt and decode times |
|---|
| 104 | * update "current status" to include segment number |
|---|
| 105 | * set status to Finished/Failed when download is complete |
|---|
| 106 | * set progress to 1.0 when complete |
|---|
| 107 | |
|---|
| 108 | More improvements to consider: |
|---|
| 109 | * progress is currently 0% or 100%: should calculate how many segments are |
|---|
| 110 | involved (remembering retrieve can be less than the whole file) and set it |
|---|
| 111 | to a fraction |
|---|
| 112 | * "fetch" time is fuzzy: what we want is to know how much of the delay is not |
|---|
| 113 | our own fault, but since we do decode/decrypt work while waiting for more |
|---|
| 114 | shares, it's not straightforward |
|---|
| 115 | ] |
|---|
| 116 | [Teach 'tahoe debug catalog-shares about MDMF. Closes #1507. |
|---|
| 117 | Brian Warner <warner@lothar.com>**20110828080931 |
|---|
| 118 | Ignore-this: 56ef2951db1a648353d7daac6a04c7d1 |
|---|
| 119 | ] |
|---|
| 120 | [debug.py: remove some dead comments |
|---|
| 121 | Brian Warner <warner@lothar.com>**20110828074556 |
|---|
| 122 | Ignore-this: 40e74040dd4d14fd2f4e4baaae506b31 |
|---|
| 123 | ] |
|---|
| 124 | [hush pyflakes |
|---|
| 125 | Brian Warner <warner@lothar.com>**20110828074254 |
|---|
| 126 | Ignore-this: bef9d537a969fa82fe4decc4ba2acb09 |
|---|
| 127 | ] |
|---|
| 128 | [MutableFileNode.set_downloader_hints: never depend upon order of dict.values() |
|---|
| 129 | Brian Warner <warner@lothar.com>**20110828074103 |
|---|
| 130 | Ignore-this: caaf1aa518dbdde4d797b7f335230faa |
|---|
| 131 | |
|---|
| 132 | The old code was calculating the "extension parameters" (a list) from the |
|---|
| 133 | downloader hints (a dictionary) with hints.values(), which is not stable, and |
|---|
| 134 | would result in corrupted filecaps (with the 'k' and 'segsize' hints |
|---|
| 135 | occasionally swapped). The new code always uses [k,segsize]. |
|---|
| 136 | ] |
|---|
| 137 | [layout.py: fix MDMF share layout documentation |
|---|
| 138 | Brian Warner <warner@lothar.com>**20110828073921 |
|---|
| 139 | Ignore-this: 3f13366fed75b5e31b51ae895450a225 |
|---|
| 140 | ] |
|---|
| 141 | [teach 'tahoe debug dump-share' about MDMF and offsets. refs #1507 |
|---|
| 142 | Brian Warner <warner@lothar.com>**20110828073834 |
|---|
| 143 | Ignore-this: 3a9d2ef9c47a72bf1506ba41199a1dea |
|---|
| 144 | ] |
|---|
| 145 | [test_mutable.Version.test_debug: use splitlines() to fix buildslaves |
|---|
| 146 | Brian Warner <warner@lothar.com>**20110828064728 |
|---|
| 147 | Ignore-this: c7f6245426fc80b9d1ae901d5218246a |
|---|
| 148 | |
|---|
| 149 | Any slave running in a directory with spaces in the name was miscounting |
|---|
| 150 | shares, causing the test to fail. |
|---|
| 151 | ] |
|---|
| 152 | [test_mutable.Version: exercise 'tahoe debug find-shares' on MDMF. refs #1507 |
|---|
| 153 | Brian Warner <warner@lothar.com>**20110828005542 |
|---|
| 154 | Ignore-this: cb20bea1c28bfa50a72317d70e109672 |
|---|
| 155 | |
|---|
| 156 | Also changes NoNetworkGrid to put shares in storage/shares/ . |
|---|
| 157 | ] |
|---|
| 158 | [test_mutable.py: oops, missed a .todo |
|---|
| 159 | Brian Warner <warner@lothar.com>**20110828002118 |
|---|
| 160 | Ignore-this: fda09ae86481352b7a627c278d2a3940 |
|---|
| 161 | ] |
|---|
| 162 | [test_mutable: merge davidsarah's patch with my Version refactorings |
|---|
| 163 | warner@lothar.com**20110827235707 |
|---|
| 164 | Ignore-this: b5aaf481c90d99e33827273b5d118fd0 |
|---|
| 165 | ] |
|---|
| 166 | [Make the immutable/read-only constraint checking for MDMF URIs identical to that for SSK URIs. refs #393 |
|---|
| 167 | david-sarah@jacaranda.org**20110823012720 |
|---|
| 168 | Ignore-this: e1f59d7ff2007c81dbef2aeb14abd721 |
|---|
| 169 | ] |
|---|
| 170 | [Additional tests for MDMF URIs and for zero-length files. refs #393 |
|---|
| 171 | david-sarah@jacaranda.org**20110823011532 |
|---|
| 172 | Ignore-this: a7cc0c09d1d2d72413f9cd227c47a9d5 |
|---|
| 173 | ] |
|---|
| 174 | [Additional tests for zero-length partial reads and updates to mutable versions. refs #393 |
|---|
| 175 | david-sarah@jacaranda.org**20110822014111 |
|---|
| 176 | Ignore-this: 5fc6f4d06e11910124e4a277ec8a43ea |
|---|
| 177 | ] |
|---|
| 178 | [test_mutable.Version: factor out some expensive uploads, save 25% runtime |
|---|
| 179 | Brian Warner <warner@lothar.com>**20110827232737 |
|---|
| 180 | Ignore-this: ea37383eb85ea0894b254fe4dfb45544 |
|---|
| 181 | ] |
|---|
| 182 | [SDMF: update filenode with correct k/N after Retrieve. Fixes #1510. |
|---|
| 183 | Brian Warner <warner@lothar.com>**20110827225031 |
|---|
| 184 | Ignore-this: b50ae6e1045818c400079f118b4ef48 |
|---|
| 185 | |
|---|
| 186 | Without this, we get a regression when modifying a mutable file that was |
|---|
| 187 | created with more shares (larger N) than our current tahoe.cfg . The |
|---|
| 188 | modification attempt creates new versions of the (0,1,..,newN-1) shares, but |
|---|
| 189 | leaves the old versions of the (newN,..,oldN-1) shares alone (and throws a |
|---|
| 190 | assertion error in SDMFSlotWriteProxy.finish_publishing in the process). |
|---|
| 191 | |
|---|
| 192 | The mixed versions that result (some shares with e.g. N=10, some with N=20, |
|---|
| 193 | such that both versions are recoverable) cause problems for the Publish code, |
|---|
| 194 | even before MDMF landed. Might be related to refs #1390 and refs #1042. |
|---|
| 195 | ] |
|---|
| 196 | [layout.py: annotate assertion to figure out 'tahoe backup' failure |
|---|
| 197 | Brian Warner <warner@lothar.com>**20110827195253 |
|---|
| 198 | Ignore-this: 9b92b954e3ed0d0f80154fff1ff674e5 |
|---|
| 199 | ] |
|---|
| 200 | [Add 'tahoe debug dump-cap' support for MDMF, DIR2-CHK, DIR2-MDMF. refs #1507. |
|---|
| 201 | Brian Warner <warner@lothar.com>**20110827195048 |
|---|
| 202 | Ignore-this: 61c6af5e33fc88e0251e697a50addb2c |
|---|
| 203 | |
|---|
| 204 | This also adds tests for all those cases, and fixes an omission in uri.py |
|---|
| 205 | that broke parsing of DIR2-MDMF-Verifier and DIR2-CHK-Verifier. |
|---|
| 206 | ] |
|---|
| 207 | [MDMF: more writable/writeable consistentifications |
|---|
| 208 | warner@lothar.com**20110827190602 |
|---|
| 209 | Ignore-this: 22492a9e20c1819ddb12091062888b55 |
|---|
| 210 | ] |
|---|
| 211 | [MDMF: s/Writable/Writeable/g, for consistency with existing SDMF code |
|---|
| 212 | warner@lothar.com**20110827183357 |
|---|
| 213 | Ignore-this: 9dd312acedbdb2fc2f7bef0d0fb17c0b |
|---|
| 214 | ] |
|---|
| 215 | [setup.cfg: remove no-longer-supported test_mac_diskimage alias. refs #1479 |
|---|
| 216 | david-sarah@jacaranda.org**20110826230345 |
|---|
| 217 | Ignore-this: 40e908b8937322a290fb8012bfcad02a |
|---|
| 218 | ] |
|---|
| 219 | [test_mutable.Update: increase timeout from 120s to 400s, slaves are failing |
|---|
| 220 | Brian Warner <warner@lothar.com>**20110825230140 |
|---|
| 221 | Ignore-this: 101b1924a30cdbda9b2e419e95ca15ec |
|---|
| 222 | ] |
|---|
| 223 | [tests: fix check_memory test |
|---|
| 224 | zooko@zooko.com**20110825201116 |
|---|
| 225 | Ignore-this: 4d66299fa8cb61d2ca04b3f45344d835 |
|---|
| 226 | fixes #1503 |
|---|
| 227 | ] |
|---|
| 228 | [TAG allmydata-tahoe-1.9.0a1 |
|---|
| 229 | warner@lothar.com**20110825161122 |
|---|
| 230 | Ignore-this: 3cbf49f00dbda58189f893c427f65605 |
|---|
| 231 | ] |
|---|
| 232 | Patch bundle hash: |
|---|
| 233 | 624e34d4d6cfee79c2783142fd28048453857b0b |
|---|