Project

General

Profile

Bug #17908

katello-restore fails

Added by Cameron Berkley over 4 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Difficulty:
medium
Triaged:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

katello-restore fails on restoring backend data. I am using Katello 3.2 (Foreman 1.13.3) and CentOS Linux release 7.3.1611 (Core).

Steps to reproduce:
1.) Install katello
2.) Set admin password
3.) katello-backup
4.) katello-restore

katello-restore gives me the following output:
@[root@katello1 katello-backup-2017-01-03T09:39:40-05:00]# katello-restore .
WARNING: This script will drop and restore your database.
Your existing installation will be replaced with the backup database.
Once this operation is complete there is no going back.
Are you sure(Y/N)? Y
.
.
Setting file security
Done.
Resetting Katello
Redirecting to /bin/systemctl stop httpd.service
Debug: Loading facts from /usr/share/foreman-insta: 0 00:00:00
} : 0 0.0/s 00:00:01
Debug: hiera(): Found foreman::ssl in kafo_answers: 0 0.0/s 00:00:02
Debug: Performing a hiera indirector lookup of pos: 0 0.0/s 00:00:03
Debug: hiera(): Looking for data source kafo_answe: 0 0.0/s 00:00:04
Debug: Scope(Apache::Mod[alias]): Retrieving templ: 0 0.0/s 00:00:05
Debug: Puppet::Type::Foreman_smartproxy::ProviderR: 0 0.0/s 00:00:06
Debug: Prefetching yum resources for package : 0/719, 0%, 0.0/s, elapsed: 00:00:07
Debug: Puppet::Type::Package::ProviderYum: /usr/bi: 189/719, 26%, 12.5/s, elapsed: 00:00:09, ETA: 00:00:42
Debug: /Stage[main]/Foreman::Database::Postgresql/: 541/719, 75%, 70.2/s, elapsed: 00:00:10, ETA: 00:00:02
Debug: /Stage[main]/Foreman::Database::Postgresql/: 575/719, 79%, 75.8/s, elapsed: 00:00:11, ETA: 00:00:01
Notice: /Stage[main]/Candlepin::Database::Postgres: 578/719, 80%, 75.9/s, elapsed: 00:00:19, ETA: 00:00:01
Debug: Executing with uid=foreman gid=foreman: '/u: 608/719, 84%, 76.5/s, elapsed: 00:00:26, ETA: 00:00:01
Notice: /Stage[main]/Foreman::Database/Foreman_con: 608/719, 84%, 76.5/s, elapsed: 00:00:33, ETA: 00:00:01
Notice: /Stage[main]/Foreman::Database/Foreman::Ra: 611/719, 84%, 64.1/s, elapsed: 00:00:47, ETA: 00:00:01
Notice: /Stage[main]/Foreman::Database/Foreman_con: 611/719, 84%, 6.3/s, elapsed: 00:00:55, ETA: 00:00:17
Debug: Executing: '/usr/bin/systemctl is-enabled t: 649/719, 90%, 6.3/s, elapsed: 00:00:56, ETA: 00:00:11
Notice: /Stage[main]/Pulp::Database/Exec[migrate_p: 654/719, 90%, 3.1/s, elapsed: 00:00:58, ETA: 00:00:20
Debug: Evicting cache entry for environment 'produ: 679/719, 94%, 3.1/s, elapsed: 00:00:59, ETA: 00:00:12
Notice: /Stage[main]/Katello::Qpid/Exec[bind katel: 684/719, 95%, 5.3/s, elapsed: 00:01:00, ETA: 00:00:06
Notice: /Stage[main]/Foreman::Database/Foreman::Ra: 692/719, 96%, 4.8/s, elapsed: 00:01:16, ETA: 00:00:05
Info: RESOURCE Foreman_config_entry[pulp_client_ce: 694/719, 96%, 4.8/s, elapsed: 00:01:24, ETA: 00:00:05
Info: RESOURCE Foreman_config_entry[pulp_client_ke: 695/719, 96%, 4.8/s, elapsed: 00:01:32, ETA: 00:00:05
Notice: /Stage[main]/Foreman::Database/Foreman::Ra: 696/719, 96%, 4.8/s, elapsed: 00:02:45, ETA: 00:00:04
Debug: Foreman_smartproxy[katello1.[redacted].edu](pro: 706/719, 98%, 2.6/s, elapsed: 00:03:02, ETA: 00:00:05
Debug: Executing: '/usr/bin/systemctl is-enabled f: 707/719, 98%, 0.3/s, elapsed: 00:03:05, ETA: 00:00:39
Done : 719/719, 100%, 0.3/s, elapsed: 00:03:06
Done : 719/719, 100%, 0.3/s, elapsed: 00:03:06
Done.
Stopping Katello services
Redirecting to /bin/systemctl stop foreman-tasks.service
Redirecting to /bin/systemctl stop httpd.service
Redirecting to /bin/systemctl stop pulp_workers.service
Redirecting to /bin/systemctl stop foreman-proxy.service
Redirecting to /bin/systemctl stop pulp_streamer.service
Redirecting to /bin/systemctl stop pulp_resource_manager.service
Redirecting to /bin/systemctl stop pulp_celerybeat.service
Redirecting to /bin/systemctl stop tomcat.service
Redirecting to /bin/systemctl stop squid.service
Redirecting to /bin/systemctl stop qdrouterd.service
Redirecting to /bin/systemctl stop qpidd.service
Redirecting to /bin/systemctl stop postgresql.service
Redirecting to /bin/systemctl stop mongod.service
Done.
Restoring backend data

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
Done.
Restarting all Katello processes
Redirecting to /bin/systemctl start mongod.service
Redirecting to /bin/systemctl start postgresql.service
Redirecting to /bin/systemctl start qpidd.service
Redirecting to /bin/systemctl start qdrouterd.service
Redirecting to /bin/systemctl start squid.service
Redirecting to /bin/systemctl start tomcat.service
Redirecting to /bin/systemctl start pulp_celerybeat.service
Redirecting to /bin/systemctl start pulp_resource_manager.service
Redirecting to /bin/systemctl start pulp_streamer.service
Redirecting to /bin/systemctl start foreman-proxy.service
Redirecting to /bin/systemctl start pulp_workers.service
Redirecting to /bin/systemctl start httpd.service
Redirecting to /bin/systemctl start foreman-tasks.service
Done.

@

However after this the admin password has been reset, indicating the restore was not successful.

Associated revisions

Revision bde2b486 (diff)
Added by Christine Fouant over 4 years ago

fixes #17908 - fixes error creating gzip files before they are compressed

History

#1 Updated by Dominic Cleal over 4 years ago

  • Project changed from Foreman to Katello

#2 Updated by Justin Sherrill over 4 years ago

  • Category set to Backup & Restore
  • Legacy Backlogs Release (now unused) set to 188
  • Difficulty set to medium

#3 Updated by Justin Sherrill over 4 years ago

  • Status changed from New to Need more information

Can you provide a list of the backup files?

Also the output of "file *" may help when determining the types of the file

#4 Updated by Justin Sherrill over 4 years ago

  • Assignee set to Christine Fouant

#5 Updated by Cameron Berkley over 4 years ago

Justin Sherrill wrote:

Can you provide a list of the backup files?

Also the output of "file *" may help when determining the types of the file

Sure.

[root@katello1 katello-backup-2017-01-03T09:39:40-05:00]# ls al
total 267496
drwxrwx--
2 root postgres 4096 Jan 3 09:40 .
drwxr-xr-x 3 root root 4096 Jan 3 09:39 ..
rw-r--r- 1 root root 578830 Jan 3 09:39 config_files.tar.gz
rw-r--r- 1 root root 13131 Jan 3 09:39 .config.snar
rw-r--r- 1 root root 167782400 Jan 3 09:40 mongo_data.tar.gz
rw-r--r- 1 root root 230 Jan 3 09:40 .mongo.snar
rw-r--r- 1 root root 105441280 Jan 3 09:40 pgsql_data.tar.gz
rw-r--r- 1 root root 20718 Jan 3 09:40 .postgres.snar
rw-r--r- 1 root root 40960 Jan 3 09:40 pulp_data.tar
rw-r--r- 1 root root 1315 Jan 3 09:40 .pulp.snar

[root@katello1 katello-backup-2017-01-03T09:39:40-05:00]# file *
config_files.tar.gz: gzip compressed data, from Unix, last modified: Tue Jan 3 09:39:40 2017
mongo_data.tar.gz: POSIX tar archive
pgsql_data.tar.gz: POSIX tar archive
pulp_data.tar: POSIX tar archive

#6 Updated by Christine Fouant over 4 years ago

  • Project changed from Katello to Packaging
  • Category deleted (Backup & Restore)

#7 Updated by Christine Fouant over 4 years ago

  • Project changed from Packaging to Packaging

#8 Updated by The Foreman Bot over 4 years ago

  • Status changed from Need more information to Ready For Testing
  • Pull request https://github.com/Katello/katello-packaging/pull/353 added

#9 Updated by Christine Fouant over 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#10 Updated by The Foreman Bot over 4 years ago

  • Pull request https://github.com/Katello/katello-packaging/pull/355 added

#11 Updated by Christine Fouant about 4 years ago

  • Bugzilla link set to 1433888

#12 Updated by Eric Helms about 4 years ago

  • Project changed from Packaging to Katello
  • Pull request deleted (https://github.com/Katello/katello-packaging/pull/355, https://github.com/Katello/katello-packaging/pull/353)

Also available in: Atom PDF