[IBP][fuel-agent] avoid user confirmation for lvcreate

Bug #1462009 reported by Alexander Gordeev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Alexander Gordeev

Bug Description

Redeploying on the same env with the same setting could lead to provisioning failure from time to time.

Сurrent version of lvm for our centos6.5 has set "allocation/wipe_signatures_when_zeroing_new_lvs" option enabled by default in /etc/lvm/lvm.conf.

The issues is that lvm2 doesn't clean signatures it can find on newly created LVs if it was enabled. Instead of that, it asks user what to do:

"WARNING: <signature name> signature detected on <device name>. Wipe it? [y/n]"

And fuel-agent got stuck right at that moment.
> 2015-06-03 17:08:14.734 9132 DEBUG fuel_agent.utils.utils [-] Trying to execute command: lvcreate -L 32768m -n swap os

Strace showed that is was waiting for user's input. Adding '--yes' totally resolves the issue.

Related bug https://bugzilla.redhat.com/show_bug.cgi?id=997223

Pmanager.py which is used for classic provisioning should be patched too if it uses the same version of lvm tools.

Revision history for this message
Alexander Gordeev (a-gordeev) wrote :
Changed in fuel:
assignee: nobody → Aleksandr Gordeev (a-gordeev)
status: Confirmed → In Progress
Revision history for this message
Alexander Gordeev (a-gordeev) wrote :

Also it looks like there's at least one another tricky bug presented in lvm tools https://bugs.launchpad.net/cinder/+bug/1366125 I think i've faced it today, even if fuel-agent is single thread application. But it's too hard to reproduce it.

and it sounds that prior every lv* call 'dmsetup udevcomplete_all -y' should be called in order to kill stale semaphores.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/188356
Committed: https://git.openstack.org/cgit/stackforge/fuel-web/commit/?id=027d35e2ddb79c6d49880ca89d5757f459351429
Submitter: Jenkins
Branch: master

commit 027d35e2ddb79c6d49880ca89d5757f459351429
Author: Alexander Gordeev <email address hidden>
Date: Thu Jun 4 14:44:28 2015 +0300

    IBP: force signature wiping by lvcreate by '--yes'

    By default lvcreate tries to wipe signatures on allocated volume.
    If it finds signature, then it will ask for user confirmation to
    wipe.
    In order to prevent appearing of this interactive prompt '--yes'
    should be passed to lvcreate call.

    Change-Id: I62bd09d5907e38a457b840acc08a28b487002107
    Related-Bug: #1462009

Changed in fuel:
status: In Progress → Fix Committed
tags: added: on-verification
Revision history for this message
Alexander Arzhanov (aarzhanov) wrote :

Verified on #521 iso
api: '1.0'
astute_sha: 7766818f079881e2dbeedb34e1f67e517ed7d479
auth_required: true
build_id: 2015-06-08_06-13-27
build_number: '521'
feature_groups:
- mirantis
fuel-library_sha: f43c2ae1af3b493ee0e7810eab7bb7b50c986c7d
fuel-ostf_sha: 7c938648a246e0311d05e2372ff43ef1eb2e2761
fuelmain_sha: bcc909ffc5dd5156ba54cae348b6a07c1b607b24
nailgun_sha: 4340d55c19029394cd5610b0e0f56d6cb8cb661b
openstack_version: 2014.2.2-6.1
production: docker
python-fuelclient_sha: 4fc55db0265bbf39c369df398b9dc7d6469ba13b
release: '6.1'
release_versions:
  2014.2.2-6.1:
    VERSION:
      api: '1.0'
      astute_sha: 7766818f079881e2dbeedb34e1f67e517ed7d479
      build_id: 2015-06-08_06-13-27
      build_number: '521'
      feature_groups:
      - mirantis
      fuel-library_sha: f43c2ae1af3b493ee0e7810eab7bb7b50c986c7d
      fuel-ostf_sha: 7c938648a246e0311d05e2372ff43ef1eb2e2761
      fuelmain_sha: bcc909ffc5dd5156ba54cae348b6a07c1b607b24
      nailgun_sha: 4340d55c19029394cd5610b0e0f56d6cb8cb661b
      openstack_version: 2014.2.2-6.1
      production: docker
      python-fuelclient_sha: 4fc55db0265bbf39c369df398b9dc7d6469ba13b
      release: '6.1'

Changed in fuel:
status: Fix Committed → Fix Released
tags: removed: on-verification
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.