Database dump filename incorrect in shotgun

Bug #1526081 reported by Oleg S. Gelbukh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Oleg S. Gelbukh

Bug Description

Steps to reproduce:

1. Install Fuel Admin node
2. Run diagnostic snapshot
3. Inspect var/log/docker-logs/shotgun.log in the snapshot

Expected result:

Temp file (/tmp/tmp.XXXXXX) is used for the DB backup.

Actual result:

Temp file name contains fragments of Fabric's debug output and a new line character.

2015-12-11 19:58:50 DEBUG 591 (driver) Running remote command: host: localhost command: pg_dump -h 10.109.5.2 -U nailgun -w -f [localhost] out: /tmp/tmp.Gj9AA6Qgej
[localhost] out: nailgun
2015-12-11 19:58:50 DEBUG 591 (utils) Trying to execute command: mkdir -p "/var/www/nailgun/dump/fuel-snapshot-2015-12-11_19-58-50/localhost/pg_dump"
2015-12-11 19:58:50 DEBUG 591 (utils) Trying to execute command: mv -f "[localhost] out: /tmp/tmp.Gj9AA6Qgej
[localhost] out:" "/var/www/nailgun/dump/fuel-snapshot-2015-12-11_19-58-50/localhost/pg_dump/10.109.5.2_nailgun.sql"

No database dump file is present in the diagnostic snapshot.

Build data:
VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "8.0"
  openstack_version: "2015.1.0-8.0"
  api: "1.0"
  build_number: "260"
  build_id: "260"
  fuel-nailgun_sha: "0e09dce510927f2cc490b898e5fe3f813bd791be"
  python-fuelclient_sha: "f033192b84263f0e699458a4274289a5198ae7e4"
  fuel-agent_sha: "660c6514caa8f5fcd482f1cc4008a6028243e009"
  fuel-nailgun-agent_sha: "a33a58d378c117c0f509b0e7badc6f0910364154"
  astute_sha: "48fd58676debcc85951db68df6d77c22daa55e52"
  fuel-library_sha: "ab7e51f345ffb7c256e0f61addcf86553d7c3867"
  fuel-ostf_sha: "23b7ae2a1a57de5a3e1861ffb7805394ca339cc2"
  fuel-mirror_sha: "6534117233a5bdc51d7d47361bc7d511e4b11e6f"
  fuelmenu_sha: "fcb15df4fd1a790b17dd78cf675c11c279040941"
  shotgun_sha: "a0bd06508067935f2ae9be2523ed0d1717b995ce"
  network-checker_sha: "a3534f8885246afb15609c54f91d3b23d599a5b1"
  fuel-upgrade_sha: "1e894e26d4e1423a9b0d66abd6a79505f4175ff6"
  fuelmain_sha: "26adf12c320936a97a9b0a84169a6e58c530e848"

Changed in fuel:
milestone: none → 8.0
assignee: nobody → Fuel Python Team (fuel-python)
importance: Undecided → High
status: New → Confirmed
Dmitry Pyzhov (dpyzhov)
tags: added: area-python team-bugfix
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to shotgun (master)

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

Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Oleg S. Gelbukh (gelbuhos)
status: Confirmed → In Progress
Revision history for this message
Oleg S. Gelbukh (gelbuhos) wrote :

This bug affects only remotely executed postgres db dumps. Remote or local execution of the dump object depends on its configuration. I'm investigating why in some cases in our CI dump is run remotely.

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

Reviewed: https://review.openstack.org/257934
Committed: https://git.openstack.org/cgit/openstack/shotgun/commit/?id=d5dc87599c0a403ae032f48ef3cf8751e9f06836
Submitter: Jenkins
Branch: master

commit d5dc87599c0a403ae032f48ef3cf8751e9f06836
Author: Oleg Gelbukh <email address hidden>
Date: Tue Dec 15 14:29:03 2015 +0000

    Output from fabric.api.run for remote command

    The fabric.api.run command returns the string with combined stderr and
    stdout. Raw output of the fabric process contains additional line
    prefixes to indicate executed command and stdout/stderr stream. Using
    raw output to fetch file name of temp file created by 'mktemp' command
    is incorrect and causes DB dump to fail.

    Add CommandOut.output property and use it to store the output string
    produced by fabric.api.run. Use this property to set the name of
    temp file in Postgres driver.

    Change-Id: I9678a408f5532db1acb8fc36dd4eef4a95b61bfe
    Closes-bug: 1526081

Changed in fuel:
status: In Progress → 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.