Wrong fuel plugin can break nailgun

Bug #1501681 reported by Vyacheslav Struk
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Sergey Slipushenko
7.0.x
Won't Fix
High
Sergey Slipushenko

Bug Description

Fuel 7.0, release

Plugin with malformed network_roles.yaml could be successfully built and installed.
Just enabling the plugin breaks the environment. Web UI ignores all the clicks on that envioronment, nailgun logs returns http error 500.

Here is content of wrong network_roles.yaml to reproduce the bug:

- id: "ifname"
  default_mapping: "private"
  properties:
    subnet: false
    gateway: false
    vip:
       - name: "null"

Tags: area-python
description: updated
summary: - Wrong fuel plugin can brake nailgun
+ Wrong fuel plugin can break nailgun
Changed in fuel:
assignee: nobody → Fuel Python Team (fuel-python)
importance: Undecided → High
milestone: none → 8.0
Revision history for this message
Sheena Conant (sheena-conant) wrote :

Is this an issue with the plugins or is this an issue that needs to be resolved by confirming the validity of the network_roles.yaml file and communicating to the user if it is not valid?

For example, if a user uploaded the same network_roles file as shown above, would it still fail the same way? Or is this unique to plugins?

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

Probably it happens due to the fact that there's no Private network. BTW, on latest master the proper error should be returned.

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

@Sheena,

I believe this is something that Nailgun should handle properly, since the provided network role looks good.. and we can't do more at the time of building plugin.

Revision history for this message
Sheena Conant (sheena-conant) wrote :

Slava suggested validating the network_roles in the fuel plugin builder, but I don't know if fuel plugin builder knows about validation requirements for Fuel itself. It seems like Fuel should maybe own the validation of the .yaml files and provide feedback to the user either prior to or during deployment that it cannot be completed successfully due to invalid .yaml files being supplied.

Stanislav Makar (smakar)
Changed in fuel:
status: New → Triaged
Revision history for this message
Andrey Danin (gcon-monolake) wrote :

Yes, I think Fuel need to validate a plugin before installing it that it wouldn't break anything like in this case.

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

Sheena, Andrey - it's *impossible* to do on installing stage.

Let me explain. A network role provides a set of requirements for the network (such as a number of VIPs to allocate), but it's up to user to assign this network role to network.

So basically -

* we do not know which clusters will use this plugin, and different clusters have different network settings
* we do not know where the provided network role will be assigned, so we can't even validate it on the step when user enables plugin

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

So I propose to fix 500 Internal Error in scope of this issue, and return a proper HTTP error response (and log error).

And to think how to fix the problem with UI in scope of the bug #1504572 (it's tricky).

Revision history for this message
Sheena Conant (sheena-conant) wrote :

Igor - I'm okay with it erroring out, the biggest issue here was that the file was making the entire environment lock up, which is not an acceptable failure scenario. We were trying to provide a more robust solution, but I would agree that a simple error would be an effective option.

Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Sergey Slipushenko (sslypushenko)
Changed in fuel:
status: Triaged → In Progress
Revision history for this message
Sergey Slipushenko (sslypushenko) wrote :

Sample from bug description will not produce 500 error after this patch
https://bugs.launchpad.net/fuel/+bug/1499289
It is a partial fix for https://review.openstack.org/#/c/228800/

After applying this path nailgun produces 400 error retrieving cluster network configuration. As far as I understand it is desirable behavior for now.

Changed in fuel:
status: In Progress → Fix Committed
Dmitry Pyzhov (dpyzhov)
tags: added: area-python
Revision history for this message
Sergey Slipushenko (sslypushenko) wrote :

There is no point in backporting of https://bugs.launchpad.net/fuel/+bug/1499289 on 7.0.x because UI fix https://bugs.launchpad.net/fuel/+bug/1504572 is not planned for 7.0.x

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/240009

Changed in fuel:
status: Fix Committed → In Progress
Revision history for this message
Sergey Slipushenko (sslypushenko) wrote :
Changed in fuel:
status: In Progress → Fix Committed
tags: added: on-verification
Revision history for this message
Dmitriy Kruglov (dkruglov) wrote :

Verified on MOS 8.0, build 496. The issue is not reproduced.

ISO details:
VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "8.0"
  api: "1.0"
  build_number: "496"
  build_id: "496"
  fuel-nailgun_sha: "934c2d11b234193c6ac8e41cd1388df0ed3583e0"
  python-fuelclient_sha: "4f234669cfe88a9406f4e438b1e1f74f1ef484a5"
  fuel-agent_sha: "e40bcfbb1f5518d7a464cc330909cf09b84e7c20"
  fuel-nailgun-agent_sha: "b2bb466fd5bd92da614cdbd819d6999c510ebfb1"
  astute_sha: "b81577a5b7857c4be8748492bae1dec2fa89b446"
  fuel-library_sha: "b91e96e848057be4acadd10c2b55a6529387fe51"
  fuel-ostf_sha: "ab5fd151fc6c1aa0b35bc2023631b1f4836ecd61"
  fuel-mirror_sha: "351d568fa3b3e4dd062054b91d766aa54d379867"
  fuelmenu_sha: "234cb4cbb30fbd2df00f388c28f31606d9cae15f"
  shotgun_sha: "63645dea384a37dde5c01d4f8905566978e5d906"
  network-checker_sha: "a43cf96cd9532f10794dce736350bf5bed350e9d"
  fuel-upgrade_sha: "616a7490ec7199f69759e97e42f9b97dfc87e85b"
  fuelmain_sha: "6b993b3004e8d97d840b672d6c1d44c320975cd9"

Changed in fuel:
status: Fix Committed → Fix Released
tags: removed: on-verification
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.