Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

URGENT: hashed flavor IDs break many things flavor releated #87

@bodenr

Description

@bodenr

With the latest jumpgate code from master, a number of functions are broken from a user perspective such as:

  • nova flavor-show
  • nova boot
  • etc.

It appears the issue is rooted here: 29e17a4

For example if you try to boot a server you'll end up with a jumgpate error like:

Unexpected Error
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/falcon-0.1.8-py2.7.egg/falcon/api.py", line 96, in __call__
    responder(req, resp, **params)  # pragma: no cover
  File "/usr/local/lib/python2.7/dist-packages/falcon-0.1.8-py2.7.egg/falcon/api_helpers.py", line 262, in do_befor
e
    responder(req, resp, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/falcon-0.1.8-py2.7.egg/falcon/api_helpers.py", line 262, in do_befor
e
    responder(req, resp, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/falcon-0.1.8-py2.7.egg/falcon/api_helpers.py", line 262, in do_befor
e
    responder(req, resp, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/falcon-0.1.8-py2.7.egg/falcon/api_helpers.py", line 262, in do_befor
e
    responder(req, resp, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/falcon-0.1.8-py2.7.egg/falcon/api_helpers.py", line 281, in do_after
    responder(req, resp, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/falcon-0.1.8-py2.7.egg/falcon/api_helpers.py", line 281, in do_after
    responder(req, resp, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/jumpgate-0.1-py2.7.egg/jumpgate/compute/drivers/sl/servers.py", line
 162, in on_post
    flavor_id = int(body['server'].get('flavorRef'))
ValueError: invalid literal for int() with base 10: 'MnZDUFU6MkdCcmFtOjEwMEdCOmxvY2Fs'

trying to show a flavor with nova also fails:

nova flavor-list
+----------------------------------+----------------------------------+-----------+------+-----------+------+-------+-------------+-----------+
| ID                               | Name                             | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----------------------------------+----------------------------------+-----------+------+-----------+------+-------+-------------+-----------+
| MXZDUFU6MUdCcmFtOjI1R0I6bG9jYWw= | 1 vCPU, 1024GB ram, 25GB, local  | 1024      | 25   | 0         |      | 1     | 1           | True      |
| MXZDUFU6MUdCcmFtOjEwMEdCOmxvY2Fs | 1 vCPU, 1024GB ram, 100GB, local | 1024      | 100  | 0         |      | 1     | 1           | True      |
| MnZDUFU6MkdCcmFtOjEwMEdCOmxvY2Fs | 2 vCPU, 2048GB ram, 100GB, local | 2048      | 100  | 0         |      | 2     | 1           | True      |
| NHZDUFU6NEdCcmFtOjEwMEdCOmxvY2Fs | 4 vCPU, 4096GB ram, 100GB, local | 4096      | 100  | 0         |      | 4     | 1           | True      |
| OHZDUFU6OEdCcmFtOjEwMEdCOmxvY2Fs | 8 vCPU, 8192GB ram, 100GB, local | 8192      | 100  | 0         |      | 8     | 1           | True      |
| MXZDUFU6MUdCcmFtOjI1R0I6U0FO     | 1 vCPU, 1024GB ram, 25GB, SAN    | 1024      | 25   | 0         |      | 1     | 1           | True      |
| MXZDUFU6MUdCcmFtOjEwMEdCOlNBTg== | 1 vCPU, 1024GB ram, 100GB, SAN   | 1024      | 100  | 0         |      | 1     | 1           | True      |
| MnZDUFU6MkdCcmFtOjEwMEdCOlNBTg== | 2 vCPU, 2048GB ram, 100GB, SAN   | 2048      | 100  | 0         |      | 2     | 1           | True      |
| NHZDUFU6NEdCcmFtOjEwMEdCOlNBTg== | 4 vCPU, 4096GB ram, 100GB, SAN   | 4096      | 100  | 0         |      | 4     | 1           | True      |
| OHZDUFU6OEdCcmFtOjEwMEdCOlNBTg== | 8 vCPU, 8192GB ram, 100GB, SAN   | 8192      | 100  | 0         |      | 8     | 1           | True      |
+----------------------------------+----------------------------------+-----------+------+-----------+------+-------+-------------+-----------+

nova flavor-show MXZDUFU6MUdCcmFtOjI1R0I6U0FO
ERROR (CommandError): No flavor with a name or ID of 'MXZDUFU6MUdCcmFtOjI1R0I6U0FO' exists.

Many of the openstack clients / tooling require the flavor ID to be integer parsable -- if not things start breaking. Therefore we need to keep flavor IDs as JSON ints over the wire.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions