Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

If backup fails due to some issue, service doesn't get restarted in FM v0.4.3 #88

Open
jameerpathan111 opened this issue Jul 1, 2019 · 2 comments

Comments

@jameerpathan111
Copy link
Contributor

No description provided.

@jameerpathan111
Copy link
Contributor Author

jameerpathan111 commented Jul 1, 2019

On foreman-maintain v0.4.3

[root@hpe-nehalem-01 ~]# foreman-maintain service stop --only foreman-proxy
Running Stop Services
================================================================================
Check if command is run as root user:                                 [OK]
--------------------------------------------------------------------------------
Stop applicable services: 
Stopping the following service(s):

foreman-proxy
- All services stopped                                                [OK]      
--------------------------------------------------------------------------------

[root@hpe-nehalem-01 ~]# mkdir /tmp/backup-openscap2
[root@qe-sat6-feature-rhel7 ~]# foreman-maintain backup offline -y --features openscap /tmp/backup-openscap/
Starting backup: 2019-07-01 02:52:46 -0400
Running preparation steps required to run the next scenarios
================================================================================
Make sure Foreman DB is up: 
/ Checking connection to the Foreman DB                               [OK]      
--------------------------------------------------------------------------------


Running Backup
================================================================================
Confirm turning off services is allowed: 
WARNING: This script will stop your services.

                                                                      [OK]      
--------------------------------------------------------------------------------
Prepare backup Directory: 
Creating backup folder /tmp/backup-openscap/satellite-backup-2019-07-01-02-52-46
                                                                      [OK]
--------------------------------------------------------------------------------
Check if the directory exists and is writable:                        [OK]
--------------------------------------------------------------------------------
Generate metadata: 
| Saving metadata to metadata.yml                                     [OK]      
--------------------------------------------------------------------------------
disable active sync plans: 
- Total 0 sync plans are now disabled.                                [OK]      
--------------------------------------------------------------------------------
Add maintenance_mode chain to iptables:                               [OK]
--------------------------------------------------------------------------------
Stop applicable services: 
Stopping the following service(s):

rh-mongodb34-mongod, postgresql, qdrouterd, qpidd, squid, pulp_celerybeat, pulp_resource_manager, pulp_streamer, pulp_workers, smart_proxy_dynflow_core, tomcat, dynflowd, httpd, puppetserver, foreman-proxy
| All services stopped                                                [OK]      
--------------------------------------------------------------------------------
Backup config files: 
/ Collecting config files to backup                                   [FAIL]    
undefined method `&' for "":String
--------------------------------------------------------------------------------
Scenario [Backup] failed.

The following steps ended up in failing state:

  [backup-config-files]

Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="backup-config-files"


The runner is already in quit state
[root@qe-sat6-feature-rhel7 ~]# foreman-maintain service status -b
Running Status Services
================================================================================
Get status of applicable services: 
Displaying the following service(s):

rh-mongodb34-mongod, postgresql, qdrouterd, qpidd, squid, pulp_celerybeat, pulp_resource_manager, pulp_streamer, pulp_workers, smart_proxy_dynflow_core, tomcat, dynflowd, httpd, puppetserver, foreman-proxy
/ displaying rh-mongodb34-mongod                   [FAIL]                       
/ displaying postgresql                            [FAIL]                       
/ displaying qdrouterd                             [FAIL]                       
/ displaying qpidd                                 [FAIL]                       
/ displaying squid                                 [FAIL]                       
/ displaying pulp_celerybeat                       [FAIL]                       
/ displaying pulp_resource_manager                 [FAIL]                       
- displaying pulp_streamer                         [FAIL]                       
- displaying pulp_workers                          [FAIL]                       
- displaying smart_proxy_dynflow_core              [FAIL]                       
- displaying tomcat                                [FAIL]                       
- displaying dynflowd                              [FAIL]                       
- displaying httpd                                 [FAIL]                       
- displaying puppetserver                          [FAIL]                       
- displaying foreman-proxy                         [FAIL]                       
\ All services displayed                                              [FAIL]    
Some services are not running (rh-mongodb34-mongod, postgresql, qdrouterd, qpidd, squid, pulp_celerybeat, pulp_resource_manager, pulp_streamer, pulp_workers, smart_proxy_dynflow_core, tomcat, dynflowd, httpd, puppetserver, foreman-proxy)
--------------------------------------------------------------------------------
Scenario [Status Services] failed.

The following steps ended up in failing state:

  [service-status]

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

@jameerpathan111
Copy link
Contributor Author

On foreman-maintain v0.3.4

[root@hpe-nehalem-01 ~]# foreman-maintain service stop --only foreman-proxy
Running Stop Services
================================================================================
Check if command is run as root user:                                 [OK]
--------------------------------------------------------------------------------
Stop applicable services: 
Stopping the following service(s):

foreman-proxy
- All services stopped                                                [OK]      
--------------------------------------------------------------------------------

[root@hpe-nehalem-01 ~]# mkdir /tmp/backup-openscap2
[root@hpe-nehalem-01 ~]# foreman-maintain backup offline -y --features openscap /tmp/backup-openscap2/
Starting backup: 2019-07-01 03:26:59 -0400
Running preparation steps required to run the next scenarios
================================================================================
Make sure Foreman DB is up: 
/ Checking connection to the Foreman DB                               [OK]      
--------------------------------------------------------------------------------


Running Backup
================================================================================
Confirm turning off services is allowed: 
WARNING: This script will stop your services.

                                                                      [OK]      
--------------------------------------------------------------------------------
Prepare backup Directory: 
Creating backup folder /tmp/backup-openscap2/satellite-backup-2019-07-01-03-26-59
                                                                      [OK]
--------------------------------------------------------------------------------
Check if the directory exists and is writable:                        [OK]
--------------------------------------------------------------------------------
Generate metadata: 
/ Saving metadata to metadata.yml                                     [OK]      
--------------------------------------------------------------------------------
Backup config files: 
\ Collecting config files to backup                                   [FAIL]    
undefined method `&' for "":String
--------------------------------------------------------------------------------
Scenario [Backup] failed.

The following steps ended up in failing state:

  [backup-config-files]

Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="backup-config-files"



Running Failed backup cleanup
================================================================================
Start applicable services: 
Starting the following service(s):

rh-mongodb34-mongod, postgresql, qdrouterd, qpidd, squid, pulp_celerybeat, pulp_resource_manager, pulp_streamer, pulp_workers, smart_proxy_dynflow_core, tomcat, dynflowd, httpd, puppetserver, foreman-proxy
| All services started                                                [OK]      
--------------------------------------------------------------------------------
Turn off maintenance mode:                                            [OK]
--------------------------------------------------------------------------------
Clean up backup directory:                                            [OK]
--------------------------------------------------------------------------------

Done with backup: 2019-07-01 03:27:41 -0400
Backup didn't finish. Incomplete backup was removed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant