Bug 1506107
| Summary: | Check for verifying syntax for ISP DHCP configurations failed with error undefined method `strip' for nil:NilClass | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Nikhil Kathole <nkathole> | ||||
| Component: | Satellite Maintain | Assignee: | Kavita <kgaikwad> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Nikhil Kathole <nkathole> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | urgent | ||||||
| Version: | 6.3.0 | CC: | apatel, aupadhye, bbuckingham, fgarciad, inecas, kgaikwad, ktordeur, mmccune, nkathole, rajgupta, sijokjos, smane, smercurio, sthirugn, vijsingh | ||||
| Target Milestone: | Unspecified | Keywords: | Triaged, VerifiedUpstream | ||||
| Target Release: | Unused | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2018-04-04 14:02:54 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1496794 | ||||||
| Attachments: |
|
||||||
*** Bug 1506106 has been marked as a duplicate of this bug. *** Hello Nikhil, To debug this further could you please let know if you're able to ping your hostname? $ ping $(hostname) Hi, Yes, I am able to ping host. This fix has just been merged upstream. It should be available in foreman-maintain 0.0.11. VERIFIED
Version Tested:
# rpm -q rubygem-foreman_maintain
rubygem-foreman_maintain-0.1.1-1.el7sat.noarch
# foreman-maintain advanced procedure run katello-service-stop
Running ForemanMaintain::Scenario
================================================================================
katello-service stop:
\ No katello service running [OK]
--------------------------------------------------------------------------------
# foreman-maintain health check --label foreman-proxy-verify-dhcp-config-syntax
Running ForemanMaintain::Scenario::FilteredScenario
================================================================================
Check for verifying syntax for ISP DHCP configurations:
No valid HTTP response (Connection failed) 0. Response: ""
[FAIL]
Please check and verify DHCP configurations.
--------------------------------------------------------------------------------
Scenario [ForemanMaintain::Scenario::FilteredScenario] failed.
The following steps ended up in failing state:
[foreman-proxy-verify-dhcp-config-syntax]
Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="foreman-proxy-verify-dhcp-config-syntax"
Moving this to assigned. # rpm -qa |grep -i rubygem-foreman_maintain
rubygem-foreman_maintain-0.1.3-1.el7sat.noarch
I have same issue with 0.1.3 version as well.
D, [2018-02-22 18:06:47+1100 #22908] DEBUG -- : Running command which passenger-recycler with stdin nil
D, [2018-02-22 18:06:47+1100 #22908] DEBUG -- : output of the command:
/usr/bin/passenger-recycler
I, [2018-02-22 18:06:47+1100 #22908] INFO -- : Running foreman-maintain command with arguments [["upgrade", "check", "--target-version", "6.3"]]
D, [2018-02-22 18:06:47+1100 #22908] DEBUG -- : Running command rpm -q 'satellite' --queryformat="%{VERSION}" with stdin nil
D, [2018-02-22 18:06:47+1100 #22908] DEBUG -- : output of the command:
6.2.14
D, [2018-02-22 18:06:47+1100 #22908] DEBUG -- : Running command /usr/share/candlepin/cpdb --help | grep -c '\-\-validate ' with stdin nil
D, [2018-02-22 18:06:47+1100 #22908] DEBUG -- : output of the command:
1
D, [2018-02-22 18:06:47+1100 #22908] DEBUG -- : Running command LANG=en_US.utf-8 hammer -c "/etc/foreman-maintain/foreman-maintain-hammer.yml" --interactive=no architecture list with stdin nil
D, [2018-02-22 18:06:49+1100 #22908] DEBUG -- : output of the command:
---|-------
ID | NAME
---|-------
1 | x86_64
2 | i386
---|-------
D, [2018-02-22 18:06:49+1100 #22908] DEBUG -- : Running command rpm -q 'hdparm' --queryformat="%{VERSION}" with stdin nil
D, [2018-02-22 18:06:49+1100 #22908] DEBUG -- : output of the command:
9.43
D, [2018-02-22 18:06:49+1100 #22908] DEBUG -- : Running command rpm -q 'fio' --queryformat="%{VERSION}" with stdin nil
D, [2018-02-22 18:06:49+1100 #22908] DEBUG -- : output of the command:
3.1
D, [2018-02-22 18:06:49+1100 #22908] DEBUG -- : Running command curl -w '
%{http_code}' --silent -ks --cert /etc/foreman/client_cert.pem --key /etc/foreman/client_key.pem --cacert /etc/foreman/proxy_ca.pem https://$(hostname):9090/dhcp with stdin nil
D, [2018-02-22 18:06:49+1100 #22908] DEBUG -- : output of the command:
Requested url was not found
404
E, [2018-02-22 18:06:49+1100 #22908] ERROR -- : undefined method `strip' for nil:NilClass (NoMethodError)
/usr/share/gems/gems/foreman_maintain-0.1.3/definitions/features/foreman_proxy.rb:37:in `find_http_error_msg'
/usr/share/gems/gems/foreman_maintain-0.1.3/definitions/features/foreman_proxy.rb:50:in `run_dhcp_curl'
/usr/share/gems/gems/foreman_maintain-0.1.3/definitions/features/foreman_proxy.rb:55:in `dhcp_req_pass?'
/usr/share/gems/gems/foreman_maintain-0.1.3/definitions/features/foreman_proxy.rb:17:in `valid_dhcp_configs?'
/usr/share/gems/gems/foreman_maintain-0.1.3/definitions/checks/foreman_proxy/verify_dhcp_config_syntax.rb:13:in `run'
/usr/share/gems/gems/foreman_maintain-0.1.3/lib/foreman_maintain/executable.rb:119:in `__run__'
/usr/share/gems/gems/foreman_maintain-0.1.3/lib/foreman_maintain/check.rb:40:in `__run__'
I have already tried with that option but I got below error while satellite-installer started. I will do a fresh upgrade again and update. Parameter foreman-proxy-dns-managed invalid: "false--foreman-proxy-dhcp-managed=false" is not a valid boolean I got different error with solution mentioned in 3361021 "foreman-maintain upgrade run --target-version 6.3 --whitelist="foreman-proxy-verify-dhcp-config-syntax""
D, [2018-02-22 22:30:05+1100 #9591] DEBUG -- : Running command rpm -q 'satellite-installer' --queryformat="%{VERSION}" with stdin nil
D, [2018-02-22 22:30:05+1100 #9591] DEBUG -- : output of the command:
6.3.0.12
D, [2018-02-22 22:30:05+1100 #9591] DEBUG -- : Running command satellite-installer --upgrade with stdin nil
D, [2018-02-22 22:30:11+1100 #9591] DEBUG -- : output of the command:
Script started on Thu 22 Feb 2018 22:30:05 AEDT
Parameter foreman-proxy-dns-managed invalid: "false--foreman-proxy-dhcp-managed=false" is not a valid boolean
Error during configuration, exiting
E, [2018-02-22 22:30:11+1100 #9591] ERROR -- : Failed executing satellite-installer --upgrade, exit status 21 (ForemanMaintain::Error::ExecutionError)
/usr/share/gems/gems/foreman_maintain-0.1.3/lib/foreman_maintain/utils/command_runner.rb:50:in `execution_error'
/usr/share/gems/gems/foreman_maintain-0.1.3/lib/foreman_maintain/concerns/system_helpers.rb:53:in `execute!'
/usr/share/gems/gems/foreman_maintain-0.1.3/definitions/procedures/installer/upgrade.rb:4:in `run'
/usr/share/gems/gems/foreman_maintain-0.1.3/lib/foreman_maintain/executable.rb:119:in `__run__'
/usr/share/gems/gems/foreman_maintain-0.1.3/lib/foreman_maintain/runner/execution.rb:76:in `block (2 levels) in run'
/usr/share/gems/gems/foreman_maintain-0.1.3/lib/foreman_maintain/runner/execution.rb:99:in `capture_errors'
/usr/share/gems/gems/foreman_maintain-0.1.3/lib/foreman_maintain/runner/execution.rb:75:in `block in run'
/usr/share/gems/gems/foreman_maintain-0.1.3/lib/foreman_maintain/runner/execution.rb:93:in `with_metadata_calculation'
/usr/share/gems/gems/foreman_maintain-0.1.3/lib/foreman_maintain/runner/execution.rb:74:in `run'
/usr/share/gems/gems/foreman_maintain-0.1.3/lib/foreman_maintain/runner.rb:109:in `run_step'
/usr/share/gems/gems/foreman_maintain-0.1.3/lib/foreman_maintain/runner.rb:98:in `run_steps'
/usr/share/gems/gems/foreman_maintain-0.1.3/lib/foreman_maintain/runner.rb:91:in `execute_scenario_steps'
/usr/share/gems/gems/foreman_maintain-0.1.3/lib/foreman_maintain/runner.rb:45:in `run_scenario'
/usr/share/gems/gems/foreman_maintain-0.1.3/lib/foreman_maintain/upgrade_runner.rb:138:in `block in run_phase'
/usr/share/gems/gems/foreman_maintain-0.1.3/lib/foreman_maintain/upgrade_runner.rb:183:in `with_non_empty_scenario'
/usr/share/gems/gems/foreman_maintain-0.1.3/lib/foreman_maintain/upgrade_runner.rb:134:in `run_phase'
/usr/share/gems/gems/foreman_maintain-0.1.3/lib/foreman_maintain/upgrade_runner.rb:82:in `block in run'
/usr/share/gems/gems/foreman_maintain-0.1.3/lib/foreman_maintain/upgrade_runner.rb:77:in `each'
/usr/share/gems/gems/foreman_maintain-0.1.3/lib/foreman_maintain/upgrade_runner.rb:77:in `run'
/usr/share/gems/gems/foreman_maintain-0.1.3/lib/foreman_maintain/cli/upgrade_command.rb:80:in `execute'
/usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
/usr/share/gems/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
/usr/share/gems/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
/usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
/usr/share/gems/gems/foreman_maintain-0.1.3/lib/foreman_maintain/cli.rb:21:in `run'
/usr/share/gems/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
/usr/share/gems/gems/foreman_maintain-0.1.3/bin/foreman-maintain:12:in `<top (required)>'
/bin/foreman-maintain:23:in `load'
/bin/foreman-maintain:23:in `<main>'
I, [2018-02-22 22:30:11+1100 #9591] INFO -- : foreman-maintain command finished with
Ok I understood the issue now. When we run the upgrade check, with it will create an answer file "/etc/foreman-installer/scenarios.d/satellite-answers.yaml" and when we are giving whitelist for dhcp syntax as mentioned in the solution like, foreman-maintain upgrade check --target-version 6.3 --whitelist="foreman-proxy-verify-dhcp-config-syntax" in the answer file the dns-manged is getting wrong option. that means if you check the answer file after the upgrade check with white list option, the dns-managed entry will be like, dns_managed: false--foreman-proxy-dhcp-managed=faError I changed it to dns_managed: true and ran the upgrade, it is looking good. Hi Sijo Jose, As Amit mentioned, currently we are not passing any parameter to command satellite-installer --upgrade. There is no relation between whitelist option & answer file. could you please confirm whether you tried to run installer --upgrade manually i.e not through foreman-maintain? If you are still facing this issue, I would suggest to create different BZ & attach log files so that easy to debug further on an issue. (In reply to Sijo Jose from comment #15) > Ok I understood the issue now. When we run the upgrade check, with it will > create an answer file > "/etc/foreman-installer/scenarios.d/satellite-answers.yaml" > > > and when we are giving whitelist for dhcp syntax as mentioned in the > solution like, > > foreman-maintain upgrade check --target-version 6.3 > --whitelist="foreman-proxy-verify-dhcp-config-syntax" > > > in the answer file the dns-manged is getting wrong option. that means if you > check the answer file after the upgrade check with white list option, > > the dns-managed entry will be like, > > dns_managed: false--foreman-proxy-dhcp-managed=faError > > > I changed it to > > dns_managed: true > > and ran the upgrade, it is looking good. Upstream bug assigned to kgaikwad (In reply to Kavita from comment #16) > Hi Sijo Jose, > > As Amit mentioned, currently we are not passing any parameter to command > satellite-installer --upgrade. > There is no relation between whitelist option & answer file. > > could you please confirm whether you tried to run installer --upgrade > manually i.e not through foreman-maintain? > > If you are still facing this issue, I would suggest to create different BZ & > attach log files so that easy to debug further on an issue. > > (In reply to Sijo Jose from comment #15) > > Ok I understood the issue now. When we run the upgrade check, with it will > > create an answer file > > "/etc/foreman-installer/scenarios.d/satellite-answers.yaml" > > > > > > and when we are giving whitelist for dhcp syntax as mentioned in the > > solution like, > > > > foreman-maintain upgrade check --target-version 6.3 > > --whitelist="foreman-proxy-verify-dhcp-config-syntax" > > > > > > in the answer file the dns-manged is getting wrong option. that means if you > > check the answer file after the upgrade check with white list option, > > > > the dns-managed entry will be like, > > > > dns_managed: false--foreman-proxy-dhcp-managed=faError > > > > > > I changed it to > > > > dns_managed: true > > > > and ran the upgrade, it is looking good. Sure, I will create another BZ if I face the issue again. VERIFIED
Version tested:
# rpm -qa | grep maintain
rubygem-foreman_maintain-0.1.5-1.el7sat.noarch
Running Checks before upgrading to Satellite 6.3
================================================================================
Check for verifying syntax for ISP DHCP configurations: [OK]
--------------------------------------------------------------------------------
Running Checks before upgrading to Satellite 6.2
================================================================================
Check for verifying syntax for ISP DHCP configurations: [OK]
--------------------------------------------------------------------------------
Running Checks before upgrading to Satellite 6.3.z
================================================================================
Check for verifying syntax for ISP DHCP configurations: [OK]
--------------------------------------------------------------------------------
When services are down
Running Checks before upgrading to Satellite 6.3.z
================================================================================
Check for verifying syntax for ISP DHCP configurations:
No valid HTTP response (Connection failed) 0. Response: ""
[FAIL]
Please check and verify DHCP configurations.
--------------------------------------------------------------------------------
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:0633 |
Created attachment 1343109 [details] log in foreman-maintain.log file Description of problem: When katello-services are stopped and Check for verifying syntax for ISP DHCP configuration is performed, it fails with error showing undefined method `strip' for nil:NilClass. Version-Release number of selected component (if applicable): foreman-maintain snap 3 # rpm -q rubygem-foreman_maintain rubygem-foreman_maintain-0.0.10-1.el7sat.noarch How reproducible: always Steps to Reproduce: 1. katello-service stop 2. foreman-maintain health check --label foreman-proxy-verify-dhcp-config-syntax Running ForemanMaintain::Scenario::FilteredScenario ================================================================================ Check for verifying syntax for ISP DHCP configurations: [FAIL] undefined method `strip' for nil:NilClass -------------------------------------------------------------------------------- Scenario [ForemanMaintain::Scenario::FilteredScenario] failed. The following steps ended up in failing state: [foreman-proxy-verify-dhcp-config-syntax] Resolve the failed steps and rerun the command. In case the failures are false positives, use --whitelist="foreman-proxy-verify-dhcp-config-syntax" Actual results: Displayed error undefined method `strip' for nil:NilClass Expected results: Error should get handled. Additional info: When katello-services are stopped and user performed check for verifying syntax for ISP DHCP configuration, can we add interaction for user like hammer-ping? Continue with step [katello-service restart]?, [y(yes), n(no), q(quit)]