Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Service version supported by SDK not specified." #492

Closed
JeroenVanOort opened this issue Dec 9, 2014 · 8 comments · Fixed by #493
Closed

"Service version supported by SDK not specified." #492

JeroenVanOort opened this issue Dec 9, 2014 · 8 comments · Fixed by #493

Comments

@JeroenVanOort
Copy link

The latest version of php-opencloud gives me this error: "Service version supported by SDK not specified." in lib/OpenCloud/Common/Service/Endpoint.php

PR463 seems to be a breaking change for me. No interaction with our object store is possible when upgrading to your latest version.

I've used the most simple code I can think of to debug this:

(new \OpenCloud\OpenStack(
                'https://identity.stack.cloudvps.com/v2.0/',
                [
                    'username'      => '*snip*',
                    'password'      => '*snip*',
                    'tenantName'    => '*snip*'
                ]
            ))->objectStoreService('swift', 'NL', 'publicURL');

The error only occurs when calling the objectStoreService function.

I've tried to find out what's going wrong, but I can't seem to find it.

@ycombinator
Copy link
Contributor

I think I know what might be causing this. It's probably the URLs for the swift service in the service catalog. To confirm this, could you please run the following script and paste the output after redacting any confidential information like tenant IDs, etc.:

$client = new \OpenCloud\OpenStack(
    'https://identity.stack.cloudvps.com/v2.0/',
    [
        'username'      => '*snip*',
        'password'      => '*snip*',
        'tenantName'    => '*snip*'
    ]
);

$client->authenticate();
$catalog = $client->getCatalog();
$items = $catalog->getItems();
foreach ($items as $item) {
    if ('swift' == $item->getName()) {
        var_dump($item->getEndpoints());
    }
}

Thanks!

[EDIT: Fixed syntax error in loop]

@JeroenVanOort
Copy link
Author

Thanks for your fast response!

This is the output after fixing your syntax errors in the foreach loop ;-)

array(1) {
  [0]=>
  object(stdClass)#479 (4) {
    ["adminURL"]=>
    string(67) "https://api.objectstore.eu/v1/AUTH_*snip*"
    ["region"]=>
    string(2) "NL"
    ["internalURL"]=>
    string(72) "https://internal.objectstore.eu/v1/AUTH_*snip*"
    ["publicURL"]=>
    string(55) "https://*snip*.objectstore.eu"
  }
}

@ycombinator
Copy link
Contributor

Thanks for that. It confirms by my suspicion about the publicURL not having a version in it. I have brainstormed a fix for this with my colleague and will sending a PR for it within an hour or two.

@JeroenVanOort
Copy link
Author

Thanks!

Since this seems to be a breaking change for all CloudVPS users, will there be a fix release or do I need to wait a month until the next regular release?

@ycombinator
Copy link
Contributor

I think this issue merits a fix release, probably v1.12.1. @jamiehannaford, do you agree?

@jamiehannaford
Copy link
Contributor

Yes, v1.12.1 sounds right to me

@ycombinator
Copy link
Contributor

Hi @JeroenVanOort, I just cut a new fix release, v1.12.1. If you update php-opencloud via composer, you should get it now. You can verify by running this command from the same location you run the composer command:

$ php -r 'require "vendor/autoload.php"; error_log(OpenCloud\Version::VERSION);'

That should output 1.12.1.

@JeroenVanOort
Copy link
Author

I updated and can confirm the fix is working!

Wonderful to see how you guys can debug and release a fix within a few hours. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants