Project

General

Profile

Actions

Bug #32386

closed

foreman-maintain restore failing for stopping tomcat service on capsule

Added by Amit Upadhye almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

This issue is present for foreman-maintain restore on a Capsule system. It seems the restore wants to stop the tomcat service, which is not present on the capsule (see https://bugzilla.redhat.com/show_bug.cgi?id=1859705#c3).

Version-Release number of selected component (if applicable):
Capsule 6.9.0 Snap 19.1 and Capsule 6.9.1 Snap 2
version: rubygem-foreman_maintain-0.7.8-1.el7sat.noarch

How reproducible:
100%

Steps to Reproduce:
1. # foreman-maintain backup online /tmp
<snip>
Done with backup: 2021-04-20 10:15:58 -0400 BACKUP Complete, contents can be found in: /tmp/capsule-backup-2021-04-20-10-15-50
</snip>

2. # foreman-maintain restore /tmp/capsule-backup-2021-04-20-10-15-50/
Running preparation steps required to run the next scenarios ================================================================================
Make sure Mongo DB is up: | Checking connection to the Mongo DB [OK]
--------------------------------------------------------------------------------
Checks whether the tools for Mongo DB are installed: [OK]
--------------------------------------------------------------------------------

Running Restore backup ================================================================================
Check if command is run as root user: [OK]
--------------------------------------------------------------------------------
Validate backup has appropriate files: [OK]
--------------------------------------------------------------------------------
Confirm dropping databases and running 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.
Do you want to proceed?, [y(yes), q(quit)] y
[OK]
--------------------------------------------------------------------------------
Validate hostname is the same as backup: [OK]
--------------------------------------------------------------------------------
Setting file security: | Restoring SELinux context [OK]
--------------------------------------------------------------------------------
Restore configs from backup:
\ Restoring configs [OK]
--------------------------------------------------------------------------------
Ensure restored MongoDB storage engine matches the current DB: [OK]
--------------------------------------------------------------------------------
Run installer reset:
/ Installer reset [OK]
--------------------------------------------------------------------------------
Stop applicable services:

Stopping the following service(s):
rh-mongodb34-mongod, qdrouterd, qpidd, squid, pulp_celerybeat, pulp_resource_manager, pulp_streamer, pulp_workers, smart_proxy_dynflow_core, httpd, puppetserver, foreman-proxy
- All services stopped [OK]
--------------------------------------------------------------------------------
Extract any existing tar files in backup:
\ Extracting pulp data [OK]
--------------------------------------------------------------------------------
Restore mongo dump:
/ All services stopped [OK]
--------------------------------------------------------------------------------
Migrate pulp db:
\ Migrating pulp database [OK]
--------------------------------------------------------------------------------
Regenerate required activemq and qpidd queues while restoring online backup:
/ Stopping tomcat service [FAIL]
undefined method `services' for nil:NilClass
--------------------------------------------------------------------------------
Scenario [Restore backup] failed.

The following steps ended up in failing state:

[restore-regenerate-queues]

Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="restore-regenerate-queues"

Running Resuce Restore backup ================================================================================

Actual results:
Regenerate required activemq and qpidd queues while restoring online backup:
/ Stopping tomcat service [FAIL]
undefined method `services' for nil:NilClass

Expected results:
Restore should pass, and it shouldn't try to stop tomcat.service on capsule which is not present on Capsule.

Additional info:
Tested this on Capsule 6.8.6 Snap 1.1 and this issue exists there as well.

Actions #1

Updated by Amit Upadhye almost 3 years ago

  • Bugzilla link set to 32386
Actions #2

Updated by The Foreman Bot almost 3 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_maintain/pull/468 added
Actions #3

Updated by Amit Upadhye almost 3 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF