Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Insights Remediation playbook fails with error "Failed to create job. Ensure your systems are registered in Foreman" when system hostname has uppercase characters
Failed QA.
The errors that occurred previously are no longer present when attempting to run a remediation playbook against a host with uppercase characters in its domain name, but the playbook does not successfully run on the host.
Steps to test:
1. Deploy a Satellite 6.9.3, snap 1.
2. Deploy a RHEL 7.7 host.
3. Modify the host to have uppercase characters in its hostname:
# hostnamectl set-hostname --static DHCP-2-241.example.com
4. Register the host to the Satellite.
5. Install insights-client-3.1.1-1.el7_9.noarch on the host.
6. Register the host to Insights.
7. Verify that the hostname includes the uppercase characters on the Insights > Inventory page of the Satellite webUI and that the same characters are lowercase on the Hosts > All Hosts page.
8. Copy the foreman-proxy public key from the Satellite to the host.
9. On the Insights > Planner page of the Satellite webUI, create a new plan for the specific system. In my test, there was one available action ("Network device naming on the host is inconsistent due to using net.ifnames=0 improperly"). This action was listed as "Reboot Required," and the "Reboot systems automatically" option was selected.
10. Click the "Run Playbook" button.
Expected Results:
The remediation playbook runs on the host, the host is rebooted, and the action is marked as resolved in the Satellite webUI.
Actual Results:
The remote action task appears to complete successfully. However, the host is not rebooted, and the action is not marked as resolved in the webUI. Looking at the task for the remote action in the Dynflow console, it does not appear that the remediation playbook was actually run on the host. The "script" portion of the Ansible playbook is as follows in the "Input" section of the task in Dynflow:
~~~
script: |-
---
- hosts: all
tasks:
- shell:
cmd: |
date
register: out
- debug: var=out
execution_timeout_interval:
use_batch_triggering: true
use_concurrency_control: false
connection_options:
retry_interval: 15
retry_count: 4
proxy_batch_triggering: true
proxy_url: https://dhcp-2-192.example.com:9090
proxy_action_name: ForemanAnsibleCore::TaskLauncher::Playbook::PlaybookRunnerAction
proxy_version:
major: 2
minor: 3
patch: 1
current_request_id:
current_timezone: America/New_York
current_user_id: 4
current_organization_id: 1
current_location_id: 2
~~~
And the output is as follows:
~~~
---
proxy_output:
result:
- output_type: stdout
output: "\n"
timestamp: 1623268896.0570538
- output_type: stdout
output: "\r\nPLAY [all] *********************************************************************\n"
timestamp: 1623268896.0571835
- output_type: stdout
output: "\r\nTASK [Gathering Facts] *********************************************************\n"
timestamp: 1623268896.0573173
- output_type: stdout
output: "\n"
timestamp: 1623268896.0574374
- output_type: stdout
output: 'ok: [dhcp-2-241.example.com]
'
timestamp: 1623268900.3672864
- output_type: stdout
output: "\r\nTASK [shell] *******************************************************************\n"
timestamp: 1623268902.5393684
- output_type: stdout
output: "\n"
timestamp: 1623268904.6451623
- output_type: stdout
output: 'changed: [dhcp-2-241.example.com]
'
timestamp: 1623268904.645323
- output_type: stdout
output: "\r\nTASK [debug] *******************************************************************\n"
timestamp: 1623268904.6454513
- output_type: stdout
output: "\n"
timestamp: 1623268904.6455066
- output_type: stdout
output: "ok: [dhcp-2-241.example.com] => {\r\n \"out\": {\r\n \"changed\":
true, \r\n \"cmd\": \"date\\n\", \r\n \"delta\": \"0:00:00.004817\",
\r\n \"end\": \"2021-06-09 16:01:44.321095\", \r\n \"failed\":
false, \r\n \"rc\": 0, \r\n \"start\": \"2021-06-09 16:01:44.316278\",
\r\n \"stderr\": \"\", \r\n \"stderr_lines\": [], \r\n \"stdout\":
\"Wed Jun 9 16:01:44 EDT 2021\", \r\n \"stdout_lines\": [\r\n \"Wed
Jun 9 16:01:44 EDT 2021\"\r\n ]\r\n }\r\n}\n"
timestamp: 1623268905.6493115
- output_type: stdout
output: |-
PLAY RECAP *********************************************************************
dhcp-2-241.example.com : ok=3 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
timestamp: 1623268905.6494482
exit_status: 0
~~~
It looks as though the tasks are not being passed correctly when the playbook is run. When I download the playbook for this plan, I can see that it contains tasks for resolving the action, rebooting the system, and running Insights, but they are not present in the input above.
Additionally, I tested this with a different RHEL 7.7 host that did not have uppercase characters in its hostname. The same "Network device naming on the host is inconsistent due to using net.ifnames=0 improperly" was the only available action for this host as well. On this host, the remediation playbook ran successfully, the host was rebooted, and the action subsequently appeared as resolved in the Satellite webUI.
Rex,
Is this issue triaged to be addressed sooner rather than later? Delivery and QE will need to prepare additional snaps for 6.9.3, and this is one of a few issues that are not in a POST state.
Comment 12Red Hat Bugzilla
2023-09-15 01:34:12 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days
Failed QA. The errors that occurred previously are no longer present when attempting to run a remediation playbook against a host with uppercase characters in its domain name, but the playbook does not successfully run on the host. Steps to test: 1. Deploy a Satellite 6.9.3, snap 1. 2. Deploy a RHEL 7.7 host. 3. Modify the host to have uppercase characters in its hostname: # hostnamectl set-hostname --static DHCP-2-241.example.com 4. Register the host to the Satellite. 5. Install insights-client-3.1.1-1.el7_9.noarch on the host. 6. Register the host to Insights. 7. Verify that the hostname includes the uppercase characters on the Insights > Inventory page of the Satellite webUI and that the same characters are lowercase on the Hosts > All Hosts page. 8. Copy the foreman-proxy public key from the Satellite to the host. 9. On the Insights > Planner page of the Satellite webUI, create a new plan for the specific system. In my test, there was one available action ("Network device naming on the host is inconsistent due to using net.ifnames=0 improperly"). This action was listed as "Reboot Required," and the "Reboot systems automatically" option was selected. 10. Click the "Run Playbook" button. Expected Results: The remediation playbook runs on the host, the host is rebooted, and the action is marked as resolved in the Satellite webUI. Actual Results: The remote action task appears to complete successfully. However, the host is not rebooted, and the action is not marked as resolved in the webUI. Looking at the task for the remote action in the Dynflow console, it does not appear that the remediation playbook was actually run on the host. The "script" portion of the Ansible playbook is as follows in the "Input" section of the task in Dynflow: ~~~ script: |- --- - hosts: all tasks: - shell: cmd: | date register: out - debug: var=out execution_timeout_interval: use_batch_triggering: true use_concurrency_control: false connection_options: retry_interval: 15 retry_count: 4 proxy_batch_triggering: true proxy_url: https://dhcp-2-192.example.com:9090 proxy_action_name: ForemanAnsibleCore::TaskLauncher::Playbook::PlaybookRunnerAction proxy_version: major: 2 minor: 3 patch: 1 current_request_id: current_timezone: America/New_York current_user_id: 4 current_organization_id: 1 current_location_id: 2 ~~~ And the output is as follows: ~~~ --- proxy_output: result: - output_type: stdout output: "\n" timestamp: 1623268896.0570538 - output_type: stdout output: "\r\nPLAY [all] *********************************************************************\n" timestamp: 1623268896.0571835 - output_type: stdout output: "\r\nTASK [Gathering Facts] *********************************************************\n" timestamp: 1623268896.0573173 - output_type: stdout output: "\n" timestamp: 1623268896.0574374 - output_type: stdout output: 'ok: [dhcp-2-241.example.com] ' timestamp: 1623268900.3672864 - output_type: stdout output: "\r\nTASK [shell] *******************************************************************\n" timestamp: 1623268902.5393684 - output_type: stdout output: "\n" timestamp: 1623268904.6451623 - output_type: stdout output: 'changed: [dhcp-2-241.example.com] ' timestamp: 1623268904.645323 - output_type: stdout output: "\r\nTASK [debug] *******************************************************************\n" timestamp: 1623268904.6454513 - output_type: stdout output: "\n" timestamp: 1623268904.6455066 - output_type: stdout output: "ok: [dhcp-2-241.example.com] => {\r\n \"out\": {\r\n \"changed\": true, \r\n \"cmd\": \"date\\n\", \r\n \"delta\": \"0:00:00.004817\", \r\n \"end\": \"2021-06-09 16:01:44.321095\", \r\n \"failed\": false, \r\n \"rc\": 0, \r\n \"start\": \"2021-06-09 16:01:44.316278\", \r\n \"stderr\": \"\", \r\n \"stderr_lines\": [], \r\n \"stdout\": \"Wed Jun 9 16:01:44 EDT 2021\", \r\n \"stdout_lines\": [\r\n \"Wed Jun 9 16:01:44 EDT 2021\"\r\n ]\r\n }\r\n}\n" timestamp: 1623268905.6493115 - output_type: stdout output: |- PLAY RECAP ********************************************************************* dhcp-2-241.example.com : ok=3 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 timestamp: 1623268905.6494482 exit_status: 0 ~~~ It looks as though the tasks are not being passed correctly when the playbook is run. When I download the playbook for this plan, I can see that it contains tasks for resolving the action, rebooting the system, and running Insights, but they are not present in the input above. Additionally, I tested this with a different RHEL 7.7 host that did not have uppercase characters in its hostname. The same "Network device naming on the host is inconsistent due to using net.ifnames=0 improperly" was the only available action for this host as well. On this host, the remediation playbook ran successfully, the host was rebooted, and the action subsequently appeared as resolved in the Satellite webUI.