metral / corekube

CoreOS + Kubernetes + OpenStack - The simplest way to deploy a POC Kubernetes cluster using a Heat template
Apache License 2.0
7 stars 0 forks source link

Unable to create stack #25

Closed dellintosh closed 8 years ago

dellintosh commented 8 years ago

I'm running this command: heat stack-create corekube --template-file corekube-cloudservers.yaml -P keyname=<id_name>

and getting the following error seconds afterwards:

ERROR: b'{"explanation": "The server could not comply with the request since it is either malformed or otherwise incorrect.", "code": 400, "error": {"message": "Failed to validate: One of the properties \\"network\\", \\"port\\" or \\"subnet\\" should be set for the specified network of server \\"0\\".", "traceback": null, "type": "StackValidationFailed"}, "title": "Bad Request"}'

I'm not sure why that would be missing... Is that a value I have to set before attempting to create the stack?

dellintosh commented 8 years ago

also...

pip freeze:

appdirs==1.4.0 Babel==2.2.0 click==6.6 cliff==2.0.0 cmd2==0.6.8 configobj==5.0.6 debtcollector==1.3.0 futures==3.0.5 ip-associations-python-novaclient-ext==0.1 iso8601==0.1.11 jsonpatch==1.13 jsonpointer==1.10 jsonschema==2.5.1 keyring==9.0 keystoneauth1==2.6.0 monotonic==1.0 msgpack-python==0.4.7 netaddr==0.7.18 netifaces==0.10.4 openstacksdk==0.8.5 os-client-config==1.17.0 os-diskconfig-python-novaclient-ext==0.1.3 os-networksv2-python-novaclient-ext==0.25 os-virtual-interfacesv2-python-novaclient-ext==0.19 oslo.config==3.9.0 oslo.i18n==3.5.0 oslo.serialization==2.4.0 oslo.utils==3.8.0 pbr==1.9.1 positional==1.0.1 prettytable==0.7.2 pyparsing==2.1.1 python-cinderclient==1.6.0 python-glanceclient==2.0.0 python-heatclient==0.9.0 python-keystoneclient==2.3.1 python-neutronclient==3.0.0 python-novaclient==2.31.0 python-openstackclient==2.3.0 python-swiftclient==3.0.0 pytz==2016.3 PyYAML==3.11 rackspace-auth-openstack==1.3 rackspace-novaclient==1.5 rax-default-network-flags-python-novaclient-ext==0.3.2 rax-scheduled-images-python-novaclient-ext==0.3.1 requests==2.9.1 requestsexceptions==1.1.3 simplejson==3.8.2 six==1.10.0 stevedore==1.12.0 supernova==2.0.9 swiftly==2.4 unicodecsv==0.14.1 warlock==1.2.0 wrapt==1.10.8

(running the latest version, 1.2.0, of python-heatclient resulted in a different error): WARNING (shell) "heat stack-create" is deprecated, please use "openstack stack create" instead b'Error parsing template file:///vagrant/corekube/corekube-cloudservers.yaml mapping values are not allowed here\n in "<unicode string>", line 3, column 13:\n description: >\n

metral commented 8 years ago

Thank you for the report.

I've just verified that this is in fact an issue. I'll try drumming up a fix.

Stay tuned...

dellintosh commented 8 years ago

I dug around the docs on rackspace and changing the sections under the servers as follows works!

fix.diff.txt

Thank you so much for your work on this project

metral commented 8 years ago

Thanks for the info. What version of python-heatclient did you get it working with? I've tried v1.2.0 with openstack stack create, but I am hitting a unicode parsing issue with the colon after the description key in the template

dellintosh commented 8 years ago

python-heatclient==0.9.0

metral commented 8 years ago

I dug around the docs on rackspace and changing the sections under the servers as follows works! fix.diff.txt

Thank you - I've gone ahead and applied your patch

Thank you so much for your work on this project

Glad I could help 👍

arturoera commented 7 years ago

I also hit the unicode parsing issue: Error parsing template file:///corekube/corekube-cloudservers.yaml mapping values are not allowed here in "<unicode string>", line 3, column 13: description: | ^

My heat client version: python-heatclient==1.6.1

Created this patch:

corekube-cloudservers.yaml.diff.txt

metral commented 7 years ago

Thanks for the feedback @arturoera.

Your patch seems to only be a change of spacing AFAICT. Does this patch work for you?

I'm wondering if the root of this issue is some sort of parsing issue with the YAML files that differs from heat client to client. I'm on python-heatclient==0.9.0 and python-novaclient==2.31.0 and heat stack creation is working.

arturoera commented 7 years ago

Hey @metral Thanks for looking into this, yes it worked after I removed the spacing. I think new versions of heatclient are using new versions of the yaml parser. I installed heatclient yesterday in a new virtualenv, this is the version of the yaml parser I see: PyYAML==3.12

I didn't have time to look for the changes on the parser, but based on my struggles yesterday a simple removal of the spacing worked. You may replicate this scenario creating a new env, and installing heat client with pip, then try the command again: heat stack-create corekube --template-file corekube-cloudservers.yaml -P keyname=kube_key