edi
edi copied to clipboard
Debootstrap fails to create ../rootfs/test-dev-null during lxc container creation process
Issue Type
- Bug report
Environment detail
sh -x << EOF
cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
python3 --version
Python 3.5.3
ansible-playbook --version
ansible-playbook 2.2.1.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
lxc --version
3.13
dpkg -l | grep "\(lxd\|ansible\)"
ii ansible 2.2.1.0-2+deb9u1 all Configuration management, deployment, and task execution system
EOF
- Edi installation method: Apt
- Ansible installation method: OS package
- LXD installation method: OS package
Desired Behaviour
No error.
Actual Behaviour (Bug report only).
Please note that the failing folder is not encrypted. But it is on a RAID10 setup. This failure does not occur when I use a folder outside of the RAID drive. Please see console output below.. kyukim@Ryzen7:~/my-first-edi-project$ sudo edi -v lxc configure my-first-edi-container my-project-develop.yml [sudo] password for kyukim: INFO:root:Load time dictionary: edi_configuration_name: my-project-develop edi_configure_remote_target: false edi_create_distributable_image: false edi_current_user_gid: 1000 edi_current_user_host_home_directory: /home/kyukim edi_current_user_name: kyukim edi_current_user_ssh_pub_keys:
- /home/kyukim/.ssh/id_rsa.pub edi_current_user_target_home_directory: /home/kyukim edi_current_user_uid: 1000 edi_edi_plugin_directory: /home/kyukim/edi/edi/plugins edi_host_ftp_proxy: '' edi_host_hostname: Ryzen7 edi_host_http_proxy: '' edi_host_https_proxy: '' edi_host_no_proxy: '' edi_host_socks_proxy: '' edi_log_level: INFO edi_lxd_version: '3.13' edi_project_directory: /home/kyukim/my-first-edi-project edi_project_plugin_directory: /home/kyukim/my-first-edi-project/plugins edi_work_directory: /home/kyukim/my-first-edi-project
INFO:root:Using base configuration file 'my-project-develop.yml' INFO:root:Using overlay configuration file 'configuration/overlay/my-project-develop.global.yml' INFO:root:Merged configuration: bootstrap: architecture: amd64 repository: deb http://deb.debian.org/debian/ stretch main repository_key: https://ftp-master.debian.org/keys/archive-key-8.asc tool: debootstrap general: edi_compression: gz edi_required_minimal_edi_version: 1.1.0 parameters: {} lxc_profiles: 100_lxc_networking: path: lxc_profiles/general/lxc_networking/default_interface.yml 200_default_root_device: path: lxc_profiles/general/default_root_device/default_root_device.yml lxc_templates: 100_etc_hostname: path: lxc_templates/debian/hostname/hostname.yml 200_etc_hosts: path: lxc_templates/debian/hosts/hosts.yml playbooks: 100_base_system: parameters: create_default_user: true install_openssh_server: true path: playbooks/debian/base_system/main.yml 200_development_user_facilities: path: playbooks/debian/development_user_facilities/main.yml 300_sample_playbook: path: playbooks/sample_playbook/main.yml 900_base_system_cleanup: path: playbooks/debian/base_system_cleanup/main.yml postprocessing_commands: 100_sample_command: output: sample_output: my-project-develop.result parameters: message: We could do something useful within this command! path: postprocessing_commands/sample_command/custom_command qemu: {} shared_folders: edi_workspace: folder: edi-workspace mountpoint: edi-workspace
Going to bootstrap initial image - be patient. INFO:root:Running command: ['debootstrap', '--arch=amd64', '--variant=minbase', '--include=python,sudo,netbase,net-tools,iputils-ping,ifupdown,isc-dhcp-client,resolvconf,systemd,systemd-sysv,gnupg', '--components=main', '--force-check-gpg', '--keyring=/home/kyukim/my-first-edi-project/tmpeemtv_sf/temp_keyring.gpg', 'stretch', '/home/kyukim/my-first-edi-project/tmpeemtv_sf/rootfs', 'http://deb.debian.org/debian/'] /usr/sbin/debootstrap: 1454: /usr/sbin/debootstrap: cannot create /home/kyukim/my-first-edi-project/tmpeemtv_sf/rootfs/test-dev-null: Permission denied E: Cannot install into target '/home/kyukim/my-first-edi-project/tmpeemtv_sf/rootfs' mounted with noexec or nodev Error: Command '['debootstrap', '--arch=amd64', '--variant=minbase', '--include=python,sudo,netbase,net-tools,iputils-ping,ifupdown,isc-dhcp-client,resolvconf,systemd,systemd-sysv,gnupg', '--components=main', '--force-check-gpg', '--keyring=/home/kyukim/my-first-edi-project/tmpeemtv_sf/temp_keyring.gpg', 'stretch', '/home/kyukim/my-first-edi-project/tmpeemtv_sf/rootfs', 'http://deb.debian.org/debian/']' returned non-zero exit status 1 For more information increase the log level. kyukim@Ryzen7:~/my-first-edi-project$
Thanks for reporting this issue!
I also saw a similar behavior on one of my PCs. There the home folder was encrypted and mounted with nodev. In that case debootstrap is unable to create the required devices (it reports E: Cannot install into target *** mounted with noexec or nodev).
To solve this issue you have several options:
- create a folder outside of the RAID based or encrypted home folder and use edi/debootstrap there.
- in case of encrypted home folder: create an admin user without an encrypted home directory and use edi/debootstrap under this user.
- in case of an encrypted home folder: remount the affected directory with the options required for debootstrap: sudo mount -i -o remount,exec,dev ${HOME}
- in case of RAID: try to setup RAID with exec and dev mount options (right now I do not have a RAID setup and therefore I cannot try it out).
Since this issue seems to affect multiple users, I should probably generate a dedicated hint when edi hits this debootstrap corner case. Alternatively, I could also try to debootstrap e.g. in /var/lib/... .