dockerctl silently fails if a lock is present

Bug #1513422 reported by Egor Kotko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Bartłomiej Piotrowski

Bug Description

dockerctl silently fails if a lock is present

Steps to reproduce:
1. On the master node execute:
#dockerctl backup

Actual result:

+ set -e
+ lock
+ [[ '' -eq 1 ]]
+ exec
+ flock -n 904
+ echo 'Failed to acquire the lock.'
+ exit 1

Revision history for this message
Egor Kotko (ykotko) wrote :
Changed in fuel:
status: New → Confirmed
assignee: Fuel Library Team (fuel-library) → Bartłomiej Piotrowski (bpiotrowski)
tags: added: area-library
removed: docker
Changed in fuel:
importance: Medium → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (master)

Fix proposed to branch: master
Review: https://review.openstack.org/242488

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/242488
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=0e98edbb191dc76e680107a939f66de30d47747c
Submitter: Jenkins
Branch: master

commit 0e98edbb191dc76e680107a939f66de30d47747c
Author: Bartłomiej Piotrowski <email address hidden>
Date: Fri Nov 6 14:47:51 2015 +0100

    Fix dockerctl unlocking

    * replace $FDLOCK with correct file descriptor
    * do an unlock before attaching to a container – it never exits unless
      killed by supervisord
    * correctly redirect error message to stderr
    * remove /var/lock/dockerctl

    Closes-bug: 1513422
    Change-Id: Idd70c381632e3dca7c24edab78a731dc03f363e1

Changed in fuel:
status: In Progress → Fix Committed
tags: added: regression-8.0
tags: added: on-verification
Revision history for this message
ElenaRossokhina (esolomina) wrote :

Verified on Fuel 229 build

Backup fuel_backup_2015-12-03_1126.tar.lrz attached
Logs:
[root@nailgun ~]# ls -la /var/lock/
total 16
drwxrwxr-x. 4 root lock 4096 Dec 3 11:26 .
drwxr-xr-x. 23 root root 4096 Dec 3 09:27 ..
-rw-r--r-- 1 root root 0 Dec 3 11:26 dockerctl
-rw-r--r-- 1 root root 0 Dec 3 11:00 fuel-logrotate
-rw-r--r-- 1 root root 0 Nov 30 11:15 kdump
drwx------. 2 root root 4096 Nov 30 11:06 lvm
drwxr-xr-x. 2 root root 4096 Dec 3 00:00 subsys
[root@nailgun ~]# dockerctl backup
Pausing containers...
0b494d830f48
37e255758233
55bba0ef34e4
4abbfc3adbd2
bda745c0163c
fb35cc77215b
6633948ad788
0427dfd56f52
3ad7a7af3123
36bfe22095a2
9e9a0f7dbc82
Archiving system folders
tar: Removing leading `/' from member names
Unpausing containers...
0b494d830f48
37e255758233
55bba0ef34e4
4abbfc3adbd2
bda745c0163c
fb35cc77215b
6633948ad788
0427dfd56f52
3ad7a7af3123
36bfe22095a2
9e9a0f7dbc82
Backing up PostgreSQL database to /var/backup/fuel/backup_2015-12-03_1126/postgres_backup.sql...
Compressing archives...
/var/backup/fuel/backup_2015-12-03_1126/fuel_backup_2015-12-03_1126.tar - Compression Ratio: 30.601. Average Compression Speed: 39.000MB/s.
Total time: 00:00:02.56
Cleaning up...
Backup complete. File is available at /var/backup/fuel/backup_2015-12-03_1126/fuel_backup_2015-12-03_1126.tar.lrz
[root@nailgun ~]#

Changed in fuel:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.