Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No difference between -e -D and -s flags #4404

Open
curable-online opened this issue Mar 3, 2024 · 1 comment
Open

No difference between -e -D and -s flags #4404

curable-online opened this issue Mar 3, 2024 · 1 comment
Assignees

Comments

@curable-online
Copy link

Required information

  • Distribution: Arch
  • Distribution version: Current
  • The output of
    • lxc-checkconfig:
LXC version 5.0.3

--- Namespaces ---
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: enabled
Warning: newuidmap is not setuid-root
Warning: newgidmap is not setuid-root
Network namespace: enabled

--- Control groups ---
Cgroups: enabled
Cgroup namespace: enabled
Cgroup v1 mount points: 
Cgroup v2 mount points: 
 - /sys/fs/cgroup
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: enabled
Cgroup cpuset: enabled

--- Misc ---
Veth pair device: enabled, not loaded
Macvlan: enabled, not loaded
Vlan: enabled, not loaded
Bridges: enabled, loaded
Advanced netfilter: enabled, loaded
CONFIG_IP_NF_TARGET_MASQUERADE: enabled, not loaded
CONFIG_IP6_NF_TARGET_MASQUERADE: enabled, not loaded
CONFIG_NETFILTER_XT_TARGET_CHECKSUM: enabled, not loaded
CONFIG_NETFILTER_XT_MATCH_COMMENT: enabled, not loaded
FUSE (for use with lxcfs): enabled, loaded

--- Checkpoint/Restore ---
checkpoint restore: enabled
CONFIG_FHANDLE: enabled
CONFIG_EVENTFD: enabled
CONFIG_EPOLL: enabled
CONFIG_UNIX_DIAG: enabled
CONFIG_INET_DIAG: enabled
CONFIG_PACKET_DIAG: enabled
CONFIG_NETLINK_DIAG: enabled
File capabilities: enabled

Note : Before booting a new kernel, you can check its configuration
usage : CONFIG=/path/to/config /usr/bin/lxc-checkconfig

Issue description

It seems that there's no actual difference between these two.

According to documentations, specially the manpage.
-e option makes lxc-copy to create a copy that is a snapshot and is ephemeral. Combination of -D and -e flags make lxc-copy to create a copy that is a snapshot but is not ephemeral, which is exactly what -s implied to do.

Steps to reproduce

  1. Run sudo lxc-copy -n mycontainer -N copy1 -s
  2. Run sudo lxc-copy -n mycontainer -N copy2 -e -D
  3. Run sudo diff -y /var/lib/lxc/copy1/config /var/lib/lxc/copy2/config
@stgraber stgraber added this to the lxc-6.0.0 milestone Mar 26, 2024
@mihalicyn
Copy link
Member

Hi @curable-online !

-e option makes lxc-copy to create a copy that is a snapshot and is ephemeral. Combination of -D and -e flags make lxc-copy to create a copy that is a snapshot but is not ephemeral, which is exactly what -s implied to do.

As far as I can see from the original commit description this is intended behavior.

See (43cea62):

The flag -e / --ephemeral implies -s / --snapshot.

The same in the docs:

When the <replaceable>-e</replaceable> flag is specified an ephemeral

It is clearly not a bug.

@mihalicyn mihalicyn self-assigned this Apr 2, 2024
@mihalicyn mihalicyn removed this from the lxc-6.0.0 milestone Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants