-
Notifications
You must be signed in to change notification settings - Fork 23.8k
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
Fix reboot plugin not working in Illumos/Solaris #48986
Conversation
Hi @jpdasma, thank you for submitting this pull-request! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
9b69802
to
ec6e78b
Compare
rebased to retrigger build |
Error in CI is not related to Solaris/Illumos. |
Thank you for reporting this. I'm curious which version of Solaris this is that doesn't have the |
hi, i tested this on OpenIndiana. I think both should be the same as Solaris 11. (well at least based on Oracle's online man page). I'll deploy later a Solaris 11 VM to verify. |
Tribblix (another Illumos distro) also doesn't have a "-r" as flags |
Hi, seems I am wrong, Solarias 11 (at least 11.4) as the "-r" flag. For Illumos based, I have verified that OpenIndiana (Hipster 2018.10 version) still doesn't have a "-r" flag. Maybe they stuck with the old shutdown from Solaris 10? (Although I still haven't touch a Solaris 10 box) Maybe a separate Illumos classification is needed? |
@jpdasma That aligns with my testing on Solaris 10 and Solaris 11. I tested on Solaris 11, but the command you suggest in this PR seems to work for Solaris 10. Can you test with #49272? I would also appreciate the output of |
Hi, this is my result:
This is for OpenIndiana, for Tribblix, I don't have access to the machine I tested at the moment. |
That is helpful. Could you add the |
This is for Tribblix
For ansible_os_familty:
|
OmniOS and OpenIndiana:
|
Thank you. This is very helpful. |
@samdoran working fine on my end thanks! |
SUMMARY
Using the reboot plugin under OpenIndiana results in the following error:
"msg": "Shutdown command failed. Error was /usr/sbin/shutdown: -r: unknown option\r\nUsage: /usr/sbin/shutdown [ -y ] [ -g ] [ -i ] [ message ], Shared connection to 192.168.122.146 closed.",
The issue is that the command being called is wrong (
shutdown -y -g {delay_sec} -r "{message}"
) for Solaris/Illumos based system.As specified here https://docs.oracle.com/cd/E23824_01/html/821-1451/gldpm.html and the manpages for OpenIndiana, there is no "-r" argument for shutdown. Also, based on the manpages, -i (init-state) defaults to single user mode, which means that the system would fail to start again.
ISSUE TYPE
COMPONENT NAME
reboot.py
ADDITIONAL INFORMATION
By default, there is no
whoami
installed in OpenIndiana. This would make the DEFAULT_TEST_COMMAND to fail. Should I file an issue for this? Or could I fix this here?