Plugins metadata (keys in hash with settings) gets corrupted

Bug #1518993 reported by Igor Zinovik on 2015-11-23
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Critical
Vitalii Myhal

Bug Description

Steps to reproduce:
1. Install fuel plugin on Fuel master node , e.g. (fuel-plugin-nsxv)
2. Try to switch to Settings tags

Actual result:
Web UI freezes.
Chrome debug console shows:
TypeError: Value of settings:nsxv.nsxv_additional.value is undefined. Set options.strict to false to allow undefined values.

After exporting data from Nailgun DB, we see that plugins keys are
named to the way web UI expect them to be:
http://paste.openstack.org/show/479730/

Expected result:
Tab is correctly rendered.

Reproducable: 100%

VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "8.0"
  openstack_version: "2015.1.0-8.0"
  api: "1.0"
  build_number: "198"
  build_id: "198"
  fuel-nailgun_sha: "8d6ef41f1bef84378a61ee98b46aeb2b925fd10f"
  python-fuelclient_sha: "e685d68c1c0d0fa0491a250f07d9c3a8d0f9608c"
  fuel-agent_sha: "1d98edb0468aa70b9b3a43b8422804e9095e7d9d"
  fuel-nailgun-agent_sha: "b56f832abc18aee9a8c603fd6cc2055c5f4287bc"
  astute_sha: "c8400f51b0b92254da206de55ef89d17fdf35393"
  fuel-library_sha: "33c0fa3aada734dc9e6f315197ce0e4a16f5987c"
  fuel-ostf_sha: "11afd5743a12b1006317d3ca7000d1ede77bdae2"
  fuel-createmirror_sha: "994fed9b1ed889718b61a59733275c08c2dd4c64"
  fuelmenu_sha: "d12061b1aee82f81b3d074de74ea27a6e962a686"
  shotgun_sha: "c377d163519f6d10b69a654019d6086ba5f14edc"
  network-checker_sha: "2c62cd52655ea6456ff6294fd63f18d6ea54fe38"
  fuel-upgrade_sha: "1e894e26d4e1423a9b0d66abd6a79505f4175ff6"
  fuelmain_sha: "22fe551f5525d11a1854fd87dbc8c77fae8fec08"

As far as I see, plugin attributes have prefix https://github.com/openstack/fuel-web/blob/master/nailgun/nailgun/plugins/manager.py#L43 which brakes relations in restrictions.

Artem Savinov (asavinov) wrote :

And metadata key show as '#1_metadata'- we can not set restrictions for the plugin.

Ihor Kalnytskyi (ikalnytskyi) wrote :

Andriy Popovych that's awful we broke backward compatibility. Should be fixed ASAP.

Dmitry Pyzhov (dpyzhov) on 2015-11-23
tags: added: area-python
removed: area-plugins
Dmitry Pyzhov (dpyzhov) on 2015-11-23
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Vitalii Myhal (xmig)
status: New → Confirmed
Vitalii Myhal (xmig) on 2015-11-23
Changed in fuel:
status: Confirmed → In Progress
Dmitry Pyzhov (dpyzhov) on 2015-11-24
tags: added: regression-8.0
Igor Zinovik (izinovik) wrote :

Folks this problem blocks plugin development.

Is there any progress on this? If we can help some way please let me know.
At least we can provide access to lab with enabled plugin and ready to test patches.

Vitalii Myhal (xmig) wrote :

Another solution was proposed and now hotfix is in progress.

tags: added: team-bugfix

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

commit f83c4ea23b903e7e7d52bdfd367c82b17afe164d
Author: Vitalii Myhal <email address hidden>
Date: Sat Nov 28 15:13:47 2015 -0600

    Versions of a plugin have been placed in a separate container

    Closes-Bug: #1440046
    Closes-Bug: #1518993

    Change-Id: I76655541fd7c00cdd863e145b28fba804b4ed801

Changed in fuel:
status: In Progress → Fix Committed

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

commit 55c83a765187b3e6b6082b2d8643c36ceb7d1956
Author: Julia Aranovich <email address hidden>
Date: Wed Dec 23 12:41:16 2015 +0300

    Handle new plugin versions structure in UI

    Related-Bug: #1518993
    Closes-Bug: #1516976

    Change-Id: Ia0d61a2e92b72018c830e9305c6c9102331d1c05

Reviewed: https://review.openstack.org/262037
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=fe13a3286320580e121b9bc24685dde21138d097
Submitter: Jenkins
Branch: stable/8.0

commit fe13a3286320580e121b9bc24685dde21138d097
Author: Vitalii Myhal <email address hidden>
Date: Sat Nov 28 15:13:47 2015 -0600

    Versions of a plugin have been placed in a separate container

    Closes-Bug: #1440046
    Closes-Bug: #1518993

    Change-Id: I76655541fd7c00cdd863e145b28fba804b4ed801
    (cherry picked from commit f83c4ea23b903e7e7d52bdfd367c82b17afe164d)

Reviewed: https://review.openstack.org/262036
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=1a016e57a55fed63b2a5224f2b128006732581d9
Submitter: Jenkins
Branch: stable/8.0

commit 1a016e57a55fed63b2a5224f2b128006732581d9
Author: Julia Aranovich <email address hidden>
Date: Wed Dec 23 12:41:16 2015 +0300

    Handle new plugin versions structure in UI

    Related-Bug: #1518993
    Closes-Bug: #1516976

    Change-Id: Ia0d61a2e92b72018c830e9305c6c9102331d1c05
    (cherry picked from commit 55c83a765187b3e6b6082b2d8643c36ceb7d1956)

tags: added: on-verification
Dmitriy Kruglov (dkruglov) wrote :

Verified on MOS 8.0, build 367. The issue is fixed.

ISO details:
VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "8.0"
  api: "1.0"
  build_number: "367"
  build_id: "367"
  fuel-nailgun_sha: "20ff1666ea6171a085051ffd77444c52f972b7e7"
  python-fuelclient_sha: "4f234669cfe88a9406f4e438b1e1f74f1ef484a5"
  fuel-agent_sha: "1d2f6bc1123b9364ba65b41afcc0608662bb25b9"
  fuel-nailgun-agent_sha: "92ebd5ade6fab60897761bfa084aefc320bff246"
  astute_sha: "c7ca63a49216744e0bfdfff5cb527556aad2e2a5"
  fuel-library_sha: "6ec90013ed909997097563cddc762937dc873eb3"
  fuel-ostf_sha: "889ddb0f1a4fa5f839fd4ea0c0017a3c181aa0c1"
  fuel-mirror_sha: "8bb8c70efc61bcf633e02d6054dbf5ec8dcf6699"
  fuelmenu_sha: "824f6d3ebdc10daf2f7195c82a8ca66da5abee99"
  shotgun_sha: "63645dea384a37dde5c01d4f8905566978e5d906"
  network-checker_sha: "9f0ba4577915ce1e77f5dc9c639a5ef66ca45896"
  fuel-upgrade_sha: "616a7490ec7199f69759e97e42f9b97dfc87e85b"
  fuelmain_sha: "5dd650b541d40251e07afde4072d948be577dc0c"

Changed in fuel:
status: Fix Committed → Fix Released
tags: removed: on-verification
Artem Savinov (asavinov) wrote :

Bug not full fix.

this not work for plugin:

attributes:
  # Show only if vcenter used
  metadata:
    restrictions:
      - condition: "settings:common.use_vcenter.value == false or cluster:net_provider != 'neutron'"
        action: 'hide'

Steps to reproduce:
1. Install fuel plugin on Fuel master node , e.g. (fuel-plugin-nsxv)
2. Create environment with vcenter and nova network(or qemu/kvm with neutron)
3. Switch to Settings tab and try enable plugin

Actual result:
I can enable plugin

Expected result:
Nsxv plugin not show on Settings tab

Changed in fuel:
status: Fix Released → Confirmed
Vitalii Myhal (xmig) wrote :

It seems like this restriction is wrong:

restrictions:
      - condition: "settings:common.use_vcenter.value == false or cluster:net_provider != 'neutron'"
        action: 'hide'

Artem Savinov (asavinov) wrote :

why wrong ? it worked for MOS 7.

Vitalii Myhal (xmig) wrote :

use_vcenter == false --> net_provider == 'neutron'
use_vcenter == true --> net_provider == 'nova-network' (i.e. net_provider != 'neutron')

in both cases the result of a boolean operation is true

Artem Savinov (asavinov) wrote :

All right, in such cases, the plugin must be hidden. Plugin must be show(may be enabled) only if use_vcenter = true and net_provider = neutron.

Julia Aranovich (jkirnosova) wrote :

I created a separate ticket for the UI code bug, that was figured out: https://bugs.launchpad.net/fuel/+bug/1534094
Seems that this ticket should be closed, because it is about another issue originally.

Vitalii Myhal (xmig) on 2016-01-14
Changed in fuel:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers