Bug 970871
| Summary: | [virt-sandbox-service] problem of container with dynamic labelling | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Wayne Sun <gsun> |
| Component: | libvirt-sandbox | Assignee: | Daniel Berrangé <berrange> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.0 | CC: | ajia, berrange, cwei, dwalsh, dyuan, mzhan, virt-maint, weizhan, zpeng |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-sandbox-0.2.1-1.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 921972 | Environment: | |
| Last Closed: | 2014-06-13 12:25:45 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 921972 | ||
| Bug Blocks: | |||
|
Description
Wayne Sun
2013-06-05 06:58:43 UTC
detail steps 1. create a container with dynamic label # virt-sandbox-service -c lxc:/// create -C -u httpd.service -s dynamic -N dhcp,source=default apache12 Created sandbox container dir /var/lib/libvirt/filesystems/apache12 Created unit file /etc/systemd/system/apache12_sandbox.service Created sandbox config /etc/libvirt-sandbox/services/apache12.sandbox 2. start container # virt-sandbox-service start apache12 systemd 204 running in system mode. (+PAM +LIBWRAP +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ) Detected virtualization 'lxc-libvirt'. Welcome to Red Hat Enterprise Linux Server 7.0 (Maipo)! Failed to read configured hostname: Permission denied Cannot open /etc/machine-id: Permission denied Failed to open /etc/fstab: Permission denied /dev/mapper/control: mknod failed: Operation not permitted Failure to communicate with kernel device-mapper driver. Check that device-mapper is available in the kernel. /usr/lib/systemd/system-generators/systemd-fstab-generator exited with exit status 1. Failed to open directory /etc/systemd/system: Permission denied opendir(/etc/rc.d/rc1.d) failed: Permission denied opendir(/etc/rc.d/rc2.d) failed: Permission denied opendir(/etc/rc.d/rc3.d) failed: Permission denied opendir(/etc/rc.d/rc4.d) failed: Permission denied opendir(/etc/rc.d/rc5.d) failed: Permission denied opendir(/etc/rc.d/rc0.d) failed: Permission denied opendir(/etc/rc.d/rc6.d) failed: Permission denied Failed to load default target: Permission denied Trying to load rescue target... Failed to isolate default target: Unit sysinit.target failed to load: Permission denied. See system logs and 'systemctl status sysinit.target' for details. 3. start container created with -i -s dynamic # virt-sandbox-service create -i 1000 -s dynamic -C -u httpd.service -N dhcp,source=default apache20 Created sandbox container image /var/lib/libvirt/images/apache20.raw Created unit file /etc/systemd/system/apache20_sandbox.service Created sandbox config /etc/libvirt-sandbox/services/apache20.sandbox # virt-sandbox-service start apache20 Unable to start container: Failed to create domain: internal error guest failed to start: 2013-06-05 06:42:05.592+0000: 21096: debug : danb, I could check if the user specifies dynamic type to force them to use an image file. Upstream now refuses to allow dynamic labelling unless an image is used. pkgs: libvirt-sandbox-0.2.1-1.el7.x86_64 libvirt-gobject-0.1.6-1.el7.x86_64 libvirt-1.1.0-1.el7.x86_64 kernel-3.9.0-0.55.el7.x86_64 libvirt-gconfig-0.1.7-1.el7.x86_64 steps: 1. create systemd container with dynamic label # virt-sandbox-service -c lxc:/// create -C -u httpd.service -s dynamic -N dhcp,source=default dynamic_test /usr/bin/virt-sandbox-service: Dynamic security label only supported for image based containers 2. create systemd container with -i and dynamic label # virt-sandbox-service create -i 1000 -s dynamic -C -u httpd.service -N dhcp,source=default dynamic_img Created sandbox container image /var/lib/libvirt/images/dynamic_img.raw Created unit file /etc/systemd/system/dynamic_img_sandbox.service Created sandbox config /etc/libvirt-sandbox/services/dynamic_img.sandbox # virt-sandbox-service start dynamic_img Unable to start container: Failed to create domain: internal error guest failed to start: 2013-07-10 10:42:23.437+0000: 3561: debug : virFileClose: this is tracked by bug 927125 so this is fixed. This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |