SatelliteQE / automation-tools

A set of tools to help to automate testing Foreman with Robottelo (https://github.com/SatelliteQE/robottelo)
GNU General Public License v3.0
16 stars 33 forks source link

product_install:satellite6-upstream - out: /bin/bash: katello-installer: command not found #205

Closed jhutar closed 9 years ago

jhutar commented 9 years ago

I have installed automation-tools on RHEL 6 and when I have run:

# RHN_USERNAME=<user> RHN_PASSWORD=<pass> RHN_POOLID=<pool> fab -H root@$( hostname ) product_install:satellite6-upstream

it failed with:

[...]
[<fqdn>] Executing task 'katello_installer'
[<fqdn>] run: katello-installer -d -v --foreman-admin-password="changeme" 
[<fqdn>] out: /bin/bash: katello-installer: command not found
[<fqdn>] out: 

Fatal error: run() received nonzero return code 127 while executing!

Requested: katello-installer -d -v --foreman-admin-password="changeme" 
Executed: /bin/bash -l -c "katello-installer -d -v --foreman-admin-password=\"changeme\" "

Aborting.
Disconnecting from <fqdn>... done.

Maybe I'm missing something. I wanted to follow docs http://automation-tools.readthedocs.org/en/latest/index.html#satellite-installation

omaciel commented 9 years ago

@jhutar so it looks like katello was not installed and I wonder if we need to provide some other environmental values (Jenkins does all the for us automatically)? @elyezer does anything here stand out to you?

elyezer commented 9 years ago

@jhutar and @omaciel this is not automation-tools issue, upstream installer is a really black box thing. It have been failing some times recently on automation.

I recommending checking the repo enabled, also if is missing something that is actually a katello-deploy bug than automation-tools.

Also I recommend checking the installation logs to check for some missing dependency because katello-deploy script does not return a non-zero return code when it fails to run some command.

jhutar commented 9 years ago

OK, I take this back. Nothing has changed on my side and today this worked:

# RHN_USERNAME=<user> RHN_PASSWORD=<pass> RHN_POOLID=<pool> fab -H root@<hostname> product_install:satellite6-upstream
[...]
  Success!
[<hostname>] out:   * Katello is running at https://<hostname>
[<hostname>] out:       Initial credentials are admin / changeme
[<hostname>] out:   * Capsule is running at https://<hostname>:9090
[<hostname>] out:   * To install additional capsule on separate machine continue by running:"
[<hostname>] out: 
[<hostname>] out:       capsule-certs-generate --capsule-fqdn "$CAPSULE" --certs-tar "~/$CAPSULE-certs.tar"
[<hostname>] out: 
[<hostname>] out:   The full log is at /var/log/katello-installer/katello-installer.log
[<hostname>] out: 

[<hostname>] Executing task 'setup_scap_client'
[<hostname>] run: yum -y install puppet-foreman_scap_client
[<hostname>] out: Loaded plugins: fastestmirror, priorities, product-id, security, subscription-
[<hostname>] out:               : manager
[<hostname>] out: Setting up Install Process
[<hostname>] out: Loading mirror speeds from cached hostfile
[<hostname>] out:  * epel: <...>
[<hostname>] out: 151 packages excluded due to repository priority protections
[<hostname>] out: No package puppet-foreman_scap_client available.
[<hostname>] out: Error: Nothing to do
[<hostname>] out: 

Warning: run() received nonzero return code 1 while executing 'yum -y install puppet-foreman_scap_client'!

Done.
Disconnecting from <hostname>... done.

Error at the end, about installing puppet-foreman_scap_client is different issue I guess.

And one final question: Although there was error when installing that scap package, fab exitted with "0". Is that expected?

jhutar commented 9 years ago

To make myself clear - why I'm asking about that error code: I want to know if the exit code of the fab command reflect successfulness of the underlying action of if I should check for something else.

elyezer commented 9 years ago

That is just telling you that the scap client was not installed and as that is not a blocker fabric was asked to just warning instead of failing.

sthirugn commented 9 years ago

In addition to what @elyezer said: Look at https://github.com/SatelliteQE/automation-tools/blob/master/automation_tools/__init__.py#L432 and note warn_only=true. This is a minor post installation task for automation and we don't want the whole installation to be considered failed if this task failed, so we ask fabric to ignore errors using warn_only=true so it just prints the error as warning and continues to run other tasks.

jhutar commented 9 years ago

Makes perfect sense @elyezer and @sthirugn. Thanks.

Closing now as the issue was probably in the upstream installer.