Create for cluster failed: Unknown attribute for argument cluster: labels (HTTP 400)

Bug #1722537 reported by George Shuklin
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Magnum
Triaged
Medium
Unassigned

Bug Description

I'm evaluating magnum, and found that vanilla devstack installation for pike fails on cluster-create command with message Create for cluster foobar failed: Unknown attribute for argument cluster: labels (HTTP 400)

Steps to reproduce:

devstack, stable/pike branch
local.conf:
[[local|localrc]]
ADMIN_PASSWORD=sacred
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
enable_plugin heat https://github.com/openstack/heat stable/pike
enable_plugin magnum https://github.com/openstack/magnum stable/pike

source openrc
magnum cluster-template-create k8s-cluster-template --image 57af817a-5ead-4352-be2b-9e84d73969c8 --keypair x220 --external-network 7877b03e-ed18-4733-8ccb-2d7a1338ffbb --dns-nameserver 8.8.8.8 --flavor m1.small --coe kubernetes --network-driver flannel

(image - fedora-atomic, external-network - public network).

magnum cluster-create --cluster-template 282b0792-692c-4874-8ab0-e54053e7f5d2 foobar

Create for cluster foobar failed: Unknown attribute for argument cluster: labels (HTTP 400) (Request-ID: req-b47a0fa2-2dc5-4b7f-89d9-7cd044f8aa13)

Log entry from magnum-api:

Oct 10 13:44:12 devstack magnum-api[16595]: 2017-10-10 13:44:12.191 DEBUG magnum.api.controllers.v1 [-] Processing request: url: http://78.140.148.46:9511/v1/clusters, POST, body: {"cluster_template_id": "282b0792-692c-4874-8ab0-e54053e7f5d2", "na
me": "foobar", "labels": {}, "keypair": null, "master_count": 1, "node_count": 1, "create_timeout": 60, "discovery_url": null} from (pid=27420) _route /opt/stack/magnum/magnum/api/controllers/v1/__init__.py:233
Oct 10 13:44:12 devstack magnum-api[16595]: 2017-10-10 13:44:12.194 DEBUG oslo_policy._cache_handler [req-a25b98ef-ace5-403b-bd72-883544462864 demo demo] Reloading cached file /etc/magnum/policy.json from (pid=27420) read_cached_
file /usr/local/lib/python2.7/dist-packages/oslo_policy/_cache_handler.py:40
Oct 10 13:44:12 devstack magnum-api[16595]: 2017-10-10 13:44:12.197 DEBUG oslo_policy.policy [req-a25b98ef-ace5-403b-bd72-883544462864 demo demo] Reloaded policy file: /etc/magnum/policy.json from (pid=27420) _load_policy_file /u
sr/local/lib/python2.7/dist-packages/oslo_policy/policy.py:681
Oct 10 13:44:12 devstack magnum-api[16595]: 2017-10-10 13:44:12.200 DEBUG wsme.api [req-a25b98ef-ace5-403b-bd72-883544462864 demo demo] Client-side error: Unknown attribute for argument cluster: labels from (pid=27420) format_exc
eption /usr/local/lib/python2.7/dist-packages/wsme/api.py:222
Oct 10 13:44:12 devstack magnum-api[16595]: 2017-10-10 13:44:12.201 INFO werkzeug [req-a25b98ef-ace5-403b-bd72-883544462864 demo demo] 78.140.148.46 - - [10/Oct/2017 13:44:12] "POST /v1/clusters HTTP/1.1" 400 -

devstack commit: 4358418d7d20a18667801105eb246199036e9d57 (stable/pike)
magnum commit: 133352d3bb06a35d77187f7bad56ae47eb324815 (stable/pile)

Revision history for this message
George Shuklin (george-shuklin) wrote :

Update: I fixed this by manually switching branch for magnumclient repo to stable/pike and running sudo python setup.py install. IMHO it should be done by devstack or magnum (both were pinned to stable/pike).

Revision history for this message
Spyros Trigazis (strigazi) wrote :

to clarify this is a bug when using service pike and client master/queens

Revision history for this message
yatin (yatinkarel) wrote :

Need similar patch for stable/pike: https://review.openstack.org/#/c/472550/

Changed in magnum:
status: New → Triaged
importance: Undecided → Medium
milestone: none → queens-1
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.