Bug #35481
closedForemanCustomScript in Host provisioned on Azure CR fails with `command not found`
Description
Description of problem:
When Satellite provisions host on Azure CR, a `ForemanCustomScript` Extension that Satellite adds to the Azure host is throwing an error `Enable succeeded: [stout] [stderr] /bin/sh: azurerootpasswd: command not found`.
This failure probably delayed the VM read operation from Azure python client and failed all QE tests for Azure Provisioning.
Version-Release number of selected component (if applicable):
Satellite 6.11 | 6.10 | 6.9
How reproducible:
Always
Steps to Reproduce:
1. Create an Azure Compute Resource.
2. Create an Image in Azure CR with marketplace image `marketplace://RedHat:RHEL:7-RAW:latest` (BTW, the issue is reproducible with all the images that Satellite supports to provision the host from)
3. Using the image above provision an azure host, and make sure the azure host has the following compute attributes:
script_command = 'touch /var/tmp/text.txt',
script_uris = `https://raw.githubusercontent.com/SatelliteQE/robottelo/master/tests/foreman/data/uri.sh`
Actual results:
1. The VM is being provisioned to Azure but the ForemanCustomScript extention post VM deployment is failing with the error `Enable succeeded: [stout] [stderr] /bin/sh: azurerootpasswd: command not found. Note `azurerootpasswd` is the password set as a password in compute attributes.
2. The script command in compute attributes was executed successfully.
3. But, The custom script in `script_uris` in compute attributes is not executed and seems the failure is for that reason only.
Expected results:
The VM provisions successfully with the post-deployment script (both script command and script uris) executed successfully.
Updated by The Foreman Bot about 2 years ago
- Pull request https://github.com/theforeman/foreman_azure_rm/pull/158 added
Updated by Chris Roberts about 2 years ago
- Status changed from Assigned to Closed
Applied in changeset foreman_azure_rm|7825239b400e09c2cdf38c1f4b6fb08f38934d35.