[lxc-users] Profile Assignment Error
Jamie Brown
Jamie.Brown at mpec.co.uk
Wed Mar 22 12:03:30 UTC 2017
This may not be the answer but I think the client commands for applying profiles have changed, so depending on your version it could be that you need to use one of;
lxc profile assign [<remote>:]<container> <profiles>
lxc profile add [<remote>:]<container> <profile>
lxc profile remove [<remote>:]<container> <profile>
Rather than lxc profile apply.
From: lxc-users <lxc-users-bounces at lists.linuxcontainers.org> on behalf of Gabriel Marais <gabriel.j.marais at gmail.com>
Reply-To: LXC users mailing-list <lxc-users at lists.linuxcontainers.org>
Date: Wednesday, 22 March 2017 at 11:50
To: "lxc-users at lists.linuxcontainers.org" <lxc-users at lists.linuxcontainers.org>
Subject: [lxc-users] Profile Assignment Error
Hi Guys
I am having an issue assigning a profile to a container. Below my steps:-
1. List Profiles
[13:43:12] root at vm-server-01:~ # lxc profile list
+---------+---------+
| NAME | USED BY |
+---------+---------+
| default | 0 |
+---------+---------+
| docker | 0 |
+---------+---------+
2. Create a new Profile
[13:43:18] root at vm-server-01:~ # lxc profile create migratetest
Profile migratetest created
[13:46:47] root at vm-server-01:~ # lxc profile list
+-------------+---------+
| NAME | USED BY |
+-------------+---------+
| default | 0 |
+-------------+---------+
| docker | 0 |
+-------------+---------+
| migratetest | 0 |
+-------------+---------+
[13:48:47] root at vm-server-01:~ # lxc-ls --fancy
NAME STATE AUTOSTART GROUPS IPV4 IPV6
paulus-test STOPPED 0 - - -
snappy_1604 STOPPED 0 - - -
ubuntu_1404 STOPPED 0 - - -
ubuntu_1604 STOPPED 0 - - -
3. Link the container to the profile
[13:45:21] root at vm-server-01:~ # lxc profile apply ubuntu_1404 migratetest --debug
DBUG[03-22|13:46:47] Raw response: {"type":"sync","status":"Success","status_code":200,"operation":"","error_code":0,"error":"","metadata":{"config":{"core.trust_password":true,"images.auto_update_cached":"false","images.auto_update_interval":"24","images.remote_cache_expiry":"5"},"api_extensions":["storage_zfs_remove_snapshots","container_host_shutdown_timeout","container_syscall_filtering","auth_pki","container_last_used_at","etag","patch","usb_devices","https_allowed_credentials","image_compression_algorithm","directory_manipulation","container_cpu_time","storage_zfs_use_refquota","storage_lvm_mount_options","network","profile_usedby","container_push","container_exec_recording","certificate_update","container_exec_signal_handling","gpu_devices","container_image_properties","migration_progress","id_map","network_firewall_filtering","network_routes","storage","file_delete","file_append","network_dhcp_expiry","storage_lvm_vg_rename","storage_lvm_thinpool_rename","network_vlan","image_create_aliases","container_stateless_copy"],"api_status":"stable","api_version":"1.0","auth":"trusted","public":false,"environment":{"addresses":[],"architectures":["x86_64","i686"],"certificate":"-----BEGIN CERTIFICATE-----\nMIIFXjCCA0agAwIBAgIQE9+oSwckHm0nytRugNyHnTANBgkqhkiG9w0BAQsFADA6\nMRwwGgYDVQQKExNsaW51eGNvbnRhaW5lcnMub3JnMRowGAYDVQQDDBFyb290QHZt\nLXNlcnZlci0wMTAeFw0xNzAzMjIwOTI3NTJaFw0yNzAzMjAwOTI3NTJaMDoxHDAa\nBgNVBAoTE2xpbnV4Y29udGFpbmVycy5vcmcxGjAYBgNVBAMMEXJvb3RAdm0tc2Vy\ndmVyLTAxMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEArHikisFdu0cq\nsgZw+n1jhyLf/C8H+ANs5eWHxStqSY/wShQSY7mujVLhvu/mM/awGmbeqISwGskN\nsVBC7fkCqWf3vf/n6FlzOWwD1x3FSGqYfAbO+uXFQxsYA6BZQiUjhtEb/4Ks2ok2\nil/t5IfBaEtIO25ES4jw2U1pytOd63Eu25B9wMmX4k/vj5n/Nk/PQgVkz3VHNCXm\nqDMnH0rOCPjP8Tr1ZYMruVxZ9Q1GFR+BGvomDKzLYRmJJnToJJMmva+qmv+Mg3Md\nS9L1WXTd7S888SVNQm6lK5R/NPkKkEkA92Z926pVI3irpL9dfvLxO+5ph2rjppZO\n3+UO+g4MIfZbznA9+FF9Sac7/qymmRUkqZMvWyBRWOSYhRcEMrpCBIn8xJPLbtmL\n1vEC2C/OSDDrwvAb29nWjg6AkXX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AP0RnwG3k\nm/UgEHt84g+L1gHDkKS1N4EhekK8tGiLXebJnuRYTlG/4A==\n-----END CERTIFICATE-----\n","certificate_fingerprint":"","driver":"lxc","driver_version":"2.0.7","kernel":"Linux","kernel_architecture":"x86_64","kernel_version":"4.4.0-62-generic","server":"lxd","server_pid":1555,"server_version":"2.12","storage":"","storage_version":""}}}
DBUG[03-22|13:46:47] Raw response: {"error":"not found","error_code":404,"type":"error"}
Even with the container started, I get the same error. Can someone perhaps point me in the right direction?
Thanks, Gabriel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170322/a625e5db/attachment-0001.html>
More information about the lxc-users
mailing list