Bug 1328588
| Summary: | docker-lvm-plugin never work | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Qian Cai <qcai> |
| Component: | docker-latest | Assignee: | Lokesh Mandvekar <lsm5> |
| Status: | CLOSED ERRATA | QA Contact: | atomic-bugs <atomic-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.2 | CC: | ajia, amurdaca, lsm5, lsu, smahajan |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | docker-latest-1.10.3-22.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-05-12 14:55:44 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: | |||
|
Description
Qian Cai
2016-04-19 19:10:23 UTC
Lokesh, Daniel, which patch is available for fixing the bug? still to be fixed, let me work on this and update the rpm btw, caiqian # cat /etc/docker-latest/docker-latest-lvm-plugin vgcreate volume_group_one /dev/vda Is this something that you created? I don't see this installed by default (In reply to Lokesh Mandvekar from comment #3) > still to be fixed, let me work on this and update the rpm > > > btw, caiqian > > > # cat /etc/docker-latest/docker-latest-lvm-plugin > vgcreate volume_group_one /dev/vda > > Is this something that you created? I don't see this installed by default Yes. The binary location is wrong - it should be under /usr/libexec/docker as the other plugins (rhel-push-plugin for instance) I also suspect the unit file is wrong in substituting docker-latest (see my patches for rhel-push-plugin) Another substitution issue is that the conf file should not be docker-latest prefixed (nor the /etc/docker directory as far as I can tell) The plugin should also be running with systemd so the workaround to create the directory where the socket lives is correct and that's the current behavior (since the plugins run with systemd and are socket actihated) Lokesh let me know if you need something else. I'll ping you on IRC and test a patch later today. Yup, all those fixes have been included in docker-latest-1.10.3-19.el7. Moving this to MODIFIED I am afraid, this is still NOT working. # rpm -qa | grep docker docker-forward-journald-1.9.1-38.el7.x86_64 docker-selinux-1.9.1-38.el7.x86_64 docker-common-1.9.1-38.el7.x86_64 docker-rhel-push-plugin-1.10.3-19.el7.x86_64 docker-latest-1.10.3-19.el7.x86_64 docker-lvm-plugin-1.10.3-19.el7.x86_64 docker-1.9.1-38.el7.x86_64 docker-novolume-plugin-1.10.3-19.el7.x86_64 # systemctl start docker-lvm-plugin # systemctl is-active docker-lvm-plugin active # systemctl restart docker-latest # systemctl is-active docker-latest active # ls -l /run/docker/plugins/ total 0 srw-rw-rw-. 1 root root 0 May 2 10:59 docker-novolume-plugin.sock srw-rw----. 1 root root 0 May 2 13:49 lvm.sock srw-rw-rw-. 1 root root 0 May 2 10:27 rhel-push-plugin.sock # cat /etc/docker/docker-lvm-plugin vgcreate volume_group_one /dev/vdb # docker-latest volume create -d lvm --name foobar --opt size=0.2G Error response from daemon: create foobar: VolumeDriver.Create: Volume group name must be provided for volume creation. Please update the config file /etc/docker/docker-lvm-plugin with volume group name. the config file `/etc/docker/docker-lvm-plugin` needs to be updated manually, Did you update the config file with the volume group name ? Shishir Yes, I did # vgcreate volume_group_one /dev/vdb Physical volume "/dev/vdb" successfully created Volume group "volume_group_one" successfully created # cat /etc/docker/docker-lvm-plugin volume_group_one # docker-latest volume create -d lvm --name foobar --opt size=0.2G Error response from daemon: create foobar: VolumeDriver.Create: Volume group name must be provided for volume creation. Please update the config file /etc/docker/docker-lvm-plugin with volume group name. i'll be shipping thie config file https://github.com/projectatomic/docker-lvm-plugin/blob/master/etc/docker/docker-lvm-plugin upcoming fix.. CAI, I think you are creating and updating the config (/etc/docker/docker-lvm-plugin) file manually. Which is breaking the format of how the value should be read. format: VOLUME_GROUP=volume_group_one. You can change the format, and it should work for now. But I would suggest, wait for lsm5 fix and use the config file provided in the package. Shishir You are right. It is working like a charm now with the new format. When the storage size is too small(less than 4096 blocks), it should be failed to create volume, but in fact, the volume is created on system.
# rpm -q docker-latest docker-lvm-plugin
docker-latest-1.10.3-21.el7.x86_64
docker-lvm-plugin-1.10.3-21.el7.x86_64
# docker-latest volume create -d lvm --name foobar --opt size=0.01G
Error response from daemon: create foobar: VolumeDriver.Create: agsize (3072 blocks) too small, need at least 4096 blocks
Usage: mkfs.xfs
/* blocksize */ [-b log=n|size=num]
/* metadata */ [-m crc=0|1,finobt=0|1]
/* data subvol */ [-d agcount=n,agsize=n,file,name=xxx,size=num,
(sunit=value,swidth=value|su=num,sw=num|noalign),
sectlog=n|sectsize=num
/* force overwrite */ [-f]
/* inode size */ [-i log=n|perblock=n|size=num,maxpct=n,attr=0|1|2,
projid32bit=0|1]
/* no discard */ [-K]
/* log subvol */ [-l agnum=n,internal,size=num,logdev=xxx,version=n
sunit=value|su=num,sectlog=n|sectsize=num,
lazy-count=0|1]
/* label */ [-L label (maximum 12 characters)]
/* naming */ [-n log=n|size=num,version=2|ci,ftype=0|1]
/* no-op info only */ [-N]
/* prototype file */ [-p fname]
/* quiet */ [-q]
/* realtime subvol */ [-r extsize=num,size=num,rtdev=xxx]
/* sectorsize */ [-s log=n|size=num]
/* version */ [-V]
devicename
<devicename> is required unless -d name=xxx is given.
<num> is xxx (bytes), xxxs (sectors), xxxb (fs blocks), xxxk (xxx KiB),
xxxm (xxx MiB), xxxg (xxx GiB), xxxt (xxx TiB) or xxxp (xxx PiB).
<value> is xxx (512 byte blocks).
[root@devs-1 ~]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
home rhel -wi-ao---- 47.45g
root rhel -wi-ao---- 50.00g
swap rhel -wi-ao---- 2.00g
foobar volume_group_one -wi-a----- 12.00m
# docker-latest volume create -d lvm --name foobar --opt size=0.2G
Error response from daemon: create foobar: VolumeDriver.Create: Rounding up size to full physical extent 208.00 MiB
Logical volume "foobar" already exists in volume group "volume_group_one"
# lvremove foobar volume_group_one
Volume group "foobar" not found
Cannot process volume group foobar
Do you really want to remove active logical volume foobar? [y/n]: y
Logical volume "foobar" successfully removed
# docker-latest volume create -d lvm --name foobar --opt size=0.2G
foobar
# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
home rhel -wi-ao---- 47.45g
root rhel -wi-ao---- 50.00g
swap rhel -wi-ao---- 2.00g
foobar volume_group_one -wi-a----- 208.00m
That help message there is awful and it's exposing the lower interface. I'll take care of fixing it. that error is raised because there's no check in the code for the size argument. Going to add one, lvcreate isn't erroring out at create time. The PR got merged. We can rebuild. upcoming fix ... docker-latest-1.10.3-22.el7 The error message handling looks good to me: docker-latest-1.10.3-22.el7.x86_64 #docker-latest volume create -d lvm --name foobar --opt size=0.01G Error response from daemon: create foobar: create foobar: Error looking up volume plugin lvm: plugin not found #lvs shows nothing move to verified Sorry Luwen but the error message is saying 'plugin not found'. The error message you should see should be 'error partitioning volume' Luwen, docker is throwing this error, as it is not able to find the volume driver plugin associated with the given name (lvm). Can you tell me the steps you took to get this error ? Also, is there a machine I can SSH into to take a look into this ? Shishir (In reply to Antonio Murdaca from comment #23) > Sorry Luwen but the error message is saying 'plugin not found'. The error > message you should see should be 'error partitioning volume' Yeah, sorry for that, i used the wrong machine (there are 4 vms in my host for testing) which the docker-volume-plugin is not started. # vgdisplay --- Volume group --- VG Name docker-latest System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 8 VG Access read/write VG Status resizable MAX LV 0 Cur LV 1 Open LV 0 Max PV 0 Cur PV 1 Act PV 1 VG Size 8.00 GiB PE Size 4.00 MiB Total PE 2047 Alloc PE / Size 823 / 3.21 GiB Free PE / Size 1224 / 4.78 GiB VG UUID BdH5DF-51Xh-t5h4-sfmb-9tXT-N35k-nSfSJS # service docker-lvm-plugin status Redirecting to /bin/systemctl status docker-lvm-plugin.service ● docker-lvm-plugin.service - Docker Volume Driver for lvm volumes Loaded: loaded (/usr/lib/systemd/system/docker-lvm-plugin.service; disabled; vendor preset: disabled) Active: active (running) since Tue 2016-05-10 12:42:46 CST; 2s ago # docker-latest volume create -d lvm --name docker-latest --opt size=0.01G Error response from daemon: create docker-latest: VolumeDriver.Create: error partitioning volume I think i could verified this now with the steps above. Make up more information/steps: error trigger: # docker-latest volume create -d lvm --name foobar --opt size=0.01G Error response from daemon: create foobar: VolumeDriver.Create: error partitioning volume Lvm create: # docker-latest volume create -d lvm --name foobar --opt size=0.02G foobar # docker-latest volume create -d lvm --name docker-latest --opt size=0.02G docker-latest # lvdisplay --- Logical volume --- LV Path /dev/docker-latest/foobar LV Name foobar VG Name docker-latest LV UUID Poovyb-1wOK-j0hY-7T4U-PpnO-RYZh-y5QSdN LV Write Access read/write LV Creation host, time myregistrydomain.com, 2016-05-10 13:09:31 +0800 LV Status available # open 0 LV Size 24.00 MiB Current LE 6 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 252:3 --- Logical volume --- LV Path /dev/docker-latest/docker-latest LV Name docker-latest VG Name docker-latest LV UUID TDhgVX-oojR-TP2e-2fe7-tK1P-BP1o-xPLWXV LV Write Access read/write LV Creation host, time myregistrydomain.com, 2016-05-10 13:09:45 +0800 LV Status available # open 0 LV Size 24.00 MiB Current LE 6 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 252:4 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHEA-2016-1057.html |