lxc-copy: unrecognized option '--backingstorage'

Bug #1591510 reported by Jesse Pretorius
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
Undecided
Po-Hsu Lin

Bug Description

Description: Ubuntu 16.04 LTS
Release: 16.04

lxc:
  Installed: 2.0.1-0ubuntu1~16.04.1
linux-image-virtual:
  Installed: 4.4.0.24.25

Man ref:
http://manpages.ubuntu.com/manpages/xenial/man1/lxc-copy.1.html

Problem:
The man package references '-B' and '--backingstorage' as aliases of one another, but when the following command is executed:

lxc-copy --name=cache --newname container1 --backingstorage=dir
# as a test I also tried
lxc-copy --name=cache --newname container1 --backingstorage dir

The result is:
lxc-copy: unrecognized option '--backingstorage'

Expected result:
'--backingstorage' and '-B' should be aliases and both execute correctly

Existing workaround:
#Use '-B' instead.
lxc-copy --name=cache --newname container1 -B dir

Steps to recreate:
apt-get update && apt-get install -y lxc
lxc-create --name=cache --template=download -- --dist ubuntu --release trusty --arch amd64
lxc-copy --name=cache --newname container1 --backingstorage=dir

description: updated
summary: - Ubuntu Xenial: lxc-copy: unrecognized option '--backingstorage'
+ lxc-copy: unrecognized option '--backingstorage'
description: updated
description: updated
description: updated
description: updated
description: updated
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lxc (Ubuntu):
status: New → Confirmed
Revision history for this message
eil397 (anton-haldin) wrote :

same behavior with version 2.0.3

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

This looks like a typo in lxc_copy.c

static const struct option my_longopts[] = {
 { "newname", required_argument, 0, 'N'},
 { "newpath", required_argument, 0, 'p'},
 { "rename", no_argument, 0, 'R'},
 { "snapshot", no_argument, 0, 's'},
 { "foreground", no_argument, 0, 'F'},
 { "daemon", no_argument, 0, 'd'},
 { "ephemeral", no_argument, 0, 'e'},
 { "mount", required_argument, 0, 'm'},
 { "backingstore", required_argument, 0, 'B'},

Should be "backingstorage" here. Which can be verified with --backingstore=dir

Changed in lxc (Ubuntu):
assignee: nobody → Po-Hsu Lin (cypressyew)
status: Confirmed → In Progress
Revision history for this message
Christian Brauner (cbrauner) wrote :

Patch provided by cypressyew upstream: https://github.com/lxc/lxc/pull/1244.

Changed in lxc (Ubuntu):
status: In Progress → Fix Committed
Po-Hsu Lin (cypressyew)
Changed in lxc (Ubuntu):
status: Fix Committed → 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.