{"action":"created","issue":{"url":"https://api.github.com/repos/lxc/lxd/issues/4627","repository_url":"https://api.github.com/repos/lxc/lxd","labels_url":"https://api.github.com/repos/lxc/lxd/issues/4627/labels{/name}","comments_url":"https://api.github.com/repos/lxc/lxd/issues/4627/comments","events_url":"https://api.github.com/repos/lxc/lxd/issues/4627/events","html_url":"https://github.com/lxc/lxd/issues/4627","id":330336550,"node_id":"MDU6SXNzdWUzMzAzMzY1NTA=","number":4627,"title":"MAAS Integration with LXD 3.0.0","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":4,"created_at":"2018-06-07T15:58:00Z","updated_at":"2018-06-07T18:15:18Z","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\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\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.30.60.14:8443\r\n  - 10.3.4.14: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    MIIFTDCCAzSgAwIBAgIQSkN0jYBB/wT0hHA2QbzeDDANBgkqhkiG9w0BAQsFADA0\r\n    MRwwGgYDVQQKExNsaW51eGNvbnRhaW5lcnMub3JnMRQwEgYDVQQDDAtyb290QG5v\r\n    ZGUxNDAeFw0xODA2MDcxNDQ1NTRaFw0yODA2MDQxNDQ1NTRaMDQxHDAaBgNVBAoT\r\n    E2xpbnV4Y29udGFpbmVycy5vcmcxFDASBgNVBAMMC3Jvb3RAbm9kZTE0MIICIjAN\r\n    BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEApEg+hGwilADwr4WxMOg++PkqRkZL\r\n    mGvLUEPZH2VvpWP2kcGhu5zlZth3an9hyzAMmKsx9g6/1m1Uwcwe+5FcB/Phc9r/\r\n    lU8h5rK2IL5ABnR4Rck+4dAEFiRWnGAhv5hgPCA9W5BZrxkthcSFh5voO3twIU+i\r\n    qiO2Lu/Y9mC0frZfN0kcScjQ2ZfT57nFG7opxK3ugI8CRdDaBzU4yk6hvBgK5nIs\r\n    RJF+JKX56MTvQWYc1F4wPiZ0HX1MNw413sIWu4q0YHg55U10f24F6TO9ZdyKYPF/\r\n    4uBoiLOniWHT/Vgg7gHKVIZT3/0YNl9s5PJ+nLHbwLn9/xlJ9LEhHBJtfJl2rqAJ\r\n    zIhIjkOQX2C0tG5sXRLEidthiSagJ1rzeFAlSXrCh5R+jHa501d9SUV4bDSQ2YWl\r\n    UKTODWNvjkLqyohsevhNCa54vZeN5t3brsoeFYGcW82pz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3GLNwdrwQ4MszaOk7NM+oxbkzzvWkuWhQCDH1VE0/tpHx5uJ/I5UQCiE\r\n    t/T//ph0eyDSmGxVJP7SLw==\r\n    -----END CERTIFICATE-----\r\n  certificate_fingerprint: 2f791d30b593586a6f11a8417d591585601c38f0199761d8d6a6a7931aed0450\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-22-generic\r\n  server: lxd\r\n  server_pid: 7254\r\n  server_version: 3.0.0\r\n  storage: btrfs\r\n  storage_version: 4.15.1\r\n  server_clustered: true\r\n  server_name: node14\r\n```\r\n# Issue description\r\n\r\n1. lxd init fails\r\n```\r\nconfig:\r\n  core.https_address: '[::]:8443'\r\n  core.trust_password: *******\r\n  maas.api.key: MK4Qp5GKDLjUu2khVh:Fa9bjsD37tsANX3Hpr:YMdnsak5Ete2ypqqK3etvrr3cEA4pXhG\r\n  maas.api.url: http://10.3.4.10:5240\r\ncluster:\r\n  server_name: node14\r\n  enabled: true\r\n  cluster_address: \"\"\r\n  cluster_certificate: \"\"\r\n  cluster_password: \"\"\r\nnetworks: []\r\nstorage_pools:\r\n- config:\r\n    source: /data/bpool/local\r\n  description: \"\"\r\n  name: local\r\n  driver: btrfs\r\nprofiles:\r\n- config: {}\r\n  description: \"\"\r\n  devices:\r\n    eth0:\r\n      maas.subnet.ipv4: 10.30.61.0/24\r\n      name: eth0\r\n      nictype: bridged\r\n      parent: br161\r\n      type: nic\r\n    root:\r\n      path: /\r\n      pool: local\r\n      type: disk\r\n  name: default\r\n```\r\n```\r\nError: Failed to update server configuration: unsupported version: ServerError: 404 Not Found (\r\n<html>\r\n  <head><title>404 - No Such Resource</title></head>\r\n  <body>\r\n    <h1>No Such Resource</h1>\r\n    <p>No such child resource.</p>\r\n  </body>\r\n</html>\r\n)\r\n```\r\nThis happened after an `apt update` and `apt upgrade` . I reinstalled the server using MAAS, and then didn;t do the apt update and apt upgrade and could register successfully\r\n\r\nLater I realized that the MAAS URL was incorrect, when I added **`/MAAS`** it worked fine.  the problem was discovered after I used the yaml file in another server that was already upgradede with apt.\r\n\r\nMaybe the request is a meaningful message if the MAAS server can't be contacted, or the URL is incorrect.\r\n\r\n2. second error. If I try to move the container to a second node in another cluster, it gives me a MAAS error:\r\n```\r\nroot@node14:~# lxc image copy ubuntu:b local: --copy-aliases --auto-update\r\nIf this is your first time running LXD on this machine, you should also run: lxd init\r\nTo start your first container, try: lxc launch ubuntu:16.04\r\n\r\nImage copied successfully!\r\nroot@node14:~# lxc launch local:b test-161\r\nCreating test-161\r\nError: {\"hostname\": [\"Node with this Hostname already exists.\"]}\r\nroot@node14:~#  #### DELETED THE NODE FROM THE MAAS DNS STATIC ASSINGMENT ON ANOTHER LXD HOST.\r\nroot@node14:~# lxc launch local:b test-161\r\nCreating test-161\r\nStarting test-161\r\nroot@node14:~# lxc list\r\n+----------+---------+------+------+------------+-----------+----------+\r\n|   NAME   |  STATE  | IPV4 | IPV6 |    TYPE    | SNAPSHOTS | LOCATION |\r\n+----------+---------+------+------+------------+-----------+----------+\r\n| test-161 | RUNNING |      |      | PERSISTENT | 0         | node14   |\r\n+----------+---------+------+------+------------+-----------+----------+\r\n```\r\nI had to manually start the bridge \r\nhttps://bugs.launchpad.net/ubuntu/+source/nplan/+bug/1736975\r\n\r\nThis is how the bridge is automatically created from MAAS deployment on the node, it is indeed an anonymous bridge. I don't want a local IP, since I just want to use it for containers\r\n\r\nCan LXD team help, push this bug to be fixed in netplan?  Please!! 👍 \r\n\r\n```\r\n        br161:\r\n            interfaces:\r\n            - eno1.161\r\n            parameters:\r\n                forward-delay: 15\r\n                stp: false\r\n```\r\n\r\n```\r\nroot@node14:~# ip link show br161\r\n6: br161: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000\r\n    link/ether 5a:82:fb:8e:ee:82 brd ff:ff:ff:ff:ff:ff\r\nroot@node14:~# ip link set up br161\r\nroot@node14:~# ip link show br161\r\n6: br161: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000\r\n    link/ether 5a:82:fb:8e:ee:82 brd ff:ff:ff:ff:ff:ff\r\nroot@node14:~# lxc start test-161\r\nroot@node14:~# lxc list\r\n+----------+---------+---------------------+------+------------+-----------+----------+\r\n|   NAME   |  STATE  |        IPV4         | IPV6 |    TYPE    | SNAPSHOTS | LOCATION |\r\n+----------+---------+---------------------+------+------------+-----------+----------+\r\n| test-161 | RUNNING | 10.30.61.242 (eth0) |      | PERSISTENT | 0         | node14   |\r\n+----------+---------+---------------------+------+------------+-----------+----------+\r\n```\r\n\r\nNow.. second error, trying to move the container from one cluster to another cluster (each node an independent cluster.\r\n\r\n```\r\nroot@node14:~# lxc move test-161 node15:\r\nError: Failed container creation: {\"mac_addresses\": [\"MAC address 00:16:3e:24:68:67 already in use on test-161.\"], \"hostname\": [\"Node with this Hostname already exists.\"]}\r\nroot@node14:~# lxc move test-161 node15:test-161-15\r\nError: Failed container creation: {\"mac_addresses\": [\"MAC address 00:16:3e:24:68:67 already in use on test-161.\"]}\r\n```\r\n\r\n# Steps to reproduce\r\n\r\nFirst error (lxd init)\r\n 1. fresh cloud image install of Ubuntu 18.04, \r\n 2. apt update apt upgrade\r\n 3. lxd init with the given info (do not put the /MAAS in the MAAS URL )\r\n\r\nSecond error (MAAS integration, moving containers)\r\n\r\n1. create two LXD hosts both cluster (I used the preseed of the first on the second one, Both registered on MAAS, but not part of the same cluster.\r\n\r\n2. create a new container in node1\r\n3. lxc add remote node2 IP \r\n4. lxc move CONTAINER node2:\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/lxc/lxd/issues/comments/395515636","html_url":"https://github.com/lxc/lxd/issues/4627#issuecomment-395515636","issue_url":"https://api.github.com/repos/lxc/lxd/issues/4627","id":395515636,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTUxNTYzNg==","user":{"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},"created_at":"2018-06-07T18:15:18Z","updated_at":"2018-06-07T18:15:18Z","author_association":"MEMBER","body":"Yes, `lxc move` should work fine with `-s`, that's because there is no such thing as a \"move\" in the API.\r\nThe client tool actually does a copy of the container from the first server to the second and then if that worked well, asks the source server to delete the container.\r\n\r\nThe local `lxc move` is a single API call that tells LXD to rename the container, so when doing that, you never have two containers with the same MAC, MAAS simply gets told that the container changed name."}}
{"actor":{"display_login":"stgraber"}}