Repository synch failling with "mkdir failed: No such file or directory"

Bug #1707630 reported by Andreas Scheuring
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Undecided
Markus Zoeller (markus_z)

Bug Description

The sync repo task fails with

rsync: mkdir \"/var/www/repo/venvs/15.1.2\" failed: No such file or directory

This bug has been introduced with patch [1]. It intended to fix the locations to which the distribution+arch repo masters synced its packages. This works fine as long as the first host in the repo_masters group is equal to repo_all[0]. In this case, the venv directory gets created on repo_all[0] and follow up repo containers can synchronize to it.

But if this is not the case (e.g. repo_all[0] is on x86 and an s390x repo hosts exists as well, the first container in the repo_masters group wil be the s390x node (due to alphabetical order I guess). In this case we fail.

The solution is to either
#1 pre-create the directories before executing the rsync or
#2 to let rsync create the directory structure - this can be achieved with the --relative option

If we pick #2 - it might make sense to undo the fix [1] and commit an repoen [2] again

[1] https://github.com/openstack/openstack-ansible-repo_build/commit/e4c5ab4c6ebf33267d4a4cdf7ecff35465899167
[2] https://bugs.launchpad.net/openstack-ansible/+bug/1704936

description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-repo_build (master)

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

Changed in openstack-ansible:
assignee: nobody → Andreas Scheuring (andreas-scheuring)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on openstack-ansible-repo_build (master)

Change abandoned by Andreas Scheuring (<email address hidden>) on branch: master
Review: https://review.openstack.org/489187
Reason: ok, makes sense

Changed in openstack-ansible:
assignee: Andreas Scheuring (andreas-scheuring) → Markus Zoeller (markus_z) (mzoeller)
tags: added: ocata-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-repo_build (master)

Reviewed: https://review.openstack.org/489188
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-repo_build/commit/?id=18b165c5dcebd7b1691fc00d76d097d002111fe4
Submitter: Jenkins
Branch: master

commit 18b165c5dcebd7b1691fc00d76d097d002111fe4
Author: Andreas Scheuring <email address hidden>
Date: Mon Jul 31 13:35:35 2017 +0200

    Sync repos to correct location on repo master

    The repo container sync task synchronises the following directories to a
    wrong location.

    pools
    -----
    Wrongly created dir on target: /var/www/repo/{{ repo_build_os_distro_version }}
    Fixed dir on target: /var/www/repo/pools/{{ repo_build_os_distro_version }}

    As the links and other directories are synced successfuly, they point
    to invalid locations which will cause the repo build on the existing
    repo master to fail.

    venvs
    -----
    Wrongly created dir on target: /var/www/repo/{{ repo_build_os_distro_version }}
    Fixed dir on target: /var/www/repo/venvs/{{ repo_build_release_tag }}/{{ repo_build_os_distro_version }}

    os-releases
    -----------
    Wrongly created dir on target: /var/www/repo/{{ repo_build_os_distro_version }}
    Fixed dir on target: /var/www/repo/os-releases/{{ repo_build_release_tag }}/{{ repo_build_os_distro_version }}

    The patch achieves this by creating the directory befor rsync starts.
    Using rsyncs relative option and synchronizing to the remotes root
    / dir does not work due to permissions on /var/.

    See this blog post:
    http://www.schwertly.com/2013/07/forcing-rsync-to-create-a-remote-path-using-rsync-path/
    or the man pages of "rsync":
    https://linux.die.net/man/1/rsync

    [1] https://bugs.launchpad.net/openstack-ansible/+bug/1707630

    Change-Id: I947ffc815e1574fe533d2a9ca6df6b2a991cff24
    Closes-Bug: #1707630

Changed in openstack-ansible:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-repo_build (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/492927

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-repo_build (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/492928

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-repo_build (stable/newton)

Reviewed: https://review.openstack.org/492928
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-repo_build/commit/?id=aba8910567a5cdb364bbe2612a9f6f2382414274
Submitter: Jenkins
Branch: stable/newton

commit aba8910567a5cdb364bbe2612a9f6f2382414274
Author: Andreas Scheuring <email address hidden>
Date: Mon Jul 31 13:35:35 2017 +0200

    Sync repos to correct location on repo master

    The repo container sync task synchronises the following directories to a
    wrong location.

    pools
    -----
    Wrongly created dir on target: /var/www/repo/{{ repo_build_os_distro_version }}
    Fixed dir on target: /var/www/repo/pools/{{ repo_build_os_distro_version }}

    As the links and other directories are synced successfuly, they point
    to invalid locations which will cause the repo build on the existing
    repo master to fail.

    venvs
    -----
    Wrongly created dir on target: /var/www/repo/{{ repo_build_os_distro_version }}
    Fixed dir on target: /var/www/repo/venvs/{{ repo_build_release_tag }}/{{ repo_build_os_distro_version }}

    os-releases
    -----------
    Wrongly created dir on target: /var/www/repo/{{ repo_build_os_distro_version }}
    Fixed dir on target: /var/www/repo/os-releases/{{ repo_build_release_tag }}/{{ repo_build_os_distro_version }}

    The patch achieves this by creating the directory befor rsync starts.
    Using rsyncs relative option and synchronizing to the remotes root
    / dir does not work due to permissions on /var/.

    See this blog post:
    http://www.schwertly.com/2013/07/forcing-rsync-to-create-a-remote-path-using-rsync-path/
    or the man pages of "rsync":
    https://linux.die.net/man/1/rsync

    [1] https://bugs.launchpad.net/openstack-ansible/+bug/1707630

    Change-Id: I947ffc815e1574fe533d2a9ca6df6b2a991cff24
    Closes-Bug: #1707630
    (cherry picked from commit 18b165c5dcebd7b1691fc00d76d097d002111fe4)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-repo_build (stable/ocata)

Reviewed: https://review.openstack.org/492927
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-repo_build/commit/?id=ac4a33048e6a8b16249d266e266c9f8c1a3c36a9
Submitter: Jenkins
Branch: stable/ocata

commit ac4a33048e6a8b16249d266e266c9f8c1a3c36a9
Author: Andreas Scheuring <email address hidden>
Date: Mon Jul 31 13:35:35 2017 +0200

    Sync repos to correct location on repo master

    The repo container sync task synchronises the following directories to a
    wrong location.

    pools
    -----
    Wrongly created dir on target: /var/www/repo/{{ repo_build_os_distro_version }}
    Fixed dir on target: /var/www/repo/pools/{{ repo_build_os_distro_version }}

    As the links and other directories are synced successfuly, they point
    to invalid locations which will cause the repo build on the existing
    repo master to fail.

    venvs
    -----
    Wrongly created dir on target: /var/www/repo/{{ repo_build_os_distro_version }}
    Fixed dir on target: /var/www/repo/venvs/{{ repo_build_release_tag }}/{{ repo_build_os_distro_version }}

    os-releases
    -----------
    Wrongly created dir on target: /var/www/repo/{{ repo_build_os_distro_version }}
    Fixed dir on target: /var/www/repo/os-releases/{{ repo_build_release_tag }}/{{ repo_build_os_distro_version }}

    The patch achieves this by creating the directory befor rsync starts.
    Using rsyncs relative option and synchronizing to the remotes root
    / dir does not work due to permissions on /var/.

    See this blog post:
    http://www.schwertly.com/2013/07/forcing-rsync-to-create-a-remote-path-using-rsync-path/
    or the man pages of "rsync":
    https://linux.die.net/man/1/rsync

    [1] https://bugs.launchpad.net/openstack-ansible/+bug/1707630

    Change-Id: I947ffc815e1574fe533d2a9ca6df6b2a991cff24
    Closes-Bug: #1707630
    (cherry picked from commit 18b165c5dcebd7b1691fc00d76d097d002111fe4)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/492950

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/492952

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible (stable/newton)

Reviewed: https://review.openstack.org/492952
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=68ceb71104a6bd221b869b5d66489da9a6c33f57
Submitter: Jenkins
Branch: stable/newton

commit 68ceb71104a6bd221b869b5d66489da9a6c33f57
Author: Jesse Pretorius <email address hidden>
Date: Fri Aug 11 12:14:32 2017 +0100

    Update repo_build SHA to include NB bug fixes

    Includes the following fixes:
    https://review.openstack.org/492928
    https://review.openstack.org/491552

    Closes-Bug: #1707630
    Change-Id: Ia10961b21185df9cee28f9bf15874172413ff25a

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible (stable/ocata)

Reviewed: https://review.openstack.org/492950
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=c55c1cdb563f2b6c28adc07b362d980052f1871b
Submitter: Jenkins
Branch: stable/ocata

commit c55c1cdb563f2b6c28adc07b362d980052f1871b
Author: Jesse Pretorius <email address hidden>
Date: Fri Aug 11 12:11:22 2017 +0100

    Update repo_build SHA to include NB bug fixes

    Includes the following fixes:
    https://review.openstack.org/492927
    https://review.openstack.org/491556

    Closes-Bug: #1707630
    Change-Id: Ia10961b21185df9cee28f9bf15874172413ff25a

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-repo_build 16.0.0.0rc1

This issue was fixed in the openstack/openstack-ansible-repo_build 16.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible 15.1.8

This issue was fixed in the openstack/openstack-ansible 15.1.8 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-repo_build 15.1.8

This issue was fixed in the openstack/openstack-ansible-repo_build 15.1.8 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible 14.2.8

This issue was fixed in the openstack/openstack-ansible 14.2.8 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-repo_build 14.2.8

This issue was fixed in the openstack/openstack-ansible-repo_build 14.2.8 release.

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.