Error signature message is showed after "software delete" command is executed

Bug #2069656 reported by Luis Eduardo Bonatti
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Undecided
Unassigned

Bug Description

Brief Description

After running the "software delete" command, the system shows the error message:
"Error:
Internal error occurred. Error signature [31b70344] "

Severity

Major

Steps to Reproduce
 # Upload ISO/Sig files
 # Run software list command
 # delete (software delete <load>) the load available

Expected Behavior

It should be possible to delete the load just uploaded.

Actual Behavior

System shows this error message:
"Error:
Internal error occurred. Error signature [31b70344]"

Reproducibility

Reproducible

System Configuration

Simplex

Last Pass

N/A

Timestamp/Logs

*software.log*
{code:java}
2024-06-13T17:51:51: software-controller-daemon[4066:139889509283584]: software_controller.py(1592): INFO: Deleting releases: starlingx-25.03.0
2024-06-13T17:51:51: software-controller-daemon[4066:139889509283584]: apt_utils.py(57): INFO: Removing package: acl
2024-06-13T17:51:52: software-controller-daemon[4066:139889509283584]: apt_utils.py(71): ERROR: "apt-ostree repo remove" error: return code 1 , Output: Error opening config file '/var/www/pages/updates/debian/rel-25.03/conf/distributions': No such file or directory(2)
There have been errors!
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apt_ostree/utils.py", line 30, in run_command
    return subprocess.run(
  File "/usr/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['reprepro', '-b', '/var/www/pages/updates/debian/rel-25.03', '-C', '25.03.0', 'remove', 'bullseye', 'acl']' returned non-zero exit status 254.During handling of the above exception, another exception occurred:Traceback (most recent call last):
  File "/usr/bin/apt-ostree", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python3/dist-packages/apt_ostree/cmd/shell.py", line 47, in main
    cli(prog_name="apt-ostree")
  File "/usr/lib/python3/dist-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/decorators.py", line 73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/apt_ostree/cmd/repo/remove.py", line 29, in remove
    Repo(state).remove()
  File "/usr/lib/python3/dist-packages/apt_ostree/repo.py", line 127, in remove
    r = utils.run_command(
  File "/usr/lib/python3/dist-packages/apt_ostree/utils.py", line 45, in run_command
    % (e.returncode, e.stderr.decode("utf-8"))
AttributeError: 'NoneType' object has no attribute 'decode'

2024-06-13T17:51:52: software-controller-daemon[4066:139889509283584]: utils.py(62): ERROR: Failed to remove package.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/software/apt_utils.py", line 59, in package_remove
    subprocess.run(
  File "/usr/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['apt-ostree', 'repo', 'remove', '--feed', '/var/www/pages/updates/debian/rel-25.03', '--release', 'bullseye', '--component', '25.03.0', 'acl']' returned non-zero exit status 1.During handling of the above exception, another exception occurred:Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pecan/core.py", line 683, in __call__
    self.invoke_controller(controller, args, kwargs, state)
  File "/usr/lib/python3/dist-packages/pecan/core.py", line 574, in invoke_controller
    result = controller(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/software/api/controllers/v1/release.py", line 99, in delete
    result = sc.software_release_delete_api(list(args))
  File "/usr/lib/python3/dist-packages/software/software_controller.py", line 1614, in software_release_delete_api
    apt_utils.package_remove(package_repo_dir, release.sw_release, packages)
  File "/usr/lib/python3/dist-packages/software/apt_utils.py", line 72, in package_remove
    raise APTOSTreeCommandFail(msg)
software.exceptions.APTOSTreeCommandFail: Failed to remove package.  {code}

Alarms

N/A

Test Activity

Feature Testing,

Workaround

rm /opt/software/metadata/available/starlingx-25.03.0-metadata.xml

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

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

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

Reviewed: https://review.opendev.org/c/starlingx/update/+/922176
Committed: https://opendev.org/starlingx/update/commit/a58fa66f5bee0b377ff9203ca798d10491788ad0
Submitter: "Zuul (22348)"
Branch: master

commit a58fa66f5bee0b377ff9203ca798d10491788ad0
Author: Luis Eduardo Bonatti <email address hidden>
Date: Mon Jun 17 19:27:40 2024 -0300

    Fix software delete <release> command

    During software delete <release> it raises an error trying to remove
    some packages. This commit fix this issue by adding a condition to
    only delete these packages in case of a patch release.

    Test Plan:
    PASS: Software delete of a major release before deploy start
    PASS: Software delete of a major release after deploy delete
    PASS: Software delete of a patch release before deploy start

    Closes-bug: 2069656

    Change-Id: Ifa318044058a20a5187b234bdb506022e2d9a625
    Signed-off-by: Luis Eduardo Bonatti <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
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.