[Image Based] Stack creation failed with ValueError: Key cannot be the null string

Bug #1389279 reported by Andrey Sledzinskiy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Alexander Gordeev

Bug Description

custom ISO with image based provisioning
{

    "build_id": "2014-10-31_17-59-08",
    "ostf_sha": "9c6fadca272427bb933bc459e14bb1bad7f614aa",
    "build_number": "363",
    "auth_required": true,
    "api": "1.0",
    "nailgun_sha": "53aad9234729e2a4ab3238a8ac5442b1df766256",
    "production": "docker",
    "fuelmain_sha": "6f16a7e84854dbb87b74c2c75653df41cd593549",
    "astute_sha": "c72dac7b31646fbedbfc56a2a87676c6d5713fcf",
    "feature_groups": [
        "mirantis"
    ],
    "release": "6.0",
    "release_versions": {
        "2014.2-6.0": {
            "VERSION": {
                "build_id": "2014-10-31_17-59-08",
                "ostf_sha": "9c6fadca272427bb933bc459e14bb1bad7f614aa",
                "build_number": "363",
                "api": "1.0",
                "nailgun_sha": "53aad9234729e2a4ab3238a8ac5442b1df766256",
                "production": "docker",
                "fuelmain_sha": "6f16a7e84854dbb87b74c2c75653df41cd593549",
                "astute_sha": "c72dac7b31646fbedbfc56a2a87676c6d5713fcf",
                "feature_groups": [
                    "mirantis"
                ],
                "release": "6.0",
                "fuellib_sha": "fdb5a3d4a230fee3cc0abff4ff8bf0ebc3d7bc72"
            }
        }
    },
    "fuellib_sha": "fdb5a3d4a230fee3cc0abff4ff8bf0ebc3d7bc72"

}

Steps:
1. Create next cluster - Ubuntu, HA, Flat Nova network, Ceph for volumes and for images, 3 controllers, 2 compute, 2 ceph nodes
2. Deploy cluster
3. After successful deployment log in to controller
4. Try to create stack with heat
heat --debug stack-create mystack --template-file heat_create_nova_stack_template.yaml --parameters "InstanceType=m1.tiny" --parameters "ImageId=72ed520f-540f-46d7-bd3a-42b118eaacb1"

Expected - stack is created
Actual - creation failed with
DEBUG (session) REQ: curl -i -X GET http://10.108.2.2:5000/v2.0/ -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
DEBUG (session) RESP: [200] CaseInsensitiveDict({'date': 'Tue, 04 Nov 2014 12:15:03 GMT', 'vary': 'X-Auth-Token', 'content-length': '420', 'content-type': 'application/json'})
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}, {"base": "application/xml", "type": "application/vnd.openstack.identity-v2.0+xml"}], "id": "v2.0", "links": [{"href": "http://10.108.2.2:5000/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}]}}

DEBUG (v2) Making authentication request to http://10.108.2.2:5000/v2.0/tokens
DEBUG (session) REQ: curl -i -X POST http://10.108.1.2:8004/v1/547e8db9ea854a4d974fff99dc82df2d/stacks -H "Accept: application/json" -H "X-Auth-Token: TOKEN_REDACTED" -H "X-Region-Name: RegionOne" -H "X-Auth-Key: admin" -H "X-Auth-User: admin" -H "User-Agent: python-heatclient" -H "Content-Type: application/json" -H "X-Auth-Url: http://10.108.2.2:5000/v2.0/" -d '{"files": {}, "disable_rollback": true, "parameters": {"InstanceType": "m1.tiny", "ImageId": "72ed520f-540f-46d7-bd3a-42b118eaacb1"}, "stack_name": "mystack12", "environment": {}, "template": {"heat_template_version": "2013-05-23", "description": "Template which creates single instance\n", "parameters": {"InstanceType": {"type": "string"}, "ImageId": {"type": "string"}}, "resources": {"Server": {"type": "OS::Nova::Server", "properties": {"image": {"get_param": "ImageId"}, "flavor": {"get_param": "InstanceType"}}, "metadata": {"Name": "ost1-test_heat"}}}}}'
DEBUG (session) RESP:
Traceback (most recent call last):
  File "/usr/bin/heat", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/dist-packages/heatclient/shell.py", line 656, in main
    HeatShell().main(args)
  File "/usr/lib/python2.7/dist-packages/heatclient/shell.py", line 606, in main
    args.func(client, args)
  File "/usr/lib/python2.7/dist-packages/heatclient/v1/shell.py", line 114, in do_stack_create
    hc.stacks.create(**fields)
  File "/usr/lib/python2.7/dist-packages/heatclient/v1/stacks.py", line 119, in create
    data=kwargs, headers=headers)
  File "/usr/lib/python2.7/dist-packages/heatclient/common/http.py", line 254, in json_request
    resp = self._http_request(url, method, **kwargs)
  File "/usr/lib/python2.7/dist-packages/heatclient/common/http.py", line 344, in _http_request
    raise exc.from_response(resp)
heatclient.exc.HTTPBadRequest: ERROR: Key cannot be the null string
Traceback (most recent call last):

  File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 137, in _dispatch_and_reply
    incoming.message))

  File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 180, in _dispatch
    return self._do_dispatch(endpoint, method, ctxt, args)

  File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 126, in _do_dispatch
    result = getattr(endpoint, method)(ctxt, **new_args)

  File "/usr/lib/python2.7/dist-packages/heat/engine/service.py", line 69, in wrapped
    return func(self, ctx, *args, **kwargs)

  File "/usr/lib/python2.7/dist-packages/heat/engine/service.py", line 624, in create_stack
    stack.store()

  File "/usr/lib/python2.7/dist-packages/heat/engine/stack.py", line 318, in store
    new_creds = db_api.user_creds_create(self.context)

  File "/usr/lib/python2.7/dist-packages/heat/db/api.py", line 170, in user_creds_create
    return IMPL.user_creds_create(context)

  File "/usr/lib/python2.7/dist-packages/heat/db/sqlalchemy/api.py", line 476, in user_creds_create
    method, password = _encrypt(values['password'])

  File "/usr/lib/python2.7/dist-packages/heat/db/sqlalchemy/api.py", line 181, in _encrypt
    return crypt.encrypt(value.encode('utf-8'))

  File "/usr/lib/python2.7/dist-packages/heat/common/crypt.py", line 36, in encrypt
    auth_info, b64encode=True)

  File "/usr/lib/python2.7/dist-packages/heat/openstack/common/crypto/utils.py", line 133, in encrypt
    cipher = self.cipher.new(key, self.cipher.MODE_CBC, iv)

  File "/usr/lib/python2.7/dist-packages/Crypto/Cipher/AES.py", line 94, in new
    return AESCipher(key, *args, **kwargs)

  File "/usr/lib/python2.7/dist-packages/Crypto/Cipher/AES.py", line 59, in __init__
    blockalgo.BlockAlgo.__init__(self, _AES, key, *args, **kwargs)

  File "/usr/lib/python2.7/dist-packages/Crypto/Cipher/blockalgo.py", line 141, in __init__
    self._cipher = factory.new(key, *args, **kwargs)

ValueError: Key cannot be the null string
Ping me for env

Revision history for this message
Andrey Sledzinskiy (asledzinskiy) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-main (master)

Fix proposed to branch: master
Review: https://review.openstack.org/133039

Changed in fuel:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-main (master)

Reviewed: https://review.openstack.org/133039
Committed: https://git.openstack.org/cgit/stackforge/fuel-main/commit/?id=6c18cc10916e4d2af6c79df51000f48a1918d8c3
Submitter: Jenkins
Branch: master

commit 6c18cc10916e4d2af6c79df51000f48a1918d8c3
Author: Alexander Gordeev <email address hidden>
Date: Thu Nov 6 17:33:46 2014 +0400

    Fix uninstalled packages for ubuntu

    1) bdsmainutils
    Fixes heat deployment issues since puppet recipes improperly handle
    `hexdump` presence.

    Closes-Bug: #1389279

    2) bridge-utils
    Fixes the absence of `brctl` utility

    Change-Id: Idbc1ec089723dfa01d0b91bfc0e2c9771d7805e7

Changed in fuel:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.