Second build attempt always fail for git source

Bug #1706369 reported by jiriprox
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
Fix Released
Undecided
jiriprox

Bug Description

When the first build attempt fail for any reason (e.g. short network outage, proxy outage,...)
then the second attempt always fail for git source type.
Git can't clone repository because destination directory exists and is not empty.

We need to cleanup directory before cloning.

Part of build log:
INFO:kolla.image.build:Attempting to run task BuildTask(neutron-base) for the 2 time
DEBUG:kolla.image.build.neutron-base:Processing
INFO:kolla.image.build.neutron-base:Building
DEBUG:kolla.image.build.neutron-base:Cloning from http://git.openstack.org/openstack/neutron
Traceback (most recent call last):
  File "/usr/lib64/python2.7/logging/__init__.py", line 851, in emit
    msg = self.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 724, in format
    return fmt.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 464, in format
    record.message = record.getMessage()
  File "/usr/lib64/python2.7/logging/__init__.py", line 328, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Logged from file build.py, line 317
ERROR:kolla.image.build.neutron-base:Error: 'git clone http://git.openstack.org/openstack/neutron /tmp/kolla-2017-07-24_15-32-16_KmoFSl/docker/neutron/neutron-base/neutron-base-archive-f2caa7c8231a233b83948aa50180ddfcef87f582' returned with exit code 128
stderr: 'fatal: destination path '/tmp/kolla-2017-07-24_15-32-16_KmoFSl/docker/neutron/neutron-base/neutron-base-archive-f2caa7c8231a233b83948aa50180ddfcef87f582' already exists and is not an empty directory.'

Revision history for this message
jiriprox (jirix-x-prokes) wrote :

Bug correction is in review: https://review.openstack.org/487611

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla (master)

Reviewed: https://review.openstack.org/487611
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=f309c7f763e724767f9832b1b52c81e303e7e6a8
Submitter: Jenkins
Branch: master

commit f309c7f763e724767f9832b1b52c81e303e7e6a8
Author: Jiri Prokes <email address hidden>
Date: Wed Jul 26 14:50:49 2017 -0700

    Fix for git clone issue during kolla image build

    When the first build attempt fail for any reason (e.g. short network
    outage, proxy outage,...) then the second attempt always fail for
    git source type. Git can't clone repository because destination
    directory exists and is not empty.

    Current fix checks destination directory and if it exists then
    it is removed before cloning.

    Change-Id: I949140c49a64baea579d61047e3b2f1240da2771
    Closes-Bug: #1706369

Changed in kolla:
status: New → Fix Released
Changed in kolla:
assignee: nobody → jiriprox (jirix-x-prokes)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla 5.0.0.0rc1

This issue was fixed in the openstack/kolla 5.0.0.0rc1 release candidate.

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.