Baremetal server provisioning fails: 'Failed to remove physical volume "/dev/sda4" from volume group "docker"' (will be fixed in Ubuntu 16.04)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fuel for OpenStack |
Confirmed
|
Medium
|
Fuel Sustaining | ||
Mitaka |
Won't Fix
|
Medium
|
Dmitry Guryanov |
Bug Description
Fuel version info (9.0 liberty): http://
Environment deployment fails on baremetal servers, because one of slave nodes can't be provisioned:
2016-03-16 09:08:06 DEBUG [972] 4f67c00a-
{:sender=>"3",
:statuscode=>0,
:statusmsg=>"OK",
:data=>
{:stdout=>"",
:stderr=>
"Unexpected error\nUnexpected error while running command.\nCommand: vgremove -f docker\nExit code: 5\nStdout: ''\nStderr: 'File descriptor 3 (/run/lock/
eaked on vgremove invocation. Parent PID 13459: /usr/bin/
hon2.7\\n Assertion failed: can\\'t _pv_write non-orphan PV (in VG #orphans_lvm2)\\n Failed to remove physical volume \"/dev/sda4\" from volume group \"docker\"\\n Volume
group \"docker\" not properly removed\\n'\n",
:exit_
...
2016-03-16 09:08:06 ERROR [972] 4f67c00a-
...
2016-03-16 09:11:55 DEBUG [972] Aborting provision. To many nodes failed: ["3"]
Step to reproduce:
1. Create cluster
2. Add baremetal nodes. Use servers which previously had Fuel master node (8.0 with docker) installed and their drives aren't wiped.
3. Deploy changes.
Expected result: cluster is deployed
Actual result: deployment fails
tags: | added: feature-image-based |
Changed in fuel: | |
status: | New → Confirmed |
Changed in fuel: | |
assignee: | Fuel Python Team (fuel-python) → Dmitry Guryanov (dguryanov) |
Changed in fuel: | |
milestone: | 9.0 → 10.0 |
Changed in fuel: | |
assignee: | Dmitry Guryanov (dguryanov) → MOS Linux (mos-linux) |
tags: |
added: area-mos removed: area-python feature-image-based |
tags: |
added: area-python feature-image-based removed: area-mos |
Perhaps, it's a bug in lvm2 somewhere.
According to the logs, the order of removal is fine and proper. I have no idea how it could be 'not properly removed'.
There was few logical volumes:
Found logical volumes: [{'path': '/dev/docker/ docker- pool', 'uuid': 'bWtwfM- G6cH-YiVl- J2sB-UkxO- csZD-FfRaGR' , 'vg': 'docker', 'name': 'docker-pool', 'size': 9588}, {'path': '/dev/os/root', 'uuid': 'Il94nB- 3dZB-uGqa- 64cG-2Xw0- QQ2r-Cy1tVV' , 'vg': 'os', 'name': 'root', 'size': 10000}, {'path': '/dev/os/swap', 'uuid': 'juhGUi- jg27-oqZw- mO8n-ueaz- j2zY-LcahMp' , 'vg': 'os', 'name': 'swap', 'size': 16064}, {'path': '/dev/os/var', 'uuid': 'GeoTnJ- afXF-00ZR- flJC-3d5c- uxSB-usUgWZ' , 'vg': 'os', 'name': 'var', 'size': 362920}, {'path': '/dev/os/varlog', 'uuid': 'PvnaeU- Gq5o-8cKP- 4zSh-Kett- 2Ezb-dksDoG' , 'vg': 'os', 'name': 'varlog', 'size': 544376}]
They was removed one by one.
The last volume which was removed was os/varlog
Found logical volumes: [{'path': '/dev/os/varlog', 'uuid': 'PvnaeU- Gq5o-8cKP- 4zSh-Kett- 2Ezb-dksDoG' , 'vg': 'os', 'name': 'varlog', 'size': 544376}]
[-] Trying to execute command: lvremove -f /dev/os/varlog
lvremove returned 0.
Once all logical volumes were removed, then fuel-agent started to remove volume group.
Found volume groups: [{'size': 19996, 'name': 'docker', 'free': 19976, 'uuid': 'bjKXRo- dy2D-Skgv- Wrlx-bfEt- M2jX-mNldQ6' }, {'size': 933444, 'name': 'os', 'free': 933444, 'uuid': 'hq0V19- RtYh-UkjR- C2e5-gGXx- Lb43-cJft1p' }]
Trying to execute command: vgremove -f docker
But, vgremove threw an error:
2016-03- 16T09:07: 10.214044+ 00:00 info: Command: vgremove -f docker 16T09:07: 10.214044+ 00:00 info: Exit code: 5 16T09:07: 10.214055+ 00:00 info: Stdout: '' 16T09:07: 10.214055+ 00:00 info: Stderr: 'File descriptor 3 (/run/lock/ provision. lock) leaked on vgremove invocation. Parent PID 13459: /usr/bin/ python2. 7\nFile descriptor 4 (/var/log/ fuel-agent. log) leaked on vgremove invocation. Parent PID 13459: /usr/bin/ python2. 7\n Assertion failed: can\'t _pv_write non-orphan PV (in VG #orphans_lvm2)\n Failed to remove physical volume "/dev/sda4" from volume group "docker"\n Volume group "docker" not properly removed\n
2016-03-
2016-03-
2016-03-
So, the bug doesn't seem to be related with python code itself.
Looks like fuel-agent stepped into the issue of lvm2.