Apply kubernetes service parameter after apply,remove Vault app throws traceback error

Bug #1889019 reported by ayyappa
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Cole Walker

Bug Description

Brief Description
-----------------
Apply vault, remove it and try to add the podsecuritypolicy,apply kubernetes throws the traceback error

Severity
--------
Major

Steps to Reproduce
------------------
1)system upload,apply the vault app
system application-upload /usr/local/share/applications/helm/vault-1.0-8.tgz
2)Remove it after applied successfully
system application-remove vault
3)Now add the podsecurity to the kube api parameter list
system service-parameter-add kubernetes kube_apiserver admission_plugins=PodSecurityPolicy
4)Apply the kubernetes service-parameter throws the following traceback error(actually just applying kubernetes service parameter throws the error)
system service-parameter-apply kubernetes

[sysadmin@controller-1 ~(keystone_admin)]$ system service-parameter-apply kubernetes
'NoneType' object has no attribute 'HELM_NS_VAULT'
Traceback (most recent call last):

  File "/usr/lib64/python2.7/site-packages/sysinv/openstack/common/rpc/amqp.py", line 437, in _process_data
    **args)

  File "/usr/lib64/python2.7/site-packages/sysinv/openstack/common/rpc/dispatcher.py", line 172, in dispatch
    result = getattr(proxyobj, method)(ctxt, **kwargs)

  File "/usr/lib64/python2.7/site-packages/sysinv/conductor/manager.py", line 7745, in update_service_config
    self._config_apply_runtime_manifest(context, config_uuid, config_dict)

  File "/usr/lib64/python2.7/site-packages/sysinv/conductor/manager.py", line 8726, in _config_apply_runtime_manifest
    self.evaluate_app_reapply(context, app_name)

  File "/usr/lib64/python2.7/site-packages/sysinv/conductor/manager.py", line 11129, in evaluate_app_reapply
    armada_format=True, armada_chart_info=app.charts, combined=True)

  File "/usr/lib64/python2.7/site-packages/sysinv/helm/helm.py", line 50, in _wrapper
    return func(self, *args, **kwargs)

  File "/usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 328, in inner
    return f(*args, **kwargs)

  File "/usr/lib64/python2.7/site-packages/sysinv/helm/helm.py", line 658, in generate_helm_application_overrides
    cnamespace)

  File "/usr/lib64/python2.7/site-packages/sysinv/helm/helm.py", line 412, in _get_helm_application_overrides
    cnamespace)})

  File "/usr/lib64/python2.7/site-packages/sysinv/helm/helm.py", line 317, in _get_helm_chart_overrides
    cnamespace))

  File "/opt/platform/helm/20.06/vault/1.0-8/plugins/k8sapp_vault/helm/psp_rolebinding.py", line 34, in get_overrides

AttributeError: 'NoneType' object has no attribute 'HELM_NS_VAULT'

Expected Behavior
------------------
kubernetes service parameter apply should work without any errors

Actual Behavior
----------------
system service-parameter-apply kubernetes throws the traceback

Reproducibility
---------------
100%

System Configuration
--------------------
tested on all the following systems
simplex system,sm_4 ipv4
standard wp_3_6, ipv4

Branch/Pull Time/Commit
-----------------------
2020-07-24

Last Pass
---------
This is a new test scenario

Timestamp/Logs
--------------
2020-07-26T20:27:43.622

Test Activity
-------------
Feature Testing

Workaround
----------
Haven't found any

Revision history for this message
Ghada Khalil (gkhalil) wrote :

stx.5.0 / medium priority - very specific test-case should be investigated further.

Changed in starlingx:
assignee: nobody → Cole Walker (cwalops)
tags: added: stx.5.0 stx.apps
Changed in starlingx:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Ghada Khalil (gkhalil) wrote :

This issue was encountered with other applications when PSP was introduced. It looks like the PSP code for vault did not provide a unique PSP plugin name. This needs to be corrected.
See: https://opendev.org/starlingx/openstack-armada-app/commit/0cdedf8e447f5be0d74017aba669a5c28393a0e5

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

Fix proposed to branch: master
Review: https://review.opendev.org/743574

Changed in starlingx:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to portieris-armada-app (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/743668

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

Reviewed: https://review.opendev.org/743574
Committed: https://git.openstack.org/cgit/starlingx/vault-armada-app/commit/?id=58feaffd3fa0d01625146e4fb7b91530241d53b2
Submitter: Zuul
Branch: master

commit 58feaffd3fa0d01625146e4fb7b91530241d53b2
Author: Cole Walker <email address hidden>
Date: Tue Jul 28 11:37:55 2020 -0400

    Provide unique name for psp-plugin

    The application framework requires that plugin names are unique accross
    all apps loaded on the system. This change ensures that psp plugin does
    not conflict and can be properly enabled on a system

    Closes-Bug: 1889019

    Change-Id: I187c4f421a3045e6ac4f994fe358891e0a179a1e
    Signed-off-by: Cole Walker <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to portieris-armada-app (master)

Reviewed: https://review.opendev.org/743668
Committed: https://git.openstack.org/cgit/starlingx/portieris-armada-app/commit/?id=55afdb279ed51e6b93acf56c8ea8f2ea54a4eb99
Submitter: Zuul
Branch: master

commit 55afdb279ed51e6b93acf56c8ea8f2ea54a4eb99
Author: Joseph Richard <email address hidden>
Date: Tue Jul 28 11:14:19 2020 -0400

    Rename psp chart to portieris-psp-rolebinding

    In order to allow uniqueness across helm applications, rename the
    psp-rolebinding helm chart to portieris-psp-rolebinding

    Also fix up issue with loading psp-rolebinding helm plugin.

    Related-bug: 1889019
    Story: 2007348
    Task: 40430
    Change-Id: Ic113732d93d93c6cd154ddc4660ba15f5424c737
    Signed-off-by: Joseph Richard <email address hidden>

Revision history for this message
ayyappa (mantri425) wrote :

Fix verified on the build 2020-07-30_00-00-00 on standard system wcp_3_6 ipv4

tags: removed: stx.retestneeded
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.