Project

General

Profile

Actions

Bug #23685

closed

foreman-maintain run failed when running from /etc/smart_proxy_dynflow_core/settings.d folder

Added by Kavita Gaikwad almost 6 years ago. Updated almost 6 years ago.

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

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1561137

Description of problem:
foreman-maintain run failed when running from /etc/smart_proxy_dynflow_core/settings.d folder

Version-Release number of selected component (if applicable):
rubygem-foreman_maintain.noarch 0:0.1.5-1.el7sat

How reproducible:
Always

Steps to Reproduce:
1. I was trying to verify https://bugzilla.redhat.com/show_bug.cgi?id=1548230
2. So I created /etc/smart_proxy_dynflow_core/settings.d folder and a symlink inside it as per the bug 1548230 description
3. Ran foreman-maintain
  1. foreman-maintain upgrade check --target-version 6.3

Actual results:
<trim>
--------------------------------------------------------------------------------
Running Checks before upgrading to Satellite 6.3 ================================================================================
Check for paused tasks: [OK]
--------------------------------------------------------------------------------
Check whether all services are running using hammer ping: [OK]
--------------------------------------------------------------------------------
Check to validate candlepin database: [OK]
--------------------------------------------------------------------------------
Check for running tasks: [OK]
--------------------------------------------------------------------------------
Check for old tasks in paused/stopped state: [FAIL]
Found 104 paused or stopped task(s) older than 30 days
--------------------------------------------------------------------------------
Continue with step [Delete old tasks]?, [y(yes), n(no), q(quit)] y
Delete tasks:
- Deleted old stopped and paused tasks: 104 [OK]
--------------------------------------------------------------------------------
Rerunning the check after fix procedure
Check for old tasks in paused/stopped state: [OK]
--------------------------------------------------------------------------------
Check for pending tasks which are safe to delete: [OK]
--------------------------------------------------------------------------------
Check for tasks in planning state: [OK]
--------------------------------------------------------------------------------
Check for recommended disk speed of pulp, mongodb, pgsql dir.: | Finished

Disk speed : 64 MB/sec [FAIL]
Slow disk detected /var/lib/pulp mounted on /dev/mapper/rhel_dhcp--10--12--211--51-root.
Actual disk speed: 64 MB/sec
Expected disk speed: 80 MB/sec.
--------------------------------------------------------------------------------
Check to verify remote_execution_ssh settings already exist: [FAIL]
Settings related to remote_execution_ssh are already present under /etc/smart_proxy_dynflow_core/settings.d and
it would conflict with the installer from the next version.
symlinks available - /etc/smart_proxy_dynflow_core/settings.d/smart_proxy_remote_execution_ssh_core.yml
--------------------------------------------------------------------------------
Continue with step [Remove existing settings.d directory before installer run.
The next run of the installer will re-create the directory properly.]?, [y(yes), n(no), q(quit)] y
Remove existing settings.d directory before installer run.
The next run of the installer will re-create the directory properly.:
/ Removing existing /etc/smart_proxy_dynflow_core/settings.d directory[OK]
--------------------------------------------------------------------------------
Rerunning the check after fix procedure
Check to verify remote_execution_ssh settings already exist: [OK]
--------------------------------------------------------------------------------
Validate availability of repositories:
- Validating availability of repositories for 6.3shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
- Validating availability of repositories for 6.3shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
\ Validating availability of repositories for 6.3shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory | Validating availability of repositories for 6.3Consumer profile "9f329be9-690e-4dc1-8f78-5c68b5d2e325" has been deleted from the server. You can use command clean or unregister to remove local profile.
/ Validating availability of repositories for 6.3shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
\ Some repositories missing, calling `subscription-manager refresh`shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
- Some repositories missing, calling `subscription-manager refresh` [FAIL]
Failed executing subscription-manager refresh, exit status 70:
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Unit 9f329be9-690e-4dc1-8f78-5c68b5d2e325 has been deleted
--------------------------------------------------------------------------------
Scenario [Checks before upgrading to Satellite 6.3] failed.

The following steps ended up in failing state:

[disk-performance]
[repositories-validate]

Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="disk-performance,repositories-validate"
</trim>

Expected results:
Since the script deleted the directory which I am currently in, it failed in getcwd command. To be on the safer side, after the directory delete happened, we should move to an other safe directory.

Additional info:

Actions #1

Updated by Kavita Gaikwad almost 6 years ago

  • Assignee changed from Anurag Patel to Kavita Gaikwad
Actions #2

Updated by The Foreman Bot almost 6 years ago

  • Pull request https://github.com/theforeman/foreman_maintain/pull/185 added
Actions #3

Updated by Kavita Gaikwad almost 6 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
Actions #4

Updated by Ivan Necas almost 6 years ago

  • Triaged set to No
  • Fixed in Releases foreman-maintain-0.2.4 added
Actions

Also available in: Atom PDF