lxc-ls fails if name of a container starts with '-'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxc (Ubuntu) |
Fix Released
|
Low
|
Serge Hallyn | ||
Precise |
Fix Released
|
Undecided
|
Unassigned | ||
Quantal |
Fix Released
|
Low
|
Serge Hallyn |
Bug Description
============== SRU Justification =============
Impact: lxc-ls fails when container names start with a dash ('-')
Development fix: when calling 'ls' from lxc-ls, specify -- before the container name to make clear that the next argument is a file name
Stable fix: same as Development fix.
Test case:
sudo lxc-create -t ubuntu -n -p2
sudo lxc-start -n -p2 -d
sudo lxc-ls
the lxc-ls will show ls error messages without the patch
Regression potential: none
=======
A script created a container which name starts with a '-' ( -lo-quantal-i386 in this case )
Then calls to lxc-ls and lxc-list fail with:
$ lxc-ls
-lo-quantal-i386
ls: invalid option -- '-'
Try `ls --help' for more information.
ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: lxc 0.8.0~rc1-4ubuntu10
ProcVersionSign
Uname: Linux 3.4.0-3-generic x86_64
ApportVersion: 2.1-0ubuntu1
Architecture: amd64
Date: Wed May 30 12:30:17 2012
ProcEnviron:
TERM=xterm
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: lxc
UpgradeStatus: Upgraded to quantal on 2012-01-31 (119 days ago)
Changed in lxc (Ubuntu): | |
assignee: | nobody → Serge Hallyn (serge-hallyn) |
Changed in lxc (Ubuntu Quantal): | |
status: | Triaged → In Progress |
description: | updated |
Sure does, thanks for reporting this bug. All other commands I tried did seem to work.