swarm baymodel does not honor master_flavor_id

Bug #1498570 reported by Ryan Rossiter
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
Undecided
hongbin

Bug Description

I created a baymodel with using the following command:

magnum baymodel-create --name swarmbaymodel2 --image-id fedora-21-atomic-3 --keypair-id testkey --external-network-id public --dns-nameserver 8.8.8.8 --master-flavor-id m1.small --flavor-id newflavor --coe swarm

magnum baymodel-show then gives the following output:

ubuntu@magnum-controller:~$ magnum baymodel-show swarmbaymodel2
+---------------------+--------------------------------------+
| Property | Value |
+---------------------+--------------------------------------+
| fixed_network | None |
| apiserver_port | None |
| docker_volume_size | None |
| image_id | fedora-21-atomic-3 |
| no_proxy | None |
| external_network_id | public |
| created_at | 2015-09-22T16:07:14+00:00 |
| http_proxy | None |
| updated_at | None |
| cluster_distro | fedora-atomic |
| name | swarmbaymodel2 |
| ssh_authorized_key | None |
| https_proxy | None |
| coe | swarm |
| keypair_id | testkey |
| master_flavor_id | m1.small |
| flavor_id | newflavor |
| dns_nameserver | 8.8.8.8 |
| uuid | 746e2d05-ba99-41ce-bdd9-229d24c2b0e9 |
+---------------------+--------------------------------------+

When I create a bay using that baymodel, all nodes have flavor "newflavor", so master_flavor_id did not get assigned to the swarm master.

It looks like https://github.com/openstack/magnum/blob/master/magnum/conductor/template_definition.py#L473-L487 only sets 'server_flavor' in the template for swarm. K8s (https://github.com/openstack/magnum/blob/master/magnum/conductor/template_definition.py#L362-L379) has master_flavor and minion_flavor, which are mapped to master_flavor_id and flavor_id, respectively.

Changed in magnum:
assignee: nobody → Arun prasath S (bingoarunprasath)
Changed in magnum:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (master)

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

Changed in magnum:
status: Confirmed → In Progress
Revision history for this message
Arun prasath S (bingoarunprasath) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on magnum (master)

Change abandoned by Arun prasath S (<email address hidden>) on branch: master
Review: https://review.openstack.org/232521
Reason: Original : https://review.openstack.org/#/c/232524/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Arun prasath S (<email address hidden>) on branch: master
Review: https://review.openstack.org/232524
Reason: Original : https://review.openstack.org/#/c/232504/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on magnum (master)

Change abandoned by Arun prasath S (<email address hidden>) on branch: master
Review: https://review.openstack.org/232563
Reason: Will squashing my changes into one commit and resubmit.

Revision history for this message
Arun prasath S (bingoarunprasath) wrote :

(Sorry for the mess, New contributor)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on magnum (master)

Change abandoned by Arun prasath S (<email address hidden>) on branch: master
Review: https://review.openstack.org/232914
Reason: Hi Jay / Maduri,

Thanks for the review.

I am going to abandon this change(Patch 5) and revert it to patch set 4, where I have 'flavor_id' instead of 'agent_flavor_id'.
('master_flavor_id' attribute is already in the baymodel)

I understand that adding 'agent_flavor_id' as suggested in Patch set 4 (Please ref comments), is not a good idea. As it will change the structure of the Baymodel. And we will end up having 3 attributes for flavor ('master_flavor_id', 'flavor_id' and 'agent_flavor_id')

P.S. K8s uses the same format as in Patch set 4 (i.e 'flavor_id' for minion nodes)

Please comment if otherwise.

Thanks,
Arun prasath

Adrian Otto (aotto)
Changed in magnum:
milestone: none → mitaka-1
Changed in magnum:
assignee: Arun prasath S (bingoarunprasath) → hongbin (hongbin034)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Hongbin Lu (<email address hidden>) on branch: master
Review: https://review.openstack.org/232914
Reason: Duplicated to https://review.openstack.org/#/c/232504/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum (master)

Reviewed: https://review.openstack.org/232504
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=7a0d43f82ccbbb92c0aacb016dc12cf32ddb4179
Submitter: Jenkins
Branch: master

commit 7a0d43f82ccbbb92c0aacb016dc12cf32ddb4179
Author: Arun prasath <email address hidden>
Date: Thu Oct 8 12:27:36 2015 +0000

    Separate flavor between master and agent node

    Swarm agent has been moved out of master node in the depending patch,
    so it is appropriate to separate the flavor now

    Co-Authored-By: Hongbin Lu <email address hidden>

    Closes-Bug: #1498570
    Change-Id: I6f5f15274a10f503a2554ec554e5c822f47a39dc

Changed in magnum:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/magnum 2.0.0

This issue was fixed in the openstack/magnum 2.0.0 release.

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.