Octane stable/8.0 restore fails: ERROR: invalid input syntax for type inet

Bug #1595268 reported by sryabin
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Won't Fix
High
Unassigned
8.0.x
Fix Committed
High
Oleg S. Gelbukh
Newton
Won't Fix
Undecided
Unassigned

Bug Description

Detailed bug description
2016-06-22 16:48:11,448] INFO octane.util.subprocess Started process sudo[20740]: dockerctl shell postgres sudo -u postgres psql nailgun --tuples-only --no-align -c 'UPDATE network_groups SET gateway = '"'"'10.108.0.2'"'"' WHERE id = '"'"'1'"'"' AND gateway = '"'"''"'"''
[2016-06-22 16:48:11,682] ERROR octane.util.subprocess sudo[20740] stderr: ERROR: invalid input syntax for type inet: ""
[2016-06-22 16:48:11,683] ERROR octane.util.subprocess sudo[20740] stderr: LINE 1: ...s SET gateway = '10.108.0.2' WHERE id = '1' AND gateway = ''
[2016-06-22 16:48:11,683] ERROR octane.util.subprocess sudo[20740] stderr:

[2016-06-22 16:48:12,416] ERROR octane Command 'sudo' returned non-zero exit status 1
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 374, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/command.py", line 54, in run
    self.take_action(parsed_args)
  File "/usr/lib/python2.7/site-packages/octane/commands/restore.py", line 56, in take_action
    self.get_context(parsed_args))
  File "/usr/lib/python2.7/site-packages/octane/commands/restore.py", line 31, in restore_data
    archivator.restore()
  File "/usr/lib/python2.7/site-packages/octane/handlers/backup_restore/postgres.py", line 107, in restore
    self._fix_admin_network()
  File "/usr/lib/python2.7/site-packages/octane/handlers/backup_restore/postgres.py", line 181, in _fix_admin_network
    self.set_admin_gateway_query.format(gateway, net_id), self.db)
  File "/usr/lib/python2.7/site-packages/octane/util/sql.py", line 31, in run_psql_in_container
    stdout=subprocess.PIPE)
  File "/usr/lib/python2.7/site-packages/octane/util/docker.py", line 41, in run_in_container
    **popen_kwargs)
  File "/usr/lib/python2.7/site-packages/octane/util/subprocess.py", line 200, in call
    return proc.communicate()
  File "/usr/lib64/python2.7/contextlib.py", line 24, in __exit__
    self.gen.next()
  File "/usr/lib/python2.7/site-packages/octane/util/subprocess.py", line 195, in popen
    raise CalledProcessError(rv, name)
CalledProcessError: Command 'sudo' returned non-zero exit status 1

Steps to reproduce:
   Steps to reproduce:
 1. Install fuel 6.0
 2. Create cluster Ceph/Neutron vlan
 3. Upgrade master node up to 6.1
 4. Upgrade master node up to 7.0
 5. Create backup for master node 7.0
 6. Install fuel 8.0
 7. Restore backup
Expected results:
 octane return exit code 0
Expected results:
 octane return exit code 1
Reproducibility:
 100%
Workaround:
 No
Impact:
 Upgrade master node from 7.0->8.0
Description of the environment:
VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "8.0"
  api: "1.0"
  build_number: "570"
  build_id: "570"
  fuel-nailgun_sha: "558ca91a854cf29e395940c232911ffb851899c1"
  python-fuelclient_sha: "4f234669cfe88a9406f4e438b1e1f74f1ef484a5"
  fuel-agent_sha: "658be72c4b42d3e1436b86ac4567ab914bfb451b"
  fuel-nailgun-agent_sha: "b2bb466fd5bd92da614cdbd819d6999c510ebfb1"
  astute_sha: "b81577a5b7857c4be8748492bae1dec2fa89b446"
  fuel-library_sha: "c2a335b5b725f1b994f78d4c78723d29fa44685a"
  fuel-ostf_sha: "3bc76a63a9e7d195ff34eadc29552f4235fa6c52"
  fuel-mirror_sha: "fb45b80d7bee5899d931f926e5c9512e2b442749"
  fuelmenu_sha: "78ffc73065a9674b707c081d128cb7eea611474f"
  shotgun_sha: "63645dea384a37dde5c01d4f8905566978e5d906"
  network-checker_sha: "a43cf96cd9532f10794dce736350bf5bed350e9d"
  fuel-upgrade_sha: "616a7490ec7199f69759e97e42f9b97dfc87e85b"
  fuelmain_sha: "d605bcbabf315382d56d0ce8143458be67c53434"

Changed in fuel:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-octane (stable/8.0)

Fix proposed to branch: stable/8.0
Review: https://review.openstack.org/332986

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-octane (stable/8.0)

Reviewed: https://review.openstack.org/332986
Committed: https://git.openstack.org/cgit/openstack/fuel-octane/commit/?id=10b2ee3388a0e20b1e28babee2c450239b3b3ebd
Submitter: Jenkins
Branch: stable/8.0

commit 10b2ee3388a0e20b1e28babee2c450239b3b3ebd
Author: Oleg Gelbukh <email address hidden>
Date: Wed Jun 22 18:09:32 2016 +0000

    Set gateway for admin network if is NULL

    Database field 'gateway' in table 'network_groups' has type
    INET. It cannot be an empty sting, thus correct default value
    for it set to NULL.

    Change-Id: I4cc5ac742a8ddb750cd82a1d15996605cb569bfa
    Closes-bug: 1595268

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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