-
Notifications
You must be signed in to change notification settings - Fork 19
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
How to use mgrctl to call spacecmd? #460
Comments
Can you try the all part for spacecmd should be in quotes. |
That outputs the expected response below - pathing to spacecmd's not a problem. However, any operation that requires spacecmd to talk to the API fails, because there is no network routing from the container to the https:// api I have found a workaround for myself and this issue - I have installed spacecmd from the EPEL repos onto a different vm entirely, running Rocky 8. Spacecmd from there can talk to the Podman Uyuni's API perfectly, so I've moved my automations across to that. So I'm sorted - but happy to help test further if required for the benefit of others. Requested output:
Example of output that requires spacecmd to reach the API:
|
spacecmd from within container has to talk to localhost otherwise it is triggering hairpin problem. Do you happen to have some custom configuration for spacecmd?
|
Aha! That was the missing piece. This is now working, but needed a couple of extra hoops jumped through.
THAT is what works! spacecmd appears to default to https://, which is not being provided on localhost. The other commands in spacecmd are now working as expected as well, so thanks for helping clear up that puzzle. I do think better documentation could have saved some wasted time here, but appreciate it's not possible to cover everything, and I hope this issue helps other spacecmd users. Feel free to close this, or re-assign to the docs team if they're able to add a paragraph about how to use spacecmd in containers - or adapt the existing spacecmd documentation that is now misleading. Thank you Sample contents of
|
Indeed it's not documented and should be, particularly for spacecmd when used from the container environment. When spacecmd is used from somewhere else, then there should be no change. There were quite a lot of changes particularly related to change of internally using localhost instead of fqdn. However for the future I am afraid we will need to change this once more. When new containers will be introduced and product split up, we'll again need to change internal hostname to something else then localhost. |
Have migrated 2024.08 to Podman.
One issue I have is that I wish to use Spacecmd to schedule various events as I did pre-containers. I thought I could use mgrctl to do so, but it seems there are problems here.
Eg:
Sometimes I can get partial replies, without the --, like
I have tried specifying credentials and a server with
mgrctl exec -- "spacecmd -u validuser -p password -s uyuni01.fqdn"
and variations of, but again, not able to get spacecmd to do anything but reply to help.If I try "mgrctl term" to open a terminal in the container and use that, then
Followed by a long pause before I get the failure to reach api again.
Anyone able to help, please?
The text was updated successfully, but these errors were encountered: