[VIPs] Plugin should be able to request VIPs in the existing network role

Bug #1487011 reported by Aleksey Kasatkin
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Bulat Gaifullin

Bug Description

In 7.0 plugin is able to define new network roles in its metadata and request VIPs in description of those network roles.
It is required to allow plugin to use existing network roles and request additional VIPs for them.
It will improve UX of adding VIPs and reduce the number of network roles.
It is common case now when network roles is added just for requesting of new VIP. So, user should have additional knowledge what new network roles have required VIPs and what network this role should be mapped to.

Changed in fuel:
milestone: 7.0 → 8.0
Revision history for this message
Ihor Kalnytskyi (ikalnytskyi) wrote :

It looks like a feature to me, and actually against our original design.

tags: added: feature
Revision history for this message
Sergey Vasilenko (xenolog) wrote :

Actually original design suggest, that in the plugin's network_roles.yaml should be listed all network roles, that plugin will be use. To ensure that these network roles will exists. As implemented now plugin may contain only new network roles in the this file.

It is not a feature. It's a bug.

tags: removed: feature
Revision history for this message
Ihor Kalnytskyi (ikalnytskyi) wrote :

Sergey, you're wrong. The original design says nothing about what you told. Check it out for yourself -

http://specs.fuel-infra.org/fuel-specs-master/specs/7.0/vip-reservation.html

Design suggests ability to define new network roles and that's it. So it's a feature.

tags: added: feature
Changed in fuel:
status: New → Triaged
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Bulat Gaifullin (bgaifullin)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (master)

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

Changed in fuel:
status: Triaged → In Progress
Dmitry Pyzhov (dpyzhov)
tags: added: area-python
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/227216
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=d1c6dd606758493dd7dc4f1e3a7d82c98e45d1e2
Submitter: Jenkins
Branch: master

commit d1c6dd606758493dd7dc4f1e3a7d82c98e45d1e2
Author: Bulat Gaifullin <email address hidden>
Date: Thu Sep 24 13:39:05 2015 +0300

    Plugin is able to extend existing network roles

    The same network role from different plugins can be merged
    according to policy of merge, that allows each plugin to extend the VIP for role.

    TestCheckVIPsNames was deleted, because this patch makes it obsolete.

    Change-Id: I81e773e53ab67b4e7d424805134c0d86dcc7a43a
    Closes-Bug: #1487011

Changed in fuel:
status: In Progress → Fix Committed
tags: added: on-verification
Revision history for this message
Alexander Kurenyshev (akurenyshev) wrote :
Download full text (5.0 KiB)

Case 1:
1) Install master.
2) Install plugin (attached)
3) Modify /var/www/nailgun/plugins/vip_plugin-1.0/network_roles.yaml file:
- id: "public/vip"
  # Role mapping to network
  properties:
    # List of VIPs to be allocated
    vip:
         # Unique VIP name
       - name: "super_vip_name"
         # Optional linux namespace for VIP
         namespace: "haproxy"
4) Create a cluster and enable plugin.
5) Add one (for example) node with controller role
6) Deploy env for netconfig stage for example:
     fuel node --node 1 --end netconfig
7) Navigate to the node-1 and check /etc/hiera/astute.yaml

Actual result:
New vip resource is created:
root@node-1:~# pcs resource show vip__super_vip_name
 Resource: vip__super_vip_name (class=ocf provider=fuel type=ns_IPaddr2)
  Attributes: bridge=br-ex base_veth=v_super_vi_a610 ns_veth=b_super_vi_a610 ip=10.109.1.4 iflabel=ka cidr_netmask=24 ns=haproxy gateway_metric=10 gateway=10.109.1.1
  Meta Attrs: migration-threshold=3 failure-timeout=60 resource-stickiness=1
  Operations: monitor interval=5 timeout=20 (vip__super_vip_name-monitor-5)
              start interval=0 timeout=30 (vip__super_vip_name-start-0)
              stop interval=0 timeout=30 (vip__super_vip_name-stop-0)

root@node-1:~# ip netns exec haproxy ip -4 -o a| grep super
25: b_super_vi_a610 inet 10.109.1.4/24 scope global b_super_vi_a610\ valid_lft forever preferred_lft forever

New network role is not created.

Case 2:
1) Install master.
2) Install plugin (attached)
3) Modify /var/www/nailgun/plugins/vip_plugin-1.0/network_roles.yaml file:
- id: "public/vip"
  default_mapping: "public"
  properties:
    subnet: true
    gateway: false
    vip:
       - name: "super_vip_name"
         namespace: "haproxy"
4) Create a cluster and enable plugin.
5) Add one (for example) node with controller role
6) Deploy env for netconfig stage for example:
     fuel node --node 1 --end netconfig
7) Navigate to the node-1 and check /etc/hiera/astute.yaml

Result:
Deploy is failed. Because we try override subnet and gateway with values from network_roles.yaml.

2015-11-23T17:06:25 debug: [613] Process message from worker queue:
"null"
2015-11-23T17:06:26 debug: [613] Got message with payload
"null"
2015-11-23T17:06:26 err: [613] Error on sending message 'task in orchestrator': undefined method `[]' for nil:NilClass

Case 3:
1) Install master.
2) Install plugin (attached)
3) Modify /var/www/nailgun/plugins/vip_plugin-1.0/network_roles.yaml file:
- id: "public/vip2"
  # Role mapping to network
  default_mapping: "public"
  properties:
    # Should be true if network role requires subnet being set
    subnet: true
    # Should be true if network role requires gateway being set
    gateway: false
    # List of VIPs to be allocated
    vip:
         # Unique VIP name
       - name: "super_vip_name"
         # Optional linux namespace for VIP
         namespace: "haproxy"
4) Create a cluster and enable plugin.
5) Add one (for example) node with controller role
6) Deploy env for netconfig stage for example:
     fuel node --node 1 --end netconfig
7) Navigate to the node-1 and check /etc/hiera/astute.yaml

Actual result:
There is a new vip at new netwo...

Read more...

Changed in fuel:
status: Fix Committed → Fix Released
tags: removed: on-verification
Revision history for this message
Alexander Kurenyshev (akurenyshev) wrote :
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.