[Ubuntu 22.04] Auto tab completion does not work with nvme commands.

Bug #1980820 reported by Reshmi Aravind
22
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bash-completion (Ubuntu)
Invalid
Undecided
Unassigned
Jammy
Invalid
Undecided
Unassigned
Kinetic
Invalid
Undecided
Unassigned
nvme-cli (Ubuntu)
Fix Released
Medium
Benjamin Drung
Jammy
Fix Released
Medium
Unassigned
Kinetic
Fix Released
Medium
Unassigned

Bug Description

[ Impact ]

Tab completion for the nvme command is completely broken in bash.

[ Test Plan ]

1. Install nvme-cli package
2. Open terminal
3. type any nvme command and hit tab

Tab completion should show entries like "list", "create-ns", etc.

[ Where problems could occur ]

The patch only changes the tab completion for nvme, but rebuilding nvme-cli can reveal bugs on package upgrade, etc.

[ Original report ]

Description:
On pressing tab with nvme command, it shows the hostname instead of listing subcommands on Ubuntu 22.04 LTS.

Steps to reproduce:
Step 1: Install Ubuntu 22.04 LTS (ubuntu-22.04-live-server-amd64) on system.
Step 2: Install nvme-cli package,currently installed version is nvme version 1.16
Step 3: In the os terminal, type any nvme command and hit tab, auto tab completion is not working properly.

Expected Behavior:
Upon pressing tab, nvme command should show the supported subcommands.

information type: Public → Private
Michael Reed (mreed8855)
information type: Private → Public
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1980820

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Reshmi Aravind (reshmi-susheela-aravind) wrote :

Please find the sosreport attached.

Revision history for this message
Reshmi Aravind (reshmi-susheela-aravind) wrote :

Additional Info - nvme auto tab works for ""Ubuntu 20.04.4 LTS"

Revision history for this message
Jeff Lane  (bladernr) wrote :

changed to more appropriate package

affects: linux (Ubuntu) → bash-completion (Ubuntu)
Revision history for this message
Sheik Ajith Ali Mohammed Farook (sheikajith) wrote :

This issue is been fixed in upstream release 2.1-rc0, where nvme bash-completion script is modified to support auto-tab completion.

Please find the patch details in below link:
https://github.com/linux-nvme/nvme-cli/commit/25fd8c707b106ca0763402566ad657ef710bf09e

Please find the updated bash-completion script in below link:
https://github.com/linux-nvme/nvme-cli/blob/v2.1-rc0/completions/bash-nvme-completion.sh

Revision history for this message
Sheik Ajith Ali Mohammed Farook (sheikajith) wrote :

Hi Michael,

Any updates on this fix?

Changed in bash-completion (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Simon Chopin (schopin) wrote :

Reproduced on Jammy, and not only doesn't it work properly, it actually broke my prompt :/

Changed in nvme-cli (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Changed in bash-completion (Ubuntu):
status: Confirmed → Invalid
Changed in nvme-cli (Ubuntu Jammy):
status: New → Confirmed
Changed in bash-completion (Ubuntu Jammy):
status: New → Invalid
Changed in nvme-cli (Ubuntu Jammy):
importance: Undecided → Low
Changed in nvme-cli (Ubuntu Kinetic):
status: Confirmed → New
status: New → Confirmed
Changed in nvme-cli (Ubuntu Jammy):
importance: Low → Medium
Changed in nvme-cli (Ubuntu Kinetic):
importance: Low → Medium
Graham Inggs (ginggs)
Changed in nvme-cli (Ubuntu Jammy):
status: Confirmed → Triaged
Changed in nvme-cli (Ubuntu Kinetic):
status: Confirmed → Triaged
Revision history for this message
Sheik Ajith Ali Mohammed Farook (sheikajith) wrote :

Hi Michael,

Could you please let us know in which release this fix will get committed?

tags: added: foundations-todo
Revision history for this message
Benjamin Drung (bdrung) wrote :

nvme-cli 2.2.1-1 is in lunar-proposed, the s390x build is blocked on libnvme bug #1995935.

Changed in nvme-cli (Ubuntu):
assignee: nobody → Benjamin Drung (bdrung)
Revision history for this message
Benjamin Drung (bdrung) wrote :

This bug was trickier than expected. Cherry-picking the upstream commit was not enough. I also had to fix the malformed _cmds due to the incorrect merge in commit 6a7986002040. Attached the SRUs for kinetic and jammy.

Revision history for this message
Benjamin Drung (bdrung) wrote :
tags: added: patch
Benjamin Drung (bdrung)
description: updated
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Reshmi, or anyone else affected,

Accepted nvme-cli into kinetic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nvme-cli/1.16-4ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-kinetic to verification-done-kinetic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-kinetic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in nvme-cli (Ubuntu Kinetic):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-kinetic
Changed in nvme-cli (Ubuntu Jammy):
status: Triaged → Fix Committed
tags: added: verification-needed-jammy
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Reshmi, or anyone else affected,

Accepted nvme-cli into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nvme-cli/1.16-3ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Sheik Ajith Ali Mohammed Farook (sheikajith) wrote :

Hi Timo,

I have tested the package nvme-cli_1.16-3ubuntu0.1_amd64.deb and auto tab completion is working fine.
The issue is been fixed in this nvme-cli package

tags: added: verification-done-jammy
removed: foundations-todo patch verification-needed verification-needed-jammy verification-needed-kinetic
Revision history for this message
Benjamin Drung (bdrung) wrote :

And I have verified it for kinetic.

tags: added: foundations-todo patch verification-done verification-done-kinetic
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

@bdrung Please always include information about which package you have used for verification. For most cases we will not accept verification comments without this information - please see the acceptance comment for information about what we want to see in a verification comment.

I'll release this here conditionally this one time.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvme-cli - 1.16-4ubuntu0.1

---------------
nvme-cli (1.16-4ubuntu0.1) kinetic; urgency=medium

  * Fix broken tab completions: Collapse declaration and attribute assignment
    and fix malformed _cmd (LP: #1980820)

 -- Benjamin Drung <email address hidden> Tue, 08 Nov 2022 12:24:04 +0100

Changed in nvme-cli (Ubuntu Kinetic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for nvme-cli has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nvme-cli - 1.16-3ubuntu0.1

---------------
nvme-cli (1.16-3ubuntu0.1) jammy; urgency=medium

  * Fix broken tab completions: Collapse declaration and attribute assignment
    and fix malformed _cmd (LP: #1980820)

 -- Benjamin Drung <email address hidden> Tue, 08 Nov 2022 13:13:09 +0100

Changed in nvme-cli (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Benjamin Drung (bdrung) wrote :

nvme-cli 2.2.1-2 is in lunar now.

Changed in nvme-cli (Ubuntu):
status: Triaged → Fix Released
tags: removed: foundations-todo
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.