X-Delete-After: 1 is known to be flakey; use 2 instead.
When the proxy receives an X-Delete-After header, it automatically
converts it to an X-Delete-At header based on the current time. So far,
so good. But in normalize_delete_at_timestamp we convert our
time.time() + int(req.headers['X-Delete-After'])
to a string representation of an integer and in the process always round
*down*. As a result, we lose up to a second worth of object validity,
meaning the object server can (rarely) respond 400, complaining that the
X-Delete-At is in the past.
Reviewed: https:/ /review. openstack. org/507964 /git.openstack. org/cgit/ openstack/ swift/commit/ ?id=c6aea4b3730 c937c41815831a7 b4d60ff2899fcb
Committed: https:/
Submitter: Jenkins
Branch: master
commit c6aea4b3730c937 c41815831a7b4d6 0ff2899fcb
Author: Tim Burke <email address hidden>
Date: Wed Sep 27 19:19:53 2017 +0000
Fix intermittent failure in test_x_delete_after
X-Delete-After: 1 is known to be flakey; use 2 instead.
When the proxy receives an X-Delete-After header, it automatically delete_ at_timestamp we convert our
converts it to an X-Delete-At header based on the current time. So far,
so good. But in normalize_
time.time() + int(req. headers[ 'X-Delete- After'] )
to a string representation of an integer and in the process always round
*down*. As a result, we lose up to a second worth of object validity,
meaning the object server can (rarely) respond 400, complaining that the
X-Delete-At is in the past.
Change-Id: Ib5e5a48f5cbed0 eade8ba3bca96b2 6c82a9f9d84 33897dd74071027 a739eaa2c5c c415a92fa284a1e a1eda458581 a278baa0759fc0b faa1aff2d0d
Related-Change: I643be9af8f054f
Related-Change: I10d3b9fcbefff3
Related-Change: Ifdb1920e5266aa
Related-Bug: #1597520
Closes-Bug: #1699114