Upstart bash completion does not work on ubuntu server

Bug #809043 reported by Davor Cubranic
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
upstart (Ubuntu)
Won't Fix
Medium
Unassigned

Bug Description

Natty server does not install the dbus daemon, but upstart's bash completion script (/etc/bash_completion.d/upstart) depends on it to be running. Therefore, typing:

$ sudo restart <tab>

will output the following error message:
initctl: Unable to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory

Revision history for this message
James Hunt (jamesodhunt) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. However, this issue is caused by the fact that a default natty server does not install the "dbus" package and hence non-root users are unable to communicate with Upstart using initctl (specifically the "list" and "status" commands will not work).

So, to resolve your issue, there are 2 main choices:

- Use a full root shell such that tab completion will work.
  ("su -" or "sudo su -" and then initctl tab completion will work.

- install the dbus package ("sudo apt-get install dbus").

  Non-root users will then be able to invoke initctl.

Clearly, you need to be aware of the implications of adopting either of these choices.

Changed in upstart (Ubuntu):
status: New → Invalid
Revision history for this message
Davor Cubranic (cubranic) wrote :

James, your explanation for why this report is invalid just restated my bug description.

The bug precisely is that Ubuntu is shipping a package (upstart's bash completion) with an implicit dependency on another package (dbus) that it does not declare! So if the developers view this dependency as optional, then the upstart package should: 1) declare dbus as suggested; and 2) not throw an error in the completion function if dbus is not running but fail gracefully and degrade to not completing anything instead of dumping errors to console.

Changed in upstart (Ubuntu):
status: Invalid → New
Changed in upstart (Ubuntu):
status: New → Confirmed
Changed in upstart (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

but bash_completion is optional functionality that is not guaranteed to work, e.g. upstart doesn't declare dependency on bash either.

Returning nothing in completion would be also confusing (nothing available to restart) and failing loud at runtime (by printing errors) is acceptable to let user know that something is wrong.

upstart package is not going to get dependency on "dbus" package. And bash-completion is Suggests already.

Changed in upstart (Ubuntu):
status: Confirmed → Won't Fix
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.