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

Joyent Cloud Size Issue #37734

Closed
Ch3LL opened this issue Nov 16, 2016 · 1 comment
Closed

Joyent Cloud Size Issue #37734

Ch3LL opened this issue Nov 16, 2016 · 1 comment
Labels
Bug broken, incorrect, or confusing behavior P4 Priority 4 RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. Salt-Cloud severity-high 2nd top severity, seen by most users, causes major problems
Milestone

Comments

@Ch3LL
Copy link
Contributor

Ch3LL commented Nov 16, 2016

Description of Issue/Question

When attempting to use the following profile configuration for joyent:

joyent-test:
  provider: joyent-config
  size: g4-highcpu-512M
  image: ubuntu-certified-16.10
  script_args: '-P -Z'

And you attempt to run the following command: salt-cloud -p joyent-test ch3ll-test2 --no-deploy -ldebug you will run into this error:

Traceback (most recent call last):
  File "/home/ch3ll/git/salt/salt/cloud/cli.py", line 284, in run
    self.config.get('names')
  File "/home/ch3ll/git/salt/salt/cloud/__init__.py", line 1457, in run_profile
    ret[name] = self.create(vm_)
  File "/home/ch3ll/git/salt/salt/cloud/__init__.py", line 1287, in create
    output = self.clouds[func](vm_)
  File "/home/ch3ll/git/salt/salt/cloud/clouds/joyent.py", line 319, in create
    query_instance(vm_)
  File "/home/ch3ll/git/salt/salt/cloud/clouds/joyent.py", line 219, in query_instance
    'wait_for_ip_interval_multiplier', vm_, __opts__, default=1),
  File "/home/ch3ll/git/salt/salt/utils/cloud.py", line 2368, in wait_for_ip
    data = update_callback(*update_args, **update_kwargs)
  File "/home/ch3ll/git/salt/salt/cloud/clouds/joyent.py", line 190, in _query_ip_address
    data = show_instance(vm_['name'], call='action')
  File "/home/ch3ll/git/salt/salt/cloud/clouds/joyent.py", line 653, in show_instance
    ret = query(command='my/machines/{0}'.format(node['id']),
TypeError: 'NoneType' object has no attribute '__getitem__'

This is because in joyent you cannot use the size g4-highcpu-512M with the image ubuntu-certified-16.10. This is because there are different storage types based on the instance types you are creating. INstance types being Docker Container, Infrastrucuter Container, and Hardware Virtual Machine.

Right here is where return returns the following: [409, None] only after the following changes:

@@ -1101,7 +1106,7 @@ def query(action=None,
             result['status']
         )
     )
-    if 'Content-Length' in result['headers']:
+    if 'Content-Length' in result.get('headers', ''):
         content = result['text']
         return_content = yaml.safe_load(content)

Need to change this because when returning a 409 headers is not returned from the api.
So i'm guessing we need to do some better error handling right here when attempting to create the node.

Versions Report

All versions of salt with joyent driver.
But tested with:

[root@cloud-slave testing]# salt --versions-report
Salt Version:
           Salt: 2016.3.3
 
Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 2.5.3
          gitdb: 0.6.4
      gitpython: 2.0.7
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: 0.21.1
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.7
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
         pygit2: Not Installed
         Python: 2.7.5 (default, Sep 15 2016, 22:37:39)
   python-gnupg: 0.3.9
         PyYAML: 3.11
          PyZMQ: 14.7.0
           RAET: Not Installed
          smmap: 0.9.0
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.0.5
 
System Versions:
           dist: centos 7.2.1511 Core
        machine: x86_64
        release: 3.10.0-327.4.5.el7.x86_64
         system: Linux
        version: CentOS Linux 7.2.1511 Core
@Ch3LL Ch3LL added Bug broken, incorrect, or confusing behavior RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. Salt-Cloud severity-high 2nd top severity, seen by most users, causes major problems labels Nov 16, 2016
@Ch3LL Ch3LL added this to the Approved milestone Nov 16, 2016
@Ch3LL Ch3LL added the P4 Priority 4 label Nov 16, 2016
@Ch3LL
Copy link
Contributor Author

Ch3LL commented Nov 16, 2016

Just realized that this is actually resolved in develop here: #37689 closing now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior P4 Priority 4 RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. Salt-Cloud severity-high 2nd top severity, seen by most users, causes major problems
Projects
None yet
Development

No branches or pull requests

1 participant