Size annotations won't work with upper case size type on k8s-coredump-handler configuration

Bug #2002024 reported by Heron Vieira
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Heron Vieira

Bug Description

Brief Description

K8s-coredump handler won't accept the size type in upper case (e.g 200K, 2M, 1G) for the annotations core_max_size, core_max_used, core_min_free. Alternatively using lower case (e.g 200k, 2m, 1g) for these annotations works.

Severity

Minor: System/Feature is usable with minor issue

Steps to Reproduce

Create a pod yml with the annotations using the size type in upper case.

annotations: {
    starlingx.io/core_pattern: "core.%P.%u.%g.%s.%t.%e",
    starlingx.io/core_max_size: 200K,
    }

Expected Behavior

The K8s-coredump handler should make the coredump respecting the configured annotations

Actual Behavior

Exception when parsing the annotations.

Reproducibility

Reproducible

System Configuration

-

Branch/Pull Time/Commit

-

Timestamp/Logs

-

Alarms

-

Test Activity

Developer Testing (Unit Test)

Workaround

Using lower case (e.g 200k, 2m, 1g) for these annotations works.

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

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

Changed in starlingx:
status: New → In Progress
Ghada Khalil (gkhalil)
tags: added: stx.containers
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to utilities (master)

Reviewed: https://review.opendev.org/c/starlingx/utilities/+/869392
Committed: https://opendev.org/starlingx/utilities/commit/80296b9907af2724d3eaadcb1ad657924430de34
Submitter: "Zuul (22348)"
Branch: master

commit 80296b9907af2724d3eaadcb1ad657924430de34
Author: Heron Vieira <email address hidden>
Date: Thu Jan 5 15:49:15 2023 -0300

    Fix size configuration annotations for k8s-coredump-handler

    Fix a issue where the size configuration annotations for
    k8s-coredump-handler would throw an exception in case
    the configuration used upper case size type (e.g 200K)

    Test Plan:
    PASS: Create and crash a pod with annotations configured
          with a upper case and verify if coredump is generated

    Closes-bug: 2002024

    Signed-off-by: Heron Vieira <email address hidden>
    Change-Id: I2952f7555b05689905921b4c9a75b9a17067fcab

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.8.0
Changed in starlingx:
assignee: nobody → Heron Vieira (hevieira)
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.