Invalid error message when Load-import failed due to lack of space in /scratch

Bug #2051100 reported by ramu ummadishetty
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
ramu ummadishetty

Bug Description

Brief Description

when load-import failed due to lack of space in /scratch.

It appears that the code is not happy with some characters due to HTML:

Single quote is being modified to '
Less-than sign is being modified to <
Greater-than sign is being modified to >
$ system load-import --active bootimage.iso bootimage.sig
This operation will take a while. Please wait.
....
Load import failed. Reason: Insufficient space on /scratch for request /v1/loads/import_load, /scratch must have at least 15964571859 bytes of free space. You can delete unused files from /scratch or increase the size of it with: 'system host-fs-modify <hostname> scratch=<new_size_in_GiB>'
Gerrit links to this change:

https://review.opendev.org/c/starlingx/config/+/899865

https://review.opendev.org/c/starlingx/distcloud/+/897563

Severity

Minor. However, this is affecting the readability and user-friendliness of error messages.

Steps to Reproduce

Make sure /scratch does not have enough space to load ISO for the subclouds maybe using around 10G.
Note: In my case, the DM config file is forcing 16G and that does not seem enough (I checked and there is no /scratc/tmp_load folder). Side question: Is 16G no longer enough? I ask because that is the default size.

Expected Behavior

Error message should indicate "'system host-fs-modify <hostname> scratch=<new_size_in_GiB>'"

Load import failed. Reason: Insufficient space on /scratch for request /v1/loads/import_load, /scratch must have at least 15964571907 bytes of free space. You can delete unused files from /scratch or increase the size of it with: 'system host-fs-modify <hostname> scratch=<new_size_in_GiB>'
Actual Behavior

Load import failed. Reason: Insufficient space on /scratch for request /v1/loads/import_load, /scratch must have at least 15964571859 bytes of free space. You can delete unused files from /scratch or increase the size of it with: &#x27;system host-fs-modify &lt;hostname&gt; scratch=&lt;new_size_in_GiB&gt;&#x27;

Reproducibility

1 out of 1.

System Configuration

All system config

description: updated
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/+/906480

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/+/906480
Committed: https://opendev.org/starlingx/config/commit/0b353fd70f684a27a44d1c3dacda7e9232653b35
Submitter: "Zuul (22348)"
Branch: master

commit 0b353fd70f684a27a44d1c3dacda7e9232653b35
Author: ramu ummadishetty <email address hidden>
Date: Wed Jan 24 05:05:00 2024 -0500

    Decoding the enc chars in err msg in load import

    Some characters in error message was displayed
    in encoded format due to HTML

    Example:
    Single quote is being modified to &#x27;
    Less-than sign is being modified to &lt;
    Fixed this issue by using HTML module unescape
    method, which helps to decode the encoded characters

    TEST PLAN:
    PASS: AIO-SX - after running
    $ system load-import --active bootimage.iso bootimage.sig
    system error message show proper error without encoding
    PASS: AIO-SX bootstrap
    PASS: AIO-SX host lock and unlock successfull

    Closes-Bug: 2051100

    Change-Id: I53d0ccea59bdee4cd6d974dc13a4c49eb51a8597
    Signed-off-by: ramu ummadishetty <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.9.0 stx.config
Changed in starlingx:
assignee: nobody → ramu ummadishetty (rummadis)
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.