{"action":"closed","issue":{"url":"https://api.github.com/repos/lxc/lxd/issues/4546","repository_url":"https://api.github.com/repos/lxc/lxd","labels_url":"https://api.github.com/repos/lxc/lxd/issues/4546/labels{/name}","comments_url":"https://api.github.com/repos/lxc/lxd/issues/4546/comments","events_url":"https://api.github.com/repos/lxc/lxd/issues/4546/events","html_url":"https://github.com/lxc/lxd/issues/4546","id":321384868,"node_id":"MDU6SXNzdWUzMjEzODQ4Njg=","number":4546,"title":"Fix same-name container move in cluster","user":{"login":"dfsdevops","id":5116093,"node_id":"MDQ6VXNlcjUxMTYwOTM=","avatar_url":"https://avatars3.githubusercontent.com/u/5116093?v=4","gravatar_id":"","url":"https://api.github.com/users/dfsdevops","html_url":"https://github.com/dfsdevops","followers_url":"https://api.github.com/users/dfsdevops/followers","following_url":"https://api.github.com/users/dfsdevops/following{/other_user}","gists_url":"https://api.github.com/users/dfsdevops/gists{/gist_id}","starred_url":"https://api.github.com/users/dfsdevops/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dfsdevops/subscriptions","organizations_url":"https://api.github.com/users/dfsdevops/orgs","repos_url":"https://api.github.com/users/dfsdevops/repos","events_url":"https://api.github.com/users/dfsdevops/events{/privacy}","received_events_url":"https://api.github.com/users/dfsdevops/received_events","type":"User","site_admin":false},"labels":[{"id":144672267,"node_id":"MDU6TGFiZWwxNDQ2NzIyNjc=","url":"https://api.github.com/repos/lxc/lxd/labels/Bug","name":"Bug","color":"eb6420","default":false}],"state":"closed","locked":false,"assignee":{"login":"freeekanayaka","id":598445,"node_id":"MDQ6VXNlcjU5ODQ0NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/598445?v=4","gravatar_id":"","url":"https://api.github.com/users/freeekanayaka","html_url":"https://github.com/freeekanayaka","followers_url":"https://api.github.com/users/freeekanayaka/followers","following_url":"https://api.github.com/users/freeekanayaka/following{/other_user}","gists_url":"https://api.github.com/users/freeekanayaka/gists{/gist_id}","starred_url":"https://api.github.com/users/freeekanayaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freeekanayaka/subscriptions","organizations_url":"https://api.github.com/users/freeekanayaka/orgs","repos_url":"https://api.github.com/users/freeekanayaka/repos","events_url":"https://api.github.com/users/freeekanayaka/events{/privacy}","received_events_url":"https://api.github.com/users/freeekanayaka/received_events","type":"User","site_admin":false},"assignees":[{"login":"freeekanayaka","id":598445,"node_id":"MDQ6VXNlcjU5ODQ0NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/598445?v=4","gravatar_id":"","url":"https://api.github.com/users/freeekanayaka","html_url":"https://github.com/freeekanayaka","followers_url":"https://api.github.com/users/freeekanayaka/followers","following_url":"https://api.github.com/users/freeekanayaka/following{/other_user}","gists_url":"https://api.github.com/users/freeekanayaka/gists{/gist_id}","starred_url":"https://api.github.com/users/freeekanayaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freeekanayaka/subscriptions","organizations_url":"https://api.github.com/users/freeekanayaka/orgs","repos_url":"https://api.github.com/users/freeekanayaka/repos","events_url":"https://api.github.com/users/freeekanayaka/events{/privacy}","received_events_url":"https://api.github.com/users/freeekanayaka/received_events","type":"User","site_admin":false},{"login":"brauner","id":7353573,"node_id":"MDQ6VXNlcjczNTM1NzM=","avatar_url":"https://avatars0.githubusercontent.com/u/7353573?v=4","gravatar_id":"","url":"https://api.github.com/users/brauner","html_url":"https://github.com/brauner","followers_url":"https://api.github.com/users/brauner/followers","following_url":"https://api.github.com/users/brauner/following{/other_user}","gists_url":"https://api.github.com/users/brauner/gists{/gist_id}","starred_url":"https://api.github.com/users/brauner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brauner/subscriptions","organizations_url":"https://api.github.com/users/brauner/orgs","repos_url":"https://api.github.com/users/brauner/repos","events_url":"https://api.github.com/users/brauner/events{/privacy}","received_events_url":"https://api.github.com/users/brauner/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/lxc/lxd/milestones/71","html_url":"https://github.com/lxc/lxd/milestone/71","labels_url":"https://api.github.com/repos/lxc/lxd/milestones/71/labels","id":3339211,"node_id":"MDk6TWlsZXN0b25lMzMzOTIxMQ==","number":71,"title":"lxd-3.4","description":"","creator":{"login":"stgraber","id":2230599,"node_id":"MDQ6VXNlcjIyMzA1OTk=","avatar_url":"https://avatars0.githubusercontent.com/u/2230599?v=4","gravatar_id":"","url":"https://api.github.com/users/stgraber","html_url":"https://github.com/stgraber","followers_url":"https://api.github.com/users/stgraber/followers","following_url":"https://api.github.com/users/stgraber/following{/other_user}","gists_url":"https://api.github.com/users/stgraber/gists{/gist_id}","starred_url":"https://api.github.com/users/stgraber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stgraber/subscriptions","organizations_url":"https://api.github.com/users/stgraber/orgs","repos_url":"https://api.github.com/users/stgraber/repos","events_url":"https://api.github.com/users/stgraber/events{/privacy}","received_events_url":"https://api.github.com/users/stgraber/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":20,"state":"open","created_at":"2018-05-11T13:58:52Z","updated_at":"2018-08-14T15:12:11Z","due_on":"2018-08-14T07:00:00Z","closed_at":null},"comments":9,"created_at":"2018-05-08T23:53:22Z","updated_at":"2018-08-14T15:12:11Z","closed_at":"2018-08-14T15:12:11Z","author_association":"NONE","body":"<!--\r\nGithub issues are used for bug reports. For support questions, please use [our forum](https://discuss.linuxcontainers.org).\r\n\r\nPlease fill the template below as it will greatly help us track down your issue and reproduce it on our side.  \r\nFeel free to remove anything which doesn't apply to you and add more information where it makes sense.\r\n-->\r\n\r\n# Required information\r\n\r\n * Distribution: Ubuntu\r\n * Distribution version: 8.04\r\n * The output of \"lxc info\" or if that fails:\r\n```\r\nroot@lxd-dev-02:~# lxc info\r\nconfig:\r\n  core.https_address: 10.1.2.42:8443\r\n  core.trust_password: true\r\napi_extensions:\r\n- storage_zfs_remove_snapshots\r\n- container_host_shutdown_timeout\r\n- container_stop_priority\r\n- container_syscall_filtering\r\n- auth_pki\r\n- container_last_used_at\r\n- etag\r\n- patch\r\n- usb_devices\r\n- https_allowed_credentials\r\n- image_compression_algorithm\r\n- directory_manipulation\r\n- container_cpu_time\r\n- storage_zfs_use_refquota\r\n- storage_lvm_mount_options\r\n- network\r\n- profile_usedby\r\n- container_push\r\n- container_exec_recording\r\n- certificate_update\r\n- container_exec_signal_handling\r\n- gpu_devices\r\n- container_image_properties\r\n- migration_progress\r\n- id_map\r\n- network_firewall_filtering\r\n- network_routes\r\n- storage\r\n- file_delete\r\n- file_append\r\n- network_dhcp_expiry\r\n- storage_lvm_vg_rename\r\n- storage_lvm_thinpool_rename\r\n- network_vlan\r\n- image_create_aliases\r\n- container_stateless_copy\r\n- container_only_migration\r\n- storage_zfs_clone_copy\r\n- unix_device_rename\r\n- storage_lvm_use_thinpool\r\n- storage_rsync_bwlimit\r\n- network_vxlan_interface\r\n- storage_btrfs_mount_options\r\n- entity_description\r\n- image_force_refresh\r\n- storage_lvm_lv_resizing\r\n- id_map_base\r\n- file_symlinks\r\n- container_push_target\r\n- network_vlan_physical\r\n- storage_images_delete\r\n- container_edit_metadata\r\n- container_snapshot_stateful_migration\r\n- storage_driver_ceph\r\n- storage_ceph_user_name\r\n- resource_limits\r\n- storage_volatile_initial_source\r\n- storage_ceph_force_osd_reuse\r\n- storage_block_filesystem_btrfs\r\n- resources\r\n- kernel_limits\r\n- storage_api_volume_rename\r\n- macaroon_authentication\r\n- network_sriov\r\n- console\r\n- restrict_devlxd\r\n- migration_pre_copy\r\n- infiniband\r\n- maas_network\r\n- devlxd_events\r\n- proxy\r\n- network_dhcp_gateway\r\n- file_get_symlink\r\n- network_leases\r\n- unix_device_hotplug\r\n- storage_api_local_volume_handling\r\n- operation_description\r\n- clustering\r\n- event_lifecycle\r\n- storage_api_remote_volume_handling\r\n- nvidia_runtime\r\napi_status: stable\r\napi_version: \"1.0\"\r\nauth: trusted\r\npublic: false\r\nauth_methods:\r\n- tls\r\nenvironment:\r\n  addresses:\r\n  - 10.1.2.42:8443\r\n  architectures:\r\n  - x86_64\r\n  - i686\r\n  certificate: |\r\n    -----BEGIN CERTIFICATE-----\r\n    MIIFTTCCAzWgAwIBAgIRAIYi9SOBaeGArc8ha+7ZyvIwDQYJKoZIhvcNAQELBQAw\r\n    ODEcMBoGA1UEChMTbGludXhjb250YWluZXJzLm9yZzEYMBYGA1UEAwwPcm9vdEBs\r\n    eGQtZGV2LTAxMB4XDTE4MDUwODIwNTU1N1oXDTI4MDUwNTIwNTU1N1owODEcMBoG\r\n    A1UEChMTbGludXhjb250YWluZXJzLm9yZzEYMBYGA1UEAwwPcm9vdEBseGQtZGV2\r\n    LTAxMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0JxeMil0dOsHwO/x\r\n    xIHJHXfC7VlNRP0WXNLb9glwUr3qVEExW+NG5XOdzts5uQm0wV1nhDrZoLr3AUwI\r\n    dmrvREWbn7PQEr0Fw7ZHYPG1r+06b5m0fweEWuV6punvzZSCeiIV5M4w6S+93Xna\r\n    C4fryXuIRIpMrXhhVzSclIGWiB4DA95KLN8oR8FfhEstZ6Jz+sYMMrOxDjbhEYLw\r\n    OSV4MYgFhXlA+KGgeyCOrseiz9hycBeM8zniIxDzFIFTSGWd9B3omb4eK2li6zhb\r\n    FNnNqsCdIOY7HsMJyD2bLJCKsuxXYkpN/XVJCNVOEoU13S1arTnIKPVzXvnFBpZx\r\n    BREIbBQRI5fROYqlrbcMvOq/jEoWD9JQobK0OhfvdrTaJpWENF2ttf4QwANPx/zC\r\n    DtSfIUbJ5I7iP0P+IuaShgwM2LG0aqyEwEpP3lPqV/LAPFiLj77QuxudiFVU0yZO\r\n    iaA2UUFOskTNQNiMdZqD87j2Pp74dDrKSvmxTSwlXwJntUxAKoSUzaMBGhiRsuGp\r\n    uc3atWRG+Ne7BMpepuyvEb2+kmFjexiyqH1pAXaAhNPJHithCiTFaOJQjbHx+n1n\r\n    AxWqGnJQoDTyRm/JA1kyBo66NoDGW5X/RjVYIkD3Dc1svkYP6eWOB0Mi1mYj0qaq\r\n    LG8jZ/e71ak9GSgdHDzXXvrLP0kCAwEAAaNSMFAwDgYDVR0PAQH/BAQDAgWgMBMG\r\n    A1UdJQQMMAoGCCsGAQUFBwMBMAwGA1UdEwEB/wQCMAAwGwYDVR0RBBQwEoIKbHhk\r\n    LWRldi0wMYcECgECKTANBgkqhkiG9w0BAQsFAAOCAgEAPTKfYKvM4tNuoItiIZ7C\r\n    lKVN+73FriGg+xkl4APuT/FqciP4rXQ4eI+XW81BBc4jx1kK5ngmZbOO8tXROBZk\r\n    lHp/6Vz1gxYLeLSbZA5Pi6dnJE5zJnPGrB3vUQgVxdlIF1zI2jtQ9h1h0wUH97nB\r\n    uoK2f0Wd4S+z10bac6P4wGqrzwtFsfnT+077EIdpgtXeqQOxId1GaIfWEKzUhCRO\r\n    Aj6aYw0bU5bigD0OhROI246nKk363X+4kZyMT7FNpUZMpESrw/ZjCBaCOkZkqOEq\r\n    huCVn4yWhZ1sYIMlg9aitNeKaU70gOZDHajI+Lo8m2eemmiQoWGUqN8vu8Tk0Kzo\r\n    s4bFhjPv/NFd9h2LvuulhBqmclPszgyhk9CrSPJL0K0GgcVUMG3IiuxoHBqVQn9M\r\n    nPOVPlf2cYqb4OFC+kdDT3JqG29K+4am8gvV6rAFl+dCsRd6k45keWAB1MjQfl7N\r\n    8whAL6TEXmiT1sb3pWvgd7E53SeIAXEPP/furs0excMJvu/yfZOGhaD/NTZzoC8g\r\n    5WvNNxuuvuWISMJL0uHrn6NcgZ1rZFeOdMwOYewElyEkVLbFMpTacrGj3vYlIEfK\r\n    MXSIiGOGMundoCvlDRRcLCqkYGbiu2Nlab23wpMWBxpFASsaZGgEXRRIn4ujie3t\r\n    OboWBqb/G5F+82vh6wgV2t0=\r\n    -----END CERTIFICATE-----\r\n  certificate_fingerprint: fcc5ff4aea9e3513c7e2791e865bdae6f81b321c6c007a2fd7498d1d727060d0\r\n  driver: lxc\r\n  driver_version: 3.0.0\r\n  kernel: Linux\r\n  kernel_architecture: x86_64\r\n  kernel_version: 4.15.0-20-generic\r\n  server: lxd\r\n  server_pid: 2728\r\n  server_version: 3.0.0\r\n  storage: zfs\r\n  storage_version: 0.7.5-1ubuntu13\r\n  server_clustered: true\r\n  server_name: lxd-dev-02\r\n```\r\n# Issue description\r\n\r\nI created 10 containers on a 3 node LXD cluster with ZFS storage back-end. I want to test migrating one of them from one node in the cluster but I get an error:\r\n\r\n```\r\nroot@lxd-dev-02:~# lxc move cen5 --target lxd-dev-01\r\nError: Failed container creation: Container 'cen5' already exists\r\n```\r\n\r\n# Steps to reproduce\r\n\r\n 1. Create a cluster with 3 nodes (for a proper quorum)\r\n 2. Create a container anywhere in the cluster\r\n 3. Run lxc move, using one of the node names in --target\r\n```\r\nroot@lxd-dev-02:~# lxc move cen5 --target lxd-dev-03\r\nError: Failed container creation: Container 'cen5' already exists\r\n```\r\nother variants I have tried:\r\n```\r\nroot@lxd-dev-02:~# lxc move cen5 cen5 --target lxd-dev-01\r\nError: Failed container creation: Container 'cen5' already exists\r\nroot@lxd-dev-02:~# lxc move cen5 lxd-dev-01:cen5\r\nError: The remote \"lxd-dev-01\" doesn't exist\r\nroot@lxd-dev-02:~# lxc move cen5 local:cen5\r\nError: already exists\r\nroot@lxd-dev-02:~# lxc move cen5 local:cen5 --target lxd-dev-01\r\nError: Failed container creation: Container 'cen5' already exists\r\nroot@lxd-dev-02:~# lxc move local:cen5 --target lxd-dev-01\r\nError: Failed container creation: Container 'cen5' already exists\r\n```\r\n\r\n\r\nI did discover that if I actually rename the container to something new it does attempt a migration (but gives me an entirely new error message.). If this is not allowed (migrating without renamaing) in a cluster configuration, then my suggestion is to no accept a single argument while using \"--target\"\r\n\r\n"}}
{"actor":{"display_login":"stgraber"}}