Log error indicating namespace not found during application upload

Bug #2067070 reported by David Barbosa Bastos
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
David Barbosa Bastos

Bug Description

Brief Description
-----------------
Namespace not found error message is shown in sysinv.log when uploading the app-security-profiles-operator package when FluxCD operation validates the manifest files.

Severity
--------
Minor: System/Feature is usable with minor issue

Steps to Reproduce
------------------
1) Take the master branch code of app-security-profiles-operator repo{}
2) system application-upload security-profiles-operator-1.0-1.tgz
3) check /var/log/sysinv.log

Expected Behavior
------------------
namespace error should not come

Actual Behavior
----------------
namespace error appears in sysinv.log

Reproducibility
---------------
80% - Appears only with applications that have their namespace.

System Configuration
--------------------
AIO-SX

Branch/Pull Time/Commit
-----------------------
SW_VERSION="24.03"
BUILD_TARGET="Host Installer"
BUILD_TYPE="Formal"
BUILD_ID="2024-05-15_19-00-12"
SRC_BUILD_ID="1982"

Last Pass
---------
N/A

Timestamp/Logs
--------------
sysinv.log

sysinv 2022-12-21 01:28:23.175 87641 INFO sysinv.conductor.kube_app [-] Doing FluxCD operation validate with the following manifest: /opt/platform/fluxcd/22.12/security-profiles-operator/1.0-1/security-profiles-operator-fluxcd-manifests
sysinv 2022-12-21 01:28:26.408 87641 ERROR sysinv.conductor.kube_app [-] Command: kubectl --kubeconfig /etc/kubernetes/admin.conf apply -k /opt/platform/fluxcd/22.12/security-profiles-operator/1.0-1/security-profiles-operator-fluxcd-manifests --dry-run=server; Error: Unexpected error while running command.
Command: kubectl --kubeconfig /etc/kubernetes/admin.conf apply -k /opt/platform/fluxcd/22.12/security-profiles-operator/1.0-1/security-profiles-operator-fluxcd-manifests --dry-run=server
Exit code: 1
Stdout: ''
Stderr: 'Error from server (NotFound): error when creating "/opt/platform/fluxcd/22.12/security-profiles-operator/1.0-1/security-profiles-operator-fluxcd-manifests": namespaces "security-profiles-operator" not found\nError from server (NotFound): error when creating "/opt/platform/fluxcd/22.12/security-profiles-operator/1.0-1/security-profiles-operator-fluxcd-manifests": namespaces "security-profiles-operator" not found\nError from server (NotFound): error when creating "/opt/platform/fluxcd/22.12/security-profiles-operator/1.0-1/security-profiles-operator-fluxcd-manifests": namespaces "security-profiles-operator" not found\nError from server (NotFound): error when creating "/opt/platform/fluxcd/22.12/security-profiles-operator/1.0-1/security-profiles-operator-fluxcd-manifests": namespaces "security-profiles-operator" not found\n'

Test Activity
-------------
Developer Testing

Workaround
----------
N/A

Changed in starlingx:
assignee: nobody → David Barbosa Bastos (dbarbosa-wr)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to config (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/config/+/920389

Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config (master)

Reviewed: https://review.opendev.org/c/starlingx/config/+/920389
Committed: https://opendev.org/starlingx/config/commit/46cb112872b37f8ccdb7f282539306a9b9862722
Submitter: "Zuul (22348)"
Branch: master

commit 46cb112872b37f8ccdb7f282539306a9b9862722
Author: David Bastos <email address hidden>
Date: Fri May 24 09:41:11 2024 -0300

    Improvement log error indicating namespace not found

    Namespace not found error message is shown in sysinv.log when an application that has a specific namespace is uploaded.

    This log is expected and has no impact on the system. This
    happens due to the command "kubectl -k <manifest_dir>
    --dry-run=server". If the application has a specific namespace that
    the system does not yet have, the command shows this error. But
    there is nothing to worry about, as the namespace is created within
    the apply process.

    To avoid misinterpretations, this log has been suppressed.

    Test Plan:
    PASS: Add the new log to kube_app.py and restart sysinv.
    PASS: During the application upload process, the log that says the
          namespace was not found no longer appears.

    Closes-Bug: 2067070

    Change-Id: I6e56c338c9789c686381c330be65ec109a3f0b50
    Signed-off-by: David Bastos <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.10.0 stx.apps
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.