{"action":"opened","issue":{"url":"https://api.github.com/repos/lxc/lxd/issues/4728","repository_url":"https://api.github.com/repos/lxc/lxd","labels_url":"https://api.github.com/repos/lxc/lxd/issues/4728/labels{/name}","comments_url":"https://api.github.com/repos/lxc/lxd/issues/4728/comments","events_url":"https://api.github.com/repos/lxc/lxd/issues/4728/events","html_url":"https://github.com/lxc/lxd/issues/4728","id":338216923,"node_id":"MDU6SXNzdWUzMzgyMTY5MjM=","number":4728,"title":"Is it possible to copy a container overriding config values?","user":{"login":"laralar","id":3006419,"node_id":"MDQ6VXNlcjMwMDY0MTk=","avatar_url":"https://avatars2.githubusercontent.com/u/3006419?v=4","gravatar_id":"","url":"https://api.github.com/users/laralar","html_url":"https://github.com/laralar","followers_url":"https://api.github.com/users/laralar/followers","following_url":"https://api.github.com/users/laralar/following{/other_user}","gists_url":"https://api.github.com/users/laralar/gists{/gist_id}","starred_url":"https://api.github.com/users/laralar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laralar/subscriptions","organizations_url":"https://api.github.com/users/laralar/orgs","repos_url":"https://api.github.com/users/laralar/repos","events_url":"https://api.github.com/users/laralar/events{/privacy}","received_events_url":"https://api.github.com/users/laralar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-04T10:17:58Z","updated_at":"2018-07-04T10:17:58Z","closed_at":null,"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: 18.04\r\n * The output of \"lxc info\" or if that fails:\r\n````\r\nroot@node39:~# lxc info\r\nconfig:\r\n  core.https_address: '[::]:8443'\r\n  core.trust_password: true\r\n  maas.api.key: MK4Qp5GKDLjUu2khVh:Fa9bjsD37tsANX3Hpr:YMdnsak5Ete2ypqqK3etvrr3cEA4pXhG\r\n  maas.api.url: http://10.3.4.10:5240/MAAS\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\n- container_mount_propagation\r\n- container_backup\r\n- devlxd_images\r\n- container_local_cross_pool_handling\r\n- proxy_unix\r\n- proxy_udp\r\n- clustering_join\r\n- proxy_tcp_udp_multi_port_handling\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.3.4.39:8443\r\n  - 192.168.122.1:8443\r\n  architectures:\r\n  - x86_64\r\n  - i686\r\n  certificate: |\r\n    -----BEGIN CERTIFICATE-----\r\n    MIIFRzCCAy+gAwIBAgIRAPsfkYO2rTAx3C3dWdbjBxAwDQYJKoZIhvcNAQELBQAw\r\n    NDEcMBoGA1UEChMTbGludXhjb250YWluZXJzLm9yZzEUMBIGA1UEAwwLcm9vdEBu\r\n    b2RlMzkwHhcNMTgwNjE2MDk0ODA0WhcNMjgwNjEzMDk0ODA0WjA0MRwwGgYDVQQK\r\n    ExNsaW51eGNvbnRhaW5lcnMub3JnMRQwEgYDVQQDDAtyb290QG5vZGUzOTCCAiIw\r\n    DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBALPGgJNoDuLuuBpXq79y8CPpnO55\r\n    j9c9ROpfDRBin1doGPs3CDpb1LsziTTLbohAeCOMk6fj48bTAZ5VSQjrajb5BY+W\r\n    b/NNK3TYi4YQ3U1VcVxDnWzo1UyASZ3EMG39TTc7SQl4FaQzp7+2jDR3bwmrJ/VY\r\n    OO4nlVwsAo1xQ4sjUTov/1bl81t/HsRJPSEPyo2ml8HIBWcReGZdPUKzcChVsO8x\r\n    uU2jfTawY/GUK+4WLohR1WqzKVhTlJfRMEUQNYDazoO3VNyJLmcFElvNePRU0GSp\r\n    oAO/8XlnOoA+k6J1dmilu5ghdEDfzonLuSGfmPb9E6ColBkMF1txWnfe25oeDRkm\r\n    o/2JNPQWIaHX2L8X3p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jDBe9Li9IFvmITZWoV\r\n    kmWoLwoBWIRnntiVNNz3G/cnLGKwUJT+gcFLv0CpFj6ppszrVyj12WxUQTN3wojO\r\n    VM0OQu4L7bHg3OVtvBy07WKRJCGRI7SDkOl7FlMGRKqEx2tpw+NuBwbHJ5Vhb7EB\r\n    uAQy3AFsIrVWw80=\r\n    -----END CERTIFICATE-----\r\n  certificate_fingerprint: 2d66bfb68d4e8e2ce6ac89096895c16e9888f985a0b1e20032d88c7a6054adb4\r\n  driver: lxc\r\n  driver_version: 3.0.1\r\n  kernel: Linux\r\n  kernel_architecture: x86_64\r\n  kernel_version: 4.15.0-23-generic\r\n  server: lxd\r\n  server_pid: 29869\r\n  server_version: \"3.2\"\r\n  storage: btrfs\r\n  storage_version: \"4.4\"\r\n  server_clustered: false\r\n  server_name: node39\r\n````\r\n# Issue description\r\n\r\nIn https://github.com/lxc/lxd/issues/4627 it was recommended to use \"-c\" to override a volatile configuration property.\r\n\r\nIs it possible to do the same to a non-volatile property?\r\nI have the following container\r\n````\r\nroot@node39:~# lxc config show aiotm-mqtt\r\narchitecture: x86_64\r\nconfig:\r\n  boot.autostart: \"true\"\r\n  image.architecture: amd64\r\n  image.description: ubuntu 16.04 LTS amd64 (release) (20170919)\r\n  image.label: release\r\n  image.os: ubuntu\r\n  image.release: xenial\r\n  image.serial: \"20170919\"\r\n  image.version: \"16.04\"\r\n  volatile.base_image: 03c2fa6716b5f41684457ca5e1b7316df520715b7fea0378f9306d16fdc646ee\r\n  volatile.eth0.hwaddr: 00:16:3e:55:14:31\r\n  volatile.idmap.base: \"0\"\r\n  volatile.idmap.next: '[{\"Isuid\":true,\"Isgid\":true,\"Hostid\":1000000,\"Nsid\":0,\"Maprange\":1000000000}]'\r\n  volatile.last_state.idmap: '[{\"Isuid\":true,\"Isgid\":true,\"Hostid\":1000000,\"Nsid\":0,\"Maprange\":1000000000}]'\r\n  volatile.last_state.power: RUNNING\r\ndevices:\r\n  eth0:\r\n    ipv4.address: 10.3.4.68\r\n    maas.subnet.ipv4: 10.3.4.0/23\r\n    name: eth0\r\n    nictype: bridged\r\n    parent: br1\r\n    type: nic\r\nephemeral: false\r\nprofiles:\r\n- default\r\nstateful: false\r\ndescription: \"\"\r\nroot@node39:~#\r\n````\r\n\r\nSnapshot works fine, however when trying to copy the container, it fails because the IP Address is already in use by MAAS.  I want to either setup a new IP address in the copy command or delete the MAAS integration line in the eth0 device to allow the copy of a backup of this container.\r\n\r\n````\r\nroot@node39:~# lxc copy aiotm-mqtt/20180704-152517 backup-aiotm-mqtt -c eth0.maas.subnet.ipv4=\"\"\r\nError: Unknown configuration key: eth0.maas.subnet.ipv4\r\nroot@node39:~# lxc copy aiotm-mqtt/20180704-152517 backup-aiotm-mqtt -c maas.subnet.ipv4=\"\"\r\nError: Unknown configuration key: maas.subnet.ipv4\r\n````\r\n\r\nI can do it manually, e.g. remove the MAAS integration, by either deleting the MAAS the line, then create the copy, then add the MAAS integration again  but I'm trying to script it.\r\n\r\n\r\n\r\n\r\n\r\n# Steps to reproduce\r\n\r\nThis may not be an issue after all, is this the proper place to put this queries/issues on using lxd/lxc, or should this be posted somewhere else? a.k.a. forum ?  Where?\r\n\r\n# Information to attach\r\n\r\n - [ ] Any relevant kernel output (`dmesg`)\r\n - [ ] Container log (`lxc info NAME --show-log`)\r\n - [ ] Container configuration (`lxc config show NAME --expanded`)\r\n - [ ] Main daemon log (at /var/log/lxd/lxd.log or /var/snap/lxd/common/lxd/logs/lxd.log)\r\n - [ ] Output of the client with --debug\r\n - [ ] Output of the daemon with --debug (alternatively output of `lxc monitor` while reproducing the issue)\r\n"}}
{"actor":{"display_login":"laralar"}}