salt: salt-cloud scaleway driver API URLs (api_root setting) missing in the docs

Description of Issue/Question

salt-cloud scaleway driver has outdated API URLs which render it unusable. Most requests to API do not return any data and the control of instances seems impossible. It also does not give any error messages as the old API URLs use normal (200) status codes.

salt-cloud seems to use the old URL (https://api.cloud.online.net) when making API calls while scaleway API has been updated to use different URLs, which are based on the region where you server is hosted at. An excerpt from scaleway’s documentation regarding API Endpoints:

Request and response

Our API works over https and is accessed from several endpoints:

cp-<region>.scaleway.com for Compute Power related actions, where <region> is par1 or ams1.

Source: https://developer.scaleway.com/#header-request-and-response

Setup

contents of /etc/salt/cloud:

cloud:
  providers:
    my-scaleway:
      access_key: REPLACE_WITH_SCALEWAY_ACCESS_KEY
      token: REPLACE_WITH_SCALEWAY_TOKEN
      driver: scaleway

  profiles:
    scaleway-archlinux:
      provider: my-scaleway
      image: Arch Linux

Steps to Reproduce Issue

  1. I have an instance running on Scaleway and provider configured.
  2. I run salt-cloud -l debug -p my-scaleway -F and get empty results:
[DEBUG   ] Reading configuration from /etc/salt/cloud
[DEBUG   ] Missing configuration file: /etc/salt/master
[DEBUG   ] Using cached minion ID from /etc/salt/minion_id: REDACTED
[DEBUG   ] Reading configuration from /etc/salt/cloud.providers
[DEBUG   ] Reading configuration from /etc/salt/cloud.profiles
[DEBUG   ] Configuration file path: /etc/salt/cloud
[WARNING ] Insecure logging configuration detected! Sensitive data may be logged.
[INFO    ] salt-cloud starting
[DEBUG   ] Could not LazyLoad parallels.avail_sizes: 'parallels' __virtual__ returned False
[DEBUG   ] LazyLoaded parallels.avail_locations
[DEBUG   ] LazyLoaded proxmox.avail_sizes
[DEBUG   ] Could not LazyLoad saltify.destroy: 'saltify.destroy' is not available.
[DEBUG   ] Could not LazyLoad saltify.avail_sizes: 'saltify.avail_sizes' is not available.
[DEBUG   ] Could not LazyLoad saltify.avail_images: 'saltify.avail_images' is not available.
[DEBUG   ] Could not LazyLoad saltify.avail_locations: 'saltify.avail_locations' is not available.
[DEBUG   ] LazyLoaded rackspace.reboot
[DEBUG   ] LazyLoaded openstack.list_locations
[DEBUG   ] LazyLoaded rackspace.list_locations
[DEBUG   ] Could not LazyLoad scaleway.optimize_providers: 'scaleway.optimize_providers' is not available.
[DEBUG   ] The 'scaleway' cloud driver is unable to be optimized.
[DEBUG   ] Could not LazyLoad parallels.avail_sizes: 'parallels' __virtual__ returned False
[DEBUG   ] LazyLoaded parallels.avail_locations
[DEBUG   ] LazyLoaded proxmox.avail_sizes
[DEBUG   ] Could not LazyLoad saltify.destroy: 'saltify.destroy' is not available.
[DEBUG   ] Could not LazyLoad saltify.avail_sizes: 'saltify.avail_sizes' is not available.
[DEBUG   ] Could not LazyLoad saltify.avail_images: 'saltify.avail_images' is not available.
[DEBUG   ] Could not LazyLoad saltify.avail_locations: 'saltify.avail_locations' is not available.
[DEBUG   ] LazyLoaded rackspace.reboot
[DEBUG   ] LazyLoaded openstack.list_locations
[DEBUG   ] LazyLoaded rackspace.list_locations
[DEBUG   ] https://api.cloud.online.net/servers/
[DEBUG   ] LazyLoaded nested.output
  1. As there is no output (and no error), I notice the printed old API URL, which I decide to change in salt/cloud/clouds/scaleway.py file, line 343 from:
default='https://api.cloud.online.net'

to:

default='https://cp-ams1.scaleway.com'

(this change is due to my server hosted in AMS1. Should it be in different location, I’d have to change it to something else).

  1. After this change, I recompile the file and re-run salt-cloud -l debug -p my-scaleway -F again (it results the servers that are running correctly):
[DEBUG   ] Reading configuration from /etc/salt/cloud
[DEBUG   ] Missing configuration file: /etc/salt/master
[DEBUG   ] Using cached minion ID from /etc/salt/minion_id: REDACTED
[DEBUG   ] Reading configuration from /etc/salt/cloud.providers
[DEBUG   ] Reading configuration from /etc/salt/cloud.profiles
[DEBUG   ] Configuration file path: /etc/salt/cloud
[WARNING ] Insecure logging configuration detected! Sensitive data may be logged.
[INFO    ] salt-cloud starting
[DEBUG   ] Could not LazyLoad parallels.avail_sizes: 'parallels' __virtual__ returned False
[DEBUG   ] LazyLoaded parallels.avail_locations
[DEBUG   ] LazyLoaded proxmox.avail_sizes
[DEBUG   ] Could not LazyLoad saltify.destroy: 'saltify.destroy' is not available.
[DEBUG   ] Could not LazyLoad saltify.avail_sizes: 'saltify.avail_sizes' is not available.
[DEBUG   ] Could not LazyLoad saltify.avail_images: 'saltify.avail_images' is not available.
[DEBUG   ] Could not LazyLoad saltify.avail_locations: 'saltify.avail_locations' is not available.
[DEBUG   ] LazyLoaded rackspace.reboot
[DEBUG   ] LazyLoaded openstack.list_locations
[DEBUG   ] LazyLoaded rackspace.list_locations
[DEBUG   ] Could not LazyLoad scaleway.optimize_providers: 'scaleway.optimize_providers' is not available.
[DEBUG   ] The 'scaleway' cloud driver is unable to be optimized.
[DEBUG   ] Could not LazyLoad parallels.avail_sizes: 'parallels' __virtual__ returned False
[DEBUG   ] LazyLoaded parallels.avail_locations
[DEBUG   ] LazyLoaded proxmox.avail_sizes
[DEBUG   ] Could not LazyLoad saltify.destroy: 'saltify.destroy' is not available.
[DEBUG   ] Could not LazyLoad saltify.avail_sizes: 'saltify.avail_sizes' is not available.
[DEBUG   ] Could not LazyLoad saltify.avail_images: 'saltify.avail_images' is not available.
[DEBUG   ] Could not LazyLoad saltify.avail_locations: 'saltify.avail_locations' is not available.
[DEBUG   ] LazyLoaded rackspace.reboot
[DEBUG   ] LazyLoaded openstack.list_locations
[DEBUG   ] LazyLoaded rackspace.list_locations
[DEBUG   ] https://cp-ams1.scaleway.com/servers/
[DEBUG   ] LazyLoaded nested.output
my-scaleway:
    ----------
    scaleway:
        ----------
        REDACTED:
            ----------
            arch:
                x86_64
            bootscript:
                ----------
                architecture:
                    x86_64
                
		REST OF OUTPUT IS REDACTED

Versions Report

Salt Version: Salt: 2016.11.1

Dependency Versions: cffi: Not Installed cherrypy: Not Installed dateutil: Not Installed gitdb: Not Installed gitpython: Not Installed ioflo: Not Installed Jinja2: 2.8.1 libgit2: Not Installed libnacl: Not Installed M2Crypto: Not Installed Mako: Not Installed msgpack-pure: Not Installed msgpack-python: 0.4.8 mysql-python: Not Installed pycparser: Not Installed pycrypto: 2.6.1 pygit2: Not Installed Python: 2.7.13 (default, Dec 21 2016, 07:16:46) python-gnupg: Not Installed PyYAML: 3.12 PyZMQ: 16.0.2 RAET: Not Installed smmap: Not Installed timelib: Not Installed Tornado: 4.4.2 ZMQ: 4.1.6

System Versions: dist:
machine: x86_64 release: 4.8.15-2-ck-ivybridge system: Linux version: Not Installed

salt-cloud v0.8.11

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

I’m quite overloaded these days, but I’ll try to have a look and submit a pull request if the fix is quick

Thanks for everyones work on this i will change this to a documentation issue.