-
Notifications
You must be signed in to change notification settings - Fork 899
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
appliance_console should be aware when running in a container #8896
Comments
@gtanzillo I've never found an official answer but I've seen these approaches:
Probably a combination of them would be safer. I hope this helps. |
we can simply add a config value (in container build time) to any chosen config file something like "containerized=true/false" and the appliance console should pick it up on runtime. about which config file to use, Greg just let us know where you want it , and we'll make it happen |
Would you be able to define an env variable at build time? Something like CONTAINERIZED_MIQ? That would be the easiest for us. But, if not, the file would work too. |
@gtanzillo @bazulay we already set one on the current build https://github.com/ManageIQ/manageiq/blob/master/Dockerfile#L2 Please keep in mind that we add this ourselves, my comment above referred to other options that are automatically provided by docker (not set by the image author). |
Franco keep me honest here, but IIRC "ENV container docker" is only available on build time ? |
@gtanzillo @bazulay |
@gtanzillo @bazulay @simaishi @Fryguy As I suspected, option 9 "Configure External Authentication (httpd)" is missing packages, will create a small PR to pull them in and refer to this issue. Take a look below : Configure External Authentication (httpd) ipa-client RPM is not installed Appliance Installation is not valid for enabling External Authentication External Authentication configuration failed! EDIT : These two RPMs bring a lot of deps with them, 82MB of packages added to the image 😞 |
@gtanzillo @bazulay @kbrock I believe in the container environment detection options are :
I'm inclined for 1,2 because we can ensure they are there, 3 and 4 are in Docker area and subject to change (although I hardly see 4 changing) . Thoughts? |
I lean towards 1, but we do tend to have all env variables defined in Is the env lowercase |
I agree option 1, "Author supplied env variable (already in place)" I'd also like to confirm what options should be exposed for now on a container. Do we want to allow the user to set the timezone?
|
Timezone can stay as it does not effect the host the container is running on. |
Please note:
So for the top menus we want to keep for the container, the sub-menus will need to be looked at. |
I'm seeing a slightly different list for appliance_console in manageiq:latest DH image, was your list from the CFME build? Advanced Setting
Choose the advanced setting: Option "extend temporary storage" is not there but there is an extra "update external auth options". |
@fbladilo That's fine with me too. |
This offers a reliable way to check if we are running inside a container. The variable is exported from /etc/default/evm just as the rest of EVM related vars. See discussion on ManageIQ#8896
@fbladilo The menu upstream (MiQ) and downstream (CFME) are different. |
Limit options presented by the appliance_console when running in a container Issue ManageIQ#8896 ManageIQ#8896
@fbladilo @bazulay @gtanzillo Seem I don't have the privs to close this. Can one of you please close it? |
Closing since this is addressed by #9136 |
the appliance_console cli is not fitted to a container,
basically it does all sorts of system administration operations and part of those are not relevant in a container, there for it needs to be container aware, and not to show the none relevant options.
The overview displayed initially
(taken from my env ... removed some details from my env )
Hostname: 43b6d5b76b4f
IP Address: 172.17.0.2
Netmask: 255.255.0.0
Gateway: 172.17.0.1
Primary DNS: -- removed --
Secondary DNS: -- removed ---
Search Order: -- removed --
MAC Address: -- removed --
Timezone: America/New_York
Local Database: running
CFME Database: postgres @ localhost
Database/Region: vmdb_production / 0
External Auth: not configured
CFME Version: 5.6.0.7-beta2.6
CFME Console: https://172.17.0.2
while displaying this data is o.k although some of the information is not relevant (e.g. the ip is internal), changing some of them may be a risk (to the host) or impossible (as the appliance_console crashes when trying to do so). keep in mind that we are still running a --privileged container which might have permissions to mess the host the container is running on
The appliance_console menu
1, 2, 3 should not appear in a container - as network is controlled externally to the container by the infrastructure (and the IP addresses shown are internal)
4 should be hidden - when changing it the appliance_console crashes (but succeeds changing the hostname for the container .. on next execution)
6 should be hidden - as it changes the host time as well
9 should be hidden - as it crashes the appliance_console , and parted is not installed at all (it is very risky to install it in a privileged container)
15 should be hidden - it only causes the container to stop and can't start it again (as this is controlled externally)
I'm not sure about #12
The text was updated successfully, but these errors were encountered: