jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zack Shoylev (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCLOUDS-1179) putBlob doesn't handle 401s
Date Wed, 05 Oct 2016 14:32:20 GMT

    [ https://issues.apache.org/jira/browse/JCLOUDS-1179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15548896#comment-15548896
] 

Zack Shoylev commented on JCLOUDS-1179:
---------------------------------------

[~nhowes] I had a long look at this bug. I was having some issues reproducing it with a unit
test in combination with running against the JVMs that should be exhibiting this problem.

In the end, I followed your instructions to setup a devstack server and tested using your
example code, and I was able to reproduce the issue using the example code.

However, if you modify your build.gradle file to this:

{code}

// Apply the java plugin to add support for Java
apply plugin: 'java'
apply plugin: 'application'

mainClassName = "Swift"

repositories {
    jcenter()    
    maven { url "http://repository.apache.org/snapshots/" }
}

// In this section you declare the dependencies for your production and test code
dependencies {
    compile 'ch.qos.logback:logback-classic:1.1.3'
    compile 'org.slf4j:slf4j-api:1.7.13'
    compile "org.apache.jclouds.api:openstack-swift:2.0.0-SNAPSHOT"
    compile "org.apache.jclouds.driver:jclouds-slf4j:2.0.0-SNAPSHOT"
}

task wrapper(type: Wrapper) {
    gradleVersion = '3.0'
}

{code}

you should see the problem go away (at least in the example you have provided). The reason
appears to be that using jclouds-all would produce this unintended interaction you are describing,
probably as a side-effect of how it is bundled. In general, it is better to use the specific
modules that you need.

I am not closing the issue yet, in case I am missing something (please let me know). Also,
I will be adding the unit test to jclouds just in case. Finally, we might also have to have
a look at jclouds-all.

> putBlob doesn't handle 401s 
> ----------------------------
>
>                 Key: JCLOUDS-1179
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1179
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-blobstore
>    Affects Versions: 1.9.2, 2.0.0
>         Environment: Devstack on Ubuntu 14.04
>            Reporter: Nick Howes
>            Assignee: Zack Shoylev
>              Labels: openstack-swift
>
> After the token used by jclouds expires, subsequent `putBlob` requests to swift fail
with 401.
> Unlike other operations, the `putBlob` command does not resolve this by `POST`ing to
keystone, but instead tries a few times to `PUT` the blob to swift. Each request fails with
a 401 and then it gives up.
> Other operations such as a get _will_ handle a retry by refreshing the auth token, after
which subsequent puts work (until the next expiry)
> Project to reproduce can be found here https://github.com/UniversityofWarwick/jclouds-bug
> It should be noted that when running this script I have altered [token] expiration in
/etc/keystone/keystone.conf to be 2 seconds.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message