Comment 6 for bug 1331883

Revision history for this message
Anton Rodionov (arodionov) wrote : Re: [Bug 1331883] Re: Unable to change nodes' yaml configuration through CLI

Including Denis Ipatov into the conversation, he was able to reproduce the
issue.
I was only reporting the customer-found defect. The customer has the latest
release, 5.0.

Denis, please look at this.

On Thu, Jun 19, 2014 at 5:02 PM, Dima Shulyak <email address hidden> wrote:

> Anton, i tested this code on lab, and was able to update interfaces.
> Can you confirm that it works for you?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1331883
>
> Title:
> Unable to change nodes' yaml configuration through CLI
>
> Status in Fuel: OpenStack installer that works:
> In Progress
>
> Bug description:
> Using the fuel CLI or curl directly we are unable to upload interface
> configuration. Even though the config uploaded is the same as the
> config downloaded it complains that the interface is missing a type.
> Type is clearly set as you can see below.
>
> [root@fuel ~]# curl -X PUT
> http://127.0.0.1:8000/api/v1/nodes/1/interfaces/ -H
> Content-Type:application/json -d '[{"interfaces": [{"name": "eth0", "type":
> "ether", "state": "up", "mac": "00:25:b5:61:0d:9f", "max_speed": 10000,
> "current_speed": 20000, "assigned_networks": [{"id": 1, "name":
> "fuelweb_admin"}, {"id": 14, "name": "management"}], "type": "ether", "id":
> 2}], "id": 1}]'
> Node '1': each interface must have a type
>
> [root@fuel ~]# fuel --debug --env 4 node --node-id 1 --network
> --download
> GET http://127.0.0.1:8000/api/v1/nodes/1/interfaces/
> Node attributes for interfaces were written to:
> /root/node_1/interfaces.yaml
> [root@fuel ~]# cat node_1/interfaces.yaml
> - assigned_networks:
> - id: 1
> name: fuelweb_admin
> - id: 14
> name: management
> current_speed: 20000
> id: 2
> mac: 00:25:b5:61:0d:9f
> max_speed: 10000
> name: eth0
> state: up
> type: ether
> - assigned_networks:
> - id: 13
> name: public
> - id: 15
> name: storage
> - id: 16
> name: private
> current_speed: 20000
> id: 1
> mac: 00:25:b5:61:0d:8f
> max_speed: 10000
> name: eth1
> state: up
> type: ether
> [root@fuel ~]# fuel --debug --env 4 node --node-id 1 --network --upload
> PUT http://127.0.0.1:8000/api/v1/nodes/1/interfaces/
> data=[{"interfaces": [{"name": "eth0", "mac": "00:25:b5:61:0d:9f", "state":
> "up", "max_speed": 10000, "current_speed": 20000, "assigned_networks":
> [{"id": 1, "name": "fuelweb_admin"}, {"id": 14, "name": "management"}],
> "type": "ether", "id": 2}, {"name": "eth1", "mac": "00:25:b5:61:0d:8f",
> "state": "up", "max_speed": 10000, "current_speed": 20000,
> "assigned_networks": [{"id": 13, "name": "public"}, {"id": 15, "name":
> "storage"}, {"id": 16, "name": "private"}], "type": "ether", "id": 1}],
> "id": 1}]
> HTTP Error 400: Bad Request (Node '1': each interface must have a type)
> [root@fuel ~]#
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/fuel/+bug/1331883/+subscriptions
>

--
Best regards
Anton Rodionov
OpenStack Operations Engineer
Mirantis Services