Project feature - error when copy a container: Error: no such file or directory

Hi,

If I work within a project (not the default) I can not copy a container. Appears an error message: Error: no such file or directory

magasix@lxd:~⟫ lxc project list
+-----------------+--------+----------+---------+
|      NAME       | IMAGES | PROFILES | USED BY |
+-----------------+--------+----------+---------+
| APT-CACHER      | NO     | YES      | 3       |
+-----------------+--------+----------+---------+
| ESC3E (current) | NO     | NO       | 7       |
+-----------------+--------+----------+---------+
| default         | YES    | YES      | 43      |
+-----------------+--------+----------+---------+
magasix@lxd:~⟫ lxc ls -c n,s,4,P,S,l
+---------------+---------+------+----------+-----------+----------------------+
|     NAME      |  STATE  | IPV4 | PROFILES | SNAPSHOTS |     LAST USED AT     |
+---------------+---------+------+----------+-----------+----------------------+
| admin2        | STOPPED |      | lan      |           | 2018/11/09 18:52 UTC |
+---------------+---------+------+----------+-----------+----------------------+
| fw            | STOPPED |      | 3NICs    |           | 2018/11/09 18:52 UTC |
+---------------+---------+------+----------+-----------+----------------------+
| medusa32      | STOPPED |      | wan      |           | 2018/11/09 18:52 UTC |
+---------------+---------+------+----------+-----------+----------------------+
| medusa64      | STOPPED |      | lan      |           | 2018/11/07 00:50 UTC |
+---------------+---------+------+----------+-----------+----------------------+
| server-medusa | STOPPED |      | lan      |           | 2018/11/04 15:01 UTC |
+---------------+---------+------+----------+-----------+----------------------+
| server-ssh    | STOPPED |      | lan      |           | 2018/11/04 14:09 UTC |
+---------------+---------+------+----------+-----------+----------------------+
| serverdmz     | STOPPED |      | dmz      |           | 2018/11/09 18:52 UTC |
+---------------+---------+------+----------+-----------+----------------------+
magasix@lxd:~⟫ lxc copy fw fw2
Error: no such file or directory
1 magasix@lxd:~⟫ lxc info fw
Name: fw
Location: none
Remote: unix://
Architecture: x86_64
Created: 2018/10/26 18:45 UTC
Status: Stopped
Type: persistent
Profiles: 3NICs
magasix@lxd:~⟫ lxc project show ESC3E
description: ""
config:
  features.images: "false"
  features.profiles: "false"
name: ESC3E
used_by:
- /1.0/containers/admin2?project=ESC3E
- /1.0/containers/fw?project=ESC3E
- /1.0/containers/medusa32?project=ESC3E
- /1.0/containers/medusa64?project=ESC3E
- /1.0/containers/server-medusa?project=ESC3E
- /1.0/containers/server-ssh?project=ESC3E
- /1.0/containers/serverdmz?project=ESC3E
magasix@lxd:~⟫

In the default project copy is running ok.
I’m running snap version 3.6 (9510) on Lubuntu 16.04.5

Any ideas?

Reproduced the issue here, will look into it shortly.

OK. Thanks

Not sure if it's the same for me, but with snap 3.7 (9550) I can't start a container (squid) in a non default project after copying it (from a default project on another host). If I look at the zfs datasets made I see the following:

sjoerd@obelix:~$ lxc project list
+--------------+--------+----------+---------+
|     NAME     | IMAGES | PROFILES | USED BY |
+--------------+--------+----------+---------+
| default      | YES    | YES      | 25      |
+--------------+--------+----------+---------+
| dr (current) | YES    | YES      | 5       |
+--------------+--------+----------+---------+

sjoerd@obelix:~$ lxc copy asterix:squid --container-only
Transferring container: squid: 902.27MB (54.18MB/s)
Container name is: squid

sjoerd@obelix:~$lxc list
+-------+---------+-----------------------+------+------------+-----------+
| NAME  |  STATE  |         IPV4          | IPV6 |    TYPE    | SNAPSHOTS |
+-------+---------+-----------------------+------+------------+-----------+
| dr1   | RUNNING | 192.168.10.137 (eth0) |      | PERSISTENT |           |
+-------+---------+-----------------------+------+------------+-----------+
| squid | STOPPED |                       |      | PERSISTENT |           |
+-------+---------+-----------------------+------+------------+-----------+

squid is copied and dr1 is created in the project from scratch.

sjoerd@obelix:~$ lxc start squid
Error: Failed to run: /snap/lxd/current/bin/lxd forkstart dr_squid /var/snap/lxd/common/lxd/containers /var/snap/lxd/common/lxd/logs/dr_squid/lxc.conf:
Try `lxc info --show-log squid` for more info

sjoerd@obelix:~$ lxc info --show-log squid
Name: squid
Location: none
Remote: unix://
Architecture: x86_64
Created: 2018/11/13 09:36 UTC
Status: Stopped
Type: persistent
Profiles: default, priv
Error: open /var/snap/lxd/common/lxd/logs/squid/lxc.log: no such file or directory

ZFs datasets look like:

sjoerd@obelix:~$ zfs list |grep squid
data/obelix/lxd/storage/containers/dr_squid                                                        192K  4.96T   192K  /var/snap/lxd/common/lxd/storage-pools/default/containers/dr_squid
data/obelix/lxd/storage/containers/squid                                                          1.02G  4.96T  1.02G  none

That doesn't seem right, since the first entry should be the one filled with data (or is it a clone from the bottom line?)

The freshly created container dr1 in the project just gives the upper dataset:
sjoerd@obelix:~$ zfs list |grep dr1
data/obelix/lxd/storage/containers/dr_dr1                                                          336M  4.96T  1.06G  /var/snap/lxd/common/lxd/storage-pools/default/containers/dr_dr1

NB: copying container squid to the default project on obelix from asterix just works fine. profiles are the same

Hi,

lxc copy is working in lxd snap version 3.7 (9600). Great job!!

Thanks and salutes from Spain