Bug 927122
Summary: | [virt-sandbox-service] path option is ignored when create sandbox | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Wayne Sun <gsun> |
Component: | libvirt-sandbox | Assignee: | Daniel Berrangé <berrange> |
Status: | CLOSED WORKSFORME | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.0 | CC: | ajia, berrange, dwalsh, dyuan, mzhan, rwu, virt-maint, weizhan, zpeng |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | 922630 | Environment: | |
Last Closed: | 2013-06-25 03:23:00 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: | 922630 | ||
Bug Blocks: |
Description
Wayne Sun
2013-03-25 06:08:05 UTC
Fix path handling in my pool, needed for handling of openshift. pkgs: libvirt-sandbox-0.2.0-1.el7.x86_64 libvirt-1.0.6-1.el7.x86_64 kernel-3.9.0-0.55.el7.x86_64 steps: 1. create container with given path # ll -Zd /home/wayne/test/ drwxrwxr-x. wayne wayne unconfined_u:object_r:user_home_t:s0 /home/wayne/test/ # virt-sandbox-service create -p /home/wayne/test/ -s static,label=system_u:system_r:svirt_lxc_net_t:s0:c200,c300 -C -u httpd.service -N dhcp,source=default apache13 Created sandbox container dir /home/wayne/test//apache13 Created unit file /etc/systemd/system/apache13_sandbox.service Created sandbox config /etc/libvirt-sandbox/services/apache13.sandbox # ll -Z /home/wayne/test/apache13/ drwxr-xr-x. root root system_u:object_r:svirt_lxc_file_t:s0:c200,c300 etc drwxr-xr-x. root root system_u:object_r:svirt_lxc_file_t:s0:c200,c300 home dr-xr-x---. root root system_u:object_r:svirt_lxc_file_t:s0:c200,c300 root drwxr-xr-x. root root system_u:object_r:svirt_lxc_file_t:s0:c200,c300 usr drwxr-xr-x. root root system_u:object_r:svirt_lxc_file_t:s0:c200,c300 var 2. start it # virt-sandbox-service start apache13 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)! Set hostname to <apache13>. /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. [ OK ] Reached target Paths. [ OK ] Listening on Delayed Shutdown Socket. [ OK ] Listening on Journal Socket. [ OK ] Reached target Swap. Starting Activation of LVM2 logical volumes... Starting Journal Service... [ OK ] Started Journal Service. [ OK ] Started Activation of LVM2 logical volumes. Starting Activation of LVM2 logical volumes... [ OK ] Started Activation of LVM2 logical volumes. [ OK ] Reached target Local File Systems. Starting Recreate Volatile Files and Directories... [ OK ] Started Recreate Volatile Files and Directories. [ OK ] Reached target System Initialization. [ OK ] Reached target Timers. [ OK ] Listening on D-Bus System Message Bus Socket. [ OK ] Reached target Sockets. [ OK ] Reached target Basic System. Starting The Apache HTTP Server... Starting Cleanup of Temporary Directories... [ OK ] Started Cleanup of Temporary Directories. httpd.service: main process exited, code=exited, status=1/FAILURE [FAILED] Failed to start The Apache HTTP Server. See 'systemctl status httpd.service' for details. Unit httpd.service entered failed state. [ OK ] Reached target Sandbox multi-user target. # ps auxZ|grep lxc unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 root 21564 0.9 0.0 269940 5648 pts/0 S+ 15:11 0:00 virt-sandbox-service-util -c lxc:/// -s apache13 system_u:system_r:virtd_lxc_t:s0-s0:c0.c1023 root 21599 0.0 0.0 168348 2816 ? Ssl 15:11 0:00 /usr/libexec/libvirt_lxc --name apache13 --console 26 --security=selinux --handshake 29 --background system_u:system_r:svirt_lxc_net_t:s0:c200,c300 root 21602 0.3 0.0 48248 3360 pts/0 Ss+ 15:11 0:00 /bin/systemd --unit multi-user.target --log-target console --system system_u:system_r:svirt_lxc_net_t:s0:c200,c300 root 21613 0.0 0.0 38060 1612 ? Ss 15:11 0:00 /usr/lib/systemd/systemd-journald The container created with given path works now. It works for me? Sometimes apache fails because it can not resolve its hostname. (In reply to Daniel Walsh from comment #4) > It works for me? > > Sometimes apache fails because it can not resolve its hostname. pkgs: libvirt-1.0.6-1.el7.x86_64 libvirt-sandbox-0.2.0-1.el7.x86_64 libvirt-gobject-0.1.6-1.el7.x86_64 libvirt-glib-0.1.6-1.el7.x86_64 qemu-kvm-1.5.0-2.el7.x86_64 kernel-3.9.0-0.55.el7.x86_64 lvm2-2.02.98-6.el7.x86_64 steps: 1. create container with given path # ll -Z /home/wayne/test # virt-sandbox-service create -p /home/wayne/test/ -s static,label=system_u:system_r:svirt_lxc_net_t:s0:c200,c300 -C -u httpd.service -N dhcp,source=default apache13 Created sandbox container dir /home/wayne/test//apache13 Created unit file /etc/systemd/system/apache13_sandbox.service Created sandbox config /etc/libvirt-sandbox/services/apache13.sandbox # ll -Z /home/wayne/test/apache13/ drwxr-xr-x. root root system_u:object_r:svirt_lxc_file_t:s0:c200,c300 etc drwxr-xr-x. root root system_u:object_r:svirt_lxc_file_t:s0:c200,c300 home dr-xr-x---. root root system_u:object_r:svirt_lxc_file_t:s0:c200,c300 root drwxr-xr-x. root root system_u:object_r:svirt_lxc_file_t:s0:c200,c300 usr drwxr-xr-x. root root system_u:object_r:svirt_lxc_file_t:s0:c200,c300 var 2. start container # virt-sandbox-service start apache13 2013-06-25 03:20:15.189+0000: 1: debug : lxcContainerSetStdio:278 : rc=0 2013-06-25 03:20:15.189+0000: 1: debug : virFileClose:90 : Closed fd 14 2013-06-25 03:20:15.189+0000: 1: debug : virFileClose:90 : Closed fd 9 2013-06-25 03:20:15.189+0000: 1: debug : virFileClose:90 : Closed fd 11 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)! Set hostname to <apache13>. /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. [ OK ] Reached target Paths. [ OK ] Listening on Delayed Shutdown Socket. [ OK ] Listening on Journal Socket. [ OK ] Reached target Swap. Starting Activation of LVM2 logical volumes... Starting Journal Service... [ OK ] Started Journal Service. [ OK ] Started Activation of LVM2 logical volumes. Starting Activation of LVM2 logical volumes... [ OK ] Started Activation of LVM2 logical volumes. [ OK ] Reached target Local File Systems. Starting Recreate Volatile Files and Directories... [ OK ] Started Recreate Volatile Files and Directories. [ OK ] Reached target System Initialization. [ OK ] Reached target Timers. [ OK ] Listening on D-Bus System Message Bus Socket. [ OK ] Reached target Sockets. [ OK ] Reached target Basic System. Starting The Apache HTTP Server... Starting Cleanup of Temporary Directories... [ OK ] Started Cleanup of Temporary Directories. Starting D-Bus System Message Bus... [ OK ] Started D-Bus System Message Bus. [ OK ] Started The Apache HTTP Server. [ OK ] Reached target Sandbox multi-user target. it works fine, so close it. |