<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openstack/python-swiftclient.git/swiftclient/shell.py, branch stable/rocky</title>
<subtitle>opendev.org: openstack/python-swiftclient.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/'/>
<entry>
<title>Merge "Back out some version bumps"</title>
<updated>2018-07-24T23:12:51+00:00</updated>
<author>
<name>Zuul</name>
<email>zuul@review.openstack.org</email>
</author>
<published>2018-07-24T23:12:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=d80f24f2fd3f80994f109cdabe3c778b77c18472'/>
<id>d80f24f2fd3f80994f109cdabe3c778b77c18472</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add bash_completion to swiftclient</title>
<updated>2018-07-13T18:24:24+00:00</updated>
<author>
<name>Matthew Oliver</name>
<email>matt@oliver.net.au</email>
</author>
<published>2018-06-29T01:07:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=45ed21c6c433e2f5979df2820424bf5b44c478db'/>
<id>45ed21c6c433e2f5979df2820424bf5b44c478db</id>
<content type='text'>
This patch basically follows the bash completion
model that other OpenStack clients use. It creates
a new command to swiftclient called `bash_completion`.

The `bash_completion` command by default will print
all base flags and exsiting commands. If you pass
it a command, it'll print out all base flags and
any flags that command accepts. So as you type out
your swift command and auto-complete, only the current
available flags are offered to you.

This is used by the swift.bash_completion script to
allow swift commands to be bash completed.

To make it work, place the swift.bash_completion file
into /etc/bash_completion.d and source it:

  cp tools/swift.bash_completion /etc/bash_completion.d/swift
  source /etc/bash_completion.d/swift

Because swiftclient itself is creating this flag/command output
it should automatically add anything we add to the swiftclient
CLI.

Change-Id: I5609a19018269762b4640403daae5827bb9ad724
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch basically follows the bash completion
model that other OpenStack clients use. It creates
a new command to swiftclient called `bash_completion`.

The `bash_completion` command by default will print
all base flags and exsiting commands. If you pass
it a command, it'll print out all base flags and
any flags that command accepts. So as you type out
your swift command and auto-complete, only the current
available flags are offered to you.

This is used by the swift.bash_completion script to
allow swift commands to be bash completed.

To make it work, place the swift.bash_completion file
into /etc/bash_completion.d and source it:

  cp tools/swift.bash_completion /etc/bash_completion.d/swift
  source /etc/bash_completion.d/swift

Because swiftclient itself is creating this flag/command output
it should automatically add anything we add to the swiftclient
CLI.

Change-Id: I5609a19018269762b4640403daae5827bb9ad724
</pre>
</div>
</content>
</entry>
<entry>
<title>Back out some version bumps</title>
<updated>2018-07-11T20:09:00+00:00</updated>
<author>
<name>Tim Burke</name>
<email>tim.burke@gmail.com</email>
</author>
<published>2018-05-16T17:33:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=da362a653e9c70cb6ae17a7c3764887b4fd3fcf2'/>
<id>da362a653e9c70cb6ae17a7c3764887b4fd3fcf2</id>
<content type='text'>
I'm giving up on trying to back out all of the test-requirements
up-revs, but let's try to stay compatibile with old requests/six.

As part of that, only disable some requests warnings on new-enough requests.

Note that we should now be compatible with distro packages back to
Ubuntu 16.04 and CentOS 6. Our six is still too new for Trusty, but
hey, there's less than a year left on that anyway, right?

Change-Id: Iccb23638393616f9ec3da660dd5e39ea4ea94220
Related-Change: I2a8f465c8b08370517cbec857933b08fca94ca38
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I'm giving up on trying to back out all of the test-requirements
up-revs, but let's try to stay compatibile with old requests/six.

As part of that, only disable some requests warnings on new-enough requests.

Note that we should now be compatible with distro packages back to
Ubuntu 16.04 and CentOS 6. Our six is still too new for Trusty, but
hey, there's less than a year left on that anyway, right?

Change-Id: Iccb23638393616f9ec3da660dd5e39ea4ea94220
Related-Change: I2a8f465c8b08370517cbec857933b08fca94ca38
</pre>
</div>
</content>
</entry>
<entry>
<title>Add ability to generate a temporary URL with an</title>
<updated>2018-07-10T14:23:30+00:00</updated>
<author>
<name>mmcardle</name>
<email>mark.mcardle@sohonet.com</email>
</author>
<published>2018-07-10T13:45:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=47fb18c41b4851ba6071f0215e96e222b8ccef29'/>
<id>47fb18c41b4851ba6071f0215e96e222b8ccef29</id>
<content type='text'>
IP range restriction

Change-Id: I4734599886e4f4a563162390d0ff3bb1ef639db4
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
IP range restriction

Change-Id: I4734599886e4f4a563162390d0ff3bb1ef639db4
</pre>
</div>
</content>
</entry>
<entry>
<title>Add option for user to enter password</title>
<updated>2018-06-11T16:25:21+00:00</updated>
<author>
<name>Alistair Coles</name>
<email>alistairncoles@gmail.com</email>
</author>
<published>2018-06-11T12:19:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=33ad9fd4cc0ade9f0800a2815ee0ef514ae8f264'/>
<id>33ad9fd4cc0ade9f0800a2815ee0ef514ae8f264</id>
<content type='text'>
Add the --prompt option for the CLI which will cause the user to be
prompted to enter a password. Any password otherwise specified by
--key, --os-password or an environment variable will be ignored.

The swift client will exit with a warning if the password cannot be
entered without its value being echoed.

Closes-Bug: #1357562
Change-Id: I513647eed460007617f129691069c6fb1bfe62d7
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the --prompt option for the CLI which will cause the user to be
prompted to enter a password. Any password otherwise specified by
--key, --os-password or an environment variable will be ignored.

The swift client will exit with a warning if the password cannot be
entered without its value being echoed.

Closes-Bug: #1357562
Change-Id: I513647eed460007617f129691069c6fb1bfe62d7
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge "show option per line"</title>
<updated>2018-06-05T17:42:23+00:00</updated>
<author>
<name>Zuul</name>
<email>zuul@review.openstack.org</email>
</author>
<published>2018-06-05T17:42:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=ae30659ce95e9eb1ffc0ca16a196cc2bdc93f2d9'/>
<id>ae30659ce95e9eb1ffc0ca16a196cc2bdc93f2d9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>show option per line</title>
<updated>2018-03-17T17:00:05+00:00</updated>
<author>
<name>Thiago da Silva</name>
<email>thiago@redhat.com</email>
</author>
<published>2018-03-17T17:00:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=071926d19b7305830920964434e993bbc1c41b18'/>
<id>071926d19b7305830920964434e993bbc1c41b18</id>
<content type='text'>
ading multiple options on the same line makes
it easy to miss when quickly scanning the options.

Change-Id: I8e324fca48cd05d9e381d5106135542274c2ff7f
Signed-off-by: Thiago da Silva &lt;thiago@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ading multiple options on the same line makes
it easy to miss when quickly scanning the options.

Change-Id: I8e324fca48cd05d9e381d5106135542274c2ff7f
Signed-off-by: Thiago da Silva &lt;thiago@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add force auth retry mode in swiftclient</title>
<updated>2018-03-13T03:29:48+00:00</updated>
<author>
<name>Kota Tsuyuzaki</name>
<email>tsuyuzaki.kota@lab.ntt.co.jp</email>
</author>
<published>2018-03-12T08:54:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=e65070964c7b1e04119c87e5f344d39358780d18'/>
<id>e65070964c7b1e04119c87e5f344d39358780d18</id>
<content type='text'>
This patch attemps to add an option to force get_auth call while retrying
an operation even if it gets errors other than 401 Unauthorized.

Why we need this:
The main reason why we need this is current python-swiftclient requests could
never get succeeded under certion situation using third party proxies/load balancers
between the client and swift-proxy server. I think, it would be general situation
of the use case.

Specifically describing nginx case, the nginx can close the socket from the client
when the response code from swift is not 2xx series. In default, nginx can wait the
buffers from the client for a while (default 30s)[1] but after the time past, nginx
will close the socket immediately. Unfortunately, if python-swiftclient has still been
sending the data into the socket, python-swiftclient will get socket error (EPIPE,
BrokenPipe). From the swiftclient perspective, this is absolutely not an auth error,
so current python-swiftclient will continue to retry without re-auth.
However, if the root cause is sort of 401 (i.e. nginx got 401 unauthorized from the
swift-proxy because of token expiration), swiftclient will loop 401 -&gt; EPIPE -&gt; 401...
until it consume the max retry times.

In particlar, less time to live of the token and multipart object upload with large
segments could not get succeeded as below:

Connection Model:

python-swiftclient -&gt; nginx -&gt; swift-proxy -&gt; swift-backend

Case: Try to create slo with large segments and the auth token expired with 1 hour

1. client create a connection to nginx with successful response from swift-proxy and its auth
2. client continue to put large segment objects
   (e.g. 1~5GB for each and the total would 20~30GB, i.e. 20~30 segments)
3. after some of segments uploaded, 1 hour past but client is still trying to
   send remaining segment objects.
4. nginx got 401 from swift-proxy for a request and wait that the connection is closed
   from the client but timeout past because the python-swiftclient is still sending much data
   into the socket before reading the 401 response.
5. client got socket error because nginx closed the connection during sending the buffer.
6. client retries a new connection to nginx without re-auth...

&lt;loop 4-6&gt;

7. finally python-swiftclient failed with socket error (Broken Pipe)

In operational perspective, setting longer timeout for lingering close would be an option but
it's not complete solution because any other proxy/LB may not support the options.

If we actually do THE RIGHT THING in python-swiftclient, we should send expects: 100-continue
header and handle the first response to re-auth correctly.

HOWEVER, the current python's httplib and requests module used by python-swiftclient doesn't
support expects: 100-continue header [2] and the thread proposed a fix [3] is not super active.
And we know the reason we depends on the library is to fix a security issue that existed
in older python-swiftclient [4] so that we should touch around it super carefully.

In the reality, as the hot fix, this patch try to mitigate the unfortunate situation
described above WITHOUT 100-continue fix, just users can force to re-auth when any errors
occurred during the retries that can be accepted in the upstream.

1: http://nginx.org/en/docs/http/ngx_http_core_module.html#lingering_close
2: https://github.com/requests/requests/issues/713
3: https://bugs.python.org/issue1346874
4: https://review.openstack.org/#/c/69187/

Change-Id: I3470b56e3f9cf9cdb8c2fc2a94b2c551927a3440
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch attemps to add an option to force get_auth call while retrying
an operation even if it gets errors other than 401 Unauthorized.

Why we need this:
The main reason why we need this is current python-swiftclient requests could
never get succeeded under certion situation using third party proxies/load balancers
between the client and swift-proxy server. I think, it would be general situation
of the use case.

Specifically describing nginx case, the nginx can close the socket from the client
when the response code from swift is not 2xx series. In default, nginx can wait the
buffers from the client for a while (default 30s)[1] but after the time past, nginx
will close the socket immediately. Unfortunately, if python-swiftclient has still been
sending the data into the socket, python-swiftclient will get socket error (EPIPE,
BrokenPipe). From the swiftclient perspective, this is absolutely not an auth error,
so current python-swiftclient will continue to retry without re-auth.
However, if the root cause is sort of 401 (i.e. nginx got 401 unauthorized from the
swift-proxy because of token expiration), swiftclient will loop 401 -&gt; EPIPE -&gt; 401...
until it consume the max retry times.

In particlar, less time to live of the token and multipart object upload with large
segments could not get succeeded as below:

Connection Model:

python-swiftclient -&gt; nginx -&gt; swift-proxy -&gt; swift-backend

Case: Try to create slo with large segments and the auth token expired with 1 hour

1. client create a connection to nginx with successful response from swift-proxy and its auth
2. client continue to put large segment objects
   (e.g. 1~5GB for each and the total would 20~30GB, i.e. 20~30 segments)
3. after some of segments uploaded, 1 hour past but client is still trying to
   send remaining segment objects.
4. nginx got 401 from swift-proxy for a request and wait that the connection is closed
   from the client but timeout past because the python-swiftclient is still sending much data
   into the socket before reading the 401 response.
5. client got socket error because nginx closed the connection during sending the buffer.
6. client retries a new connection to nginx without re-auth...

&lt;loop 4-6&gt;

7. finally python-swiftclient failed with socket error (Broken Pipe)

In operational perspective, setting longer timeout for lingering close would be an option but
it's not complete solution because any other proxy/LB may not support the options.

If we actually do THE RIGHT THING in python-swiftclient, we should send expects: 100-continue
header and handle the first response to re-auth correctly.

HOWEVER, the current python's httplib and requests module used by python-swiftclient doesn't
support expects: 100-continue header [2] and the thread proposed a fix [3] is not super active.
And we know the reason we depends on the library is to fix a security issue that existed
in older python-swiftclient [4] so that we should touch around it super carefully.

In the reality, as the hot fix, this patch try to mitigate the unfortunate situation
described above WITHOUT 100-continue fix, just users can force to re-auth when any errors
occurred during the retries that can be accepted in the upstream.

1: http://nginx.org/en/docs/http/ngx_http_core_module.html#lingering_close
2: https://github.com/requests/requests/issues/713
3: https://bugs.python.org/issue1346874
4: https://review.openstack.org/#/c/69187/

Change-Id: I3470b56e3f9cf9cdb8c2fc2a94b2c551927a3440
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow for object uploads &gt; 5GB from stdin.</title>
<updated>2018-01-18T04:56:12+00:00</updated>
<author>
<name>Timur Alperovich</name>
<email>timuralp@swiftstack.com</email>
</author>
<published>2017-06-28T19:02:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=2faea932870956583f83226886d33304ee1eee46'/>
<id>2faea932870956583f83226886d33304ee1eee46</id>
<content type='text'>
When uploading from standard input, swiftclient should turn the upload
into an SLO in the case of large objects. This patch picks the
threshold as 10MB (and uses that as the default segment size). The
consumers can also supply the --segment-size option to alter that
threshold and the SLO segment size. The patch does buffer one segment
in memory (which is why 10MB default was chosen).

(test is updated)

Change-Id: Ib13e0b687bc85930c29fe9f151cf96bc53b2e594
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When uploading from standard input, swiftclient should turn the upload
into an SLO in the case of large objects. This patch picks the
threshold as 10MB (and uses that as the default segment size). The
consumers can also supply the --segment-size option to alter that
threshold and the SLO segment size. The patch does buffer one segment
in memory (which is why 10MB default was chosen).

(test is updated)

Change-Id: Ib13e0b687bc85930c29fe9f151cf96bc53b2e594
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge "Allow --meta on upload"</title>
<updated>2017-12-08T19:51:05+00:00</updated>
<author>
<name>Zuul</name>
<email>zuul@review.openstack.org</email>
</author>
<published>2017-12-08T19:51:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-swiftclient.git/commit/?id=cde257de5cdfd1d0f5c832e154a7dee9cd42f13f'/>
<id>cde257de5cdfd1d0f5c832e154a7dee9cd42f13f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
