Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jhutar opened this issue Jul 19, 2015 · 7 comments

Comments

@jhutar
Copy link
Member

jhutar commented Jul 19, 2015

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
Copy link
Member

omaciel commented Jul 21, 2015

@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
Copy link
Contributor

elyezer commented Jul 24, 2015

@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
Copy link
Member Author

jhutar commented Jul 26, 2015

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
[...]
  �[1m�[32mSuccess!�[0m
[<hostname>] out:   * �[1m�[36mKatello�[0m is running at �[1m�[36mhttps://<hostname>�[0m
[<hostname>] out:       Initial credentials are �[1m�[36madmin�[0m / �[1m�[36mchangeme�[0m
[<hostname>] out:   * �[1m�[36mCapsule�[0m is running at �[1m�[36mhttps://<hostname>:9090�[0m
[<hostname>] out:   * To install additional capsule on separate machine continue by running:"
[<hostname>] out: 
[<hostname>] out:       capsule-certs-generate --capsule-fqdn "�[1m�[36m$CAPSULE�[0m" --certs-tar "�[1m�[36m~/$CAPSULE-certs.tar�[0m"
[<hostname>] out: 
[<hostname>] out:   The full log is at �[1m�[36m/var/log/katello-installer/katello-installer.log�[0m
[<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 �[1mpuppet-foreman_scap_client�[m� 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
Copy link
Member Author

jhutar commented Jul 26, 2015

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
Copy link
Contributor

elyezer commented Jul 27, 2015

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
Copy link
Contributor

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
Copy link
Member Author

jhutar commented Jul 27, 2015

Makes perfect sense @elyezer and @sthirugn. Thanks.

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

@jhutar jhutar closed this as completed Jul 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants