LXD Storage pool on an NFS share strange user mapping
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Hi
Ref: 18.04 LTS
I originally posted this problem on JUJU discourse (https:/
The problem is when an LXD container has a storage pool on an NFS share is dir mode creating files either touch, vim, ... the UID of the file is set to nobody but chown of the file to root fixes the problem.
I am in the process of testing 19.04 and 19.10 as well.
Matthew
Here is the report from LXD issue.
=======
Required information
Distribution:Ubuntu
Distribution version: 18.04 LTS
The output of "lxc info" or if that fails:
config:
core.https_address: 10.0.4.1:8443
core.trust_
maas.api.key: ****
maas.api.url: http://
api_extensions:
storage_
container_
container_
container_
auth_pki
container_
etag
patch
usb_devices
https_allowed_
image_compressi
directory_
container_cpu_time
storage_
storage_
network
profile_usedby
container_push
container_
certificate_update
container_
gpu_devices
container_
migration_progress
id_map
network_
network_routes
storage
file_delete
file_append
network_dhcp_expiry
storage_
storage_
network_vlan
image_create_
container_
container_
storage_
unix_device_rename
storage_
storage_
network_
storage_
entity_description
image_force_refresh
storage_
id_map_base
file_symlinks
container_
network_
storage_
container_
container_
storage_driver_ceph
storage_
resource_limits
storage_
storage_
storage_
resources
kernel_limits
storage_
macaroon_
network_sriov
console
restrict_devlxd
migration_pre_copy
infiniband
maas_network
devlxd_events
proxy
network_
file_get_symlink
network_leases
unix_device_hotplug
storage_
operation_
clustering
event_lifecycle
storage_
nvidia_runtime
candid_
candid_config
candid_config_key
usb_optional_
api_status: stable
api_version: "1.0"
auth: trusted
public: false
auth_methods:
tls
environment:
addresses:
10.0.4.1:8443
architectures:
x86_64
i686
certificate: |
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
certificate_
driver: lxc
driver_version: 3.0.3
kernel: Linux
kernel_
kernel_version: 4.15.0-54-generic
server: lxd
server_pid: 30277
server_version: 3.0.3
storage: dir
storage_version: "1"
server_clustered: true
server_name: m-node-01
project: ""
UID mapping incorrect when creating a file.
When touching or creating a file with vim (or any other method) is created with the UID on nobody (65534) but other files are all correct the startup. The correct UID can be set by chown of the file
Steps to reproduce
Create container (lxc launch -s nfs ubuntu:18.04)
Access container ( lxc exec modest-ladybug -- sudo /bin/bash )
touch file (touch test)
list dir (ls -la)
root@modest-
total 50
drwx------ 3 root root 6 Jul 15 21:18 .
drwxr-xr-x 22 root root 22 Jun 27 16:28 ..
-rw-r--r-- 1 root root 3106 Apr 9 2018 .bashrc
-rw-r--r-- 1 root root 148 Aug 17 2015 .profile
drwx------ 2 root root 3 Jul 15 21:17 .ssh
-rw-r--r-- 1 nobody root 0 Jul 15 21:18 test
Change own (chown root:root test)
root@modest-
total 50
drwx------ 3 root root 6 Jul 15 21:18 .
drwxr-xr-x 22 root root 22 Jun 27 16:28 ..
-rw-r--r-- 1 root root 3106 Apr 9 2018 .bashrc
-rw-r--r-- 1 root root 148 Aug 17 2015 .profile
drwx------ 2 root root 3 Jul 15 21:17 .ssh
-rw-r--r-- 1 root root 0 Jul 15 21:18 test
Information to attach
Container log (lxc info NAME --show-log)
Name: modest-ladybug
Location: m-node-02
Remote: unix://
Architecture: x86_64
Created: 2019/07/15 21:15 UTC
Status: Running
Type: persistent
Profiles: default
Pid: 24080
Ips:
eth0: inet 10.1.128.8 veth68YBCW
eth0: inet6 fe80::216:
lo: inet 127.0.0.1
lo: inet6 ::1
Resources:
Processes: 24
CPU usage:
CPU usage (in seconds): 9
Memory usage:
Memory (current): 220.18MB
Memory (peak): 279.36MB
Network usage:
eth0:
Bytes received: 832.51kB
Bytes sent: 14.13kB
Packets received: 5312
Packets sent: 176
lo:
Bytes received: 1.42kB
Bytes sent: 1.42kB
Packets received: 16
Packets sent: 16
Log:
lxc modest-ladybug 20190715211703.342 WARN conf - conf.c:
Container configuration (lxc config show NAME --expanded)
architecture: x86_64
config:
image.architecture: amd64
image.description: ubuntu 18.04 LTS amd64 (release) (20190627.1)
image.label: release
image.os: ubuntu
image.release: bionic
image.serial: "20190627.1"
image.version: "18.04"
volatile.
volatile.
volatile.
volatile.
volatile.
volatile.
devices:
eth0:
maas.subnet.ipv4: system-subnet
name: eth0
nictype: bridged
parent: br0
type: nic
root:
path: /
pool: nfs
type: disk
ephemeral: false
profiles:
default
stateful: false
description: ""
Main daemon log (at /var/log/
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
t=2019-
---
ProblemType: Bug
AlsaDevices:
total 0
crw-rw---- 1 root audio 116, 1 Jul 16 07:51 seq
crw-rw---- 1 root audio 116, 33 Jul 16 07:51 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay'
ApportVersion: 2.20.9-0ubuntu7.7
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord': 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
DistroRelease: Ubuntu 18.04
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig': 'iwconfig'
MachineType: Dell Inc. PowerEdge R710
NonfreeKernelMo
Package: linux (not installed)
PciMultimedia:
ProcFB: 0 mgadrmfb
ProcKernelCmdLine: BOOT_IMAGE=
ProcVersionSign
RelatedPackageV
linux-
linux-
linux-firmware 1.173.8
RfKill: Error: [Errno 2] No such file or directory: 'rfkill': 'rfkill'
Tags: bionic uec-images
Uname: Linux 4.15.0-54-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm audio cdrom dialout dip floppy lxd netdev plugdev sudo video
_MarkForUpload: True
dmi.bios.date: 02/19/2018
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 6.5.0
dmi.board.name: 0HYPX2
dmi.board.vendor: Dell Inc.
dmi.board.version: A02
dmi.chassis.type: 23
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.
dmi.product.name: PowerEdge R710
dmi.sys.vendor: Dell Inc.
---
ProblemType: Bug
AlsaDevices: Error: command ['ls', '-l', '/dev/snd/'] failed with exit code 2: ls: cannot access '/dev/snd/': No such file or directory
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay'
ApportVersion: 2.20.9-0ubuntu7.6
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord': 'arecord'
CRDA: N/A
DistroRelease: Ubuntu 18.04
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig': 'iwconfig'
MachineType: Dell Inc. PowerEdge R710
NonfreeKernelMo
Package: linux (not installed)
PciMultimedia:
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
LANG=C.UTF-8
SHELL=/bin/bash
ProcFB: 0 mgadrmfb
ProcKernelCmdLine: BOOT_IMAGE=
ProcVersionSign
RelatedPackageV
linux-
linux-
linux-firmware N/A
RfKill: Error: [Errno 2] No such file or directory: 'rfkill': 'rfkill'
Tags: bionic uec-images
Uname: Linux 4.15.0-54-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups:
WifiSyslog:
_MarkForUpload: True
dmi.bios.date: 02/19/2018
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 6.5.0
dmi.board.name: 0HYPX2
dmi.board.vendor: Dell Inc.
dmi.board.version: A02
dmi.chassis.type: 23
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.
dmi.product.name: PowerEdge R710
dmi.sys.vendor: Dell Inc.
tags: | added: ubuntu-certified |
This isn't a bug against Launchpad (i.e. the launchpad.net site itself). Judging from the history of https:/ /github. com/lxc/ lxd/issues/ 5962, it seems as though Stéphane's view was that it's a kernel bug, so reassigning there.