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

Cannot change server's network role? #474

Closed
sjml opened this issue Apr 11, 2022 · 17 comments
Closed

Cannot change server's network role? #474

sjml opened this issue Apr 11, 2022 · 17 comments
Labels

Comments

@sjml
Copy link

sjml commented Apr 11, 2022

I may be misunderstanding how this panel in the admin console works... from what I can tell in the code, the network role gets set by analyzing what is available on different interfaces, not from the console?

I currently have a Raspberry Pi 4 with its access point disabled and connected to the internet via its ethernet port. But it always comes up in "Gateway" mode instead of "Appliance." I've tried changing the radio button, saving the configuration, and doing "Install Configured Options" but every time I reboot it still comes up as "Gateway." Is there some other way I need to be changing this option?

It's probably not horrible to be set as a Gateway in this instance, but I'm trying to see if I can just have it sit on the network as its own machine without caring about a broader role.

Thanks for whatever help you can offer.

@holta
Copy link
Member

holta commented Apr 11, 2022

@sjml can you please run sudo iiab-diagnostics and post the resulting sprunge.us URL here?

Thank You!

@sjml
Copy link
Author

sjml commented Apr 11, 2022

Thanks for your quick response! The diagnostics are up here. I'm sure this is just something I'm misunderstanding, but appreciate you taking a look.

@tim-moody
Copy link
Contributor

As IIAB is installed various configuration values are written to /etc/iiab/iiab.ini, one of which is [computed_network]-> iiab_network_mode. This is then assigned to network mode in Admin Console. So the question is why does yours say Gateway, whereas the one I am looking at says Appliance. Mine is a VM.

@tim-moody
Copy link
Contributor

The other comment to make is that the radio buttons in Admin Console represent the user's wishes, but they may not be possible. The network functions try to implement those wishes and they fall back to what is deemed possible. For some reason those functions seem to think Gateway describes your configuration.

@sjml
Copy link
Author

sjml commented Apr 11, 2022

Is there a way to debug the process of computing the network? Do I need to disable the WiFi entirely, rather than just turning off the AP?

@tim-moody
Copy link
Contributor

Look at /opt/iiab/iiab/iiab-network.log. Add 'computed_network' variable values to /etc/iiab/iiab.ini

You can narrow the search by running iiab-network in /opt/iiab/iiab after any changes

@jvonau
Copy link
Contributor

jvonau commented Apr 11, 2022

'gui_desired_network_role' is not part of what admin_console writes to the bottom of local_vars.yml when ICO is selected, that is what forces the user override see https://github.com/iiab/iiab/blob/master/roles/network/tasks/computed_network.yml#L54-L95

/# IIAB -- following variables are first set by browser via the Admin Console
/# They may be changed via text editor, or by the Admin Console.
hostapd_enabled: False
gui_static_wan: False
gui_static_wan_ip: 172.29.3.86
gui_static_wan_netmask: 255.255.255.0
gui_static_wan_gateway: 172.29.3.254
gui_static_wan_nameserver: 172.29.3.254
use_cache: False
adm_cons_force_ssl: False

@tim-moody
Copy link
Contributor

Think you are right. Must be quite an old regression. Possibly home_url as well.

@holta
Copy link
Member

holta commented Apr 11, 2022

Thanks so much @sjml for helping us work through this.
Hopefully this can be made understandable for everyone, and you can help us verify shortly.

Aside: Are you in Lebanon?

@jvonau
Copy link
Contributor

jvonau commented Apr 11, 2022

Is there a way to debug the process of computing the network? Do I need to disable the WiFi entirely, rather than just turning off the AP?

What is a bit confusing is the 'LAN' device (br0) can also used with network bluetooth devices not just hostapd using the WiFi chipset and is left active for that reason unless overridden. A 'gateway' in the truest sense should provide internet access but that is an option controlled by the user, the device layout naming was not changed it is just a representation of the maximum of what could be enabled. In the end what do you want to achieve? I'll wait for a response, your option many not currently be available via the admin-console but is available in the underling network code and possible with entries in local_vars.yml.

@sjml
Copy link
Author

sjml commented Apr 11, 2022

@tim-moody: Think you are right. Must be quite an old regression. Possibly home_url as well.

OK, so just so I'm clear -- sounds like this is a bug, and not something I messed up with my particular setup? (As I said in the original post, this is not blocking me from anything, just want it to be set right as much as possible.)

@holta: Aside: Are you in Lebanon?

Yup! The IIAB units I'm building will go to Iraq, though. (I work in multiple sites around the region.)

@tim-moody
Copy link
Contributor

http://iiab.me/beqaa/ was built quite some time ago, but may be of interest.

@tim-moody tim-moody added the bug label Apr 11, 2022
@tim-moody
Copy link
Contributor

$('#'+ this.name).is(":visible") returns false for fields that are not hidden

@holta
Copy link
Member

holta commented Apr 11, 2022

$('#'+ this.name).is(":visible")

Is this an issue with function setConfigVars () in... ?

if ($('#'+ this.name).is(":visible")){ // install false and undefined are not visible

@tim-moody
Copy link
Contributor

I am in the process of modifying all this to allow installation of roles from adm cons. I would prefer not to fix it here. As @jvonau mentioned the workaround is to set a missing variable in /etc/iiab/local_vars.yml and then run ansible.

@tim-moody
Copy link
Contributor

This is expected to be addressed by #475

@tim-moody
Copy link
Contributor

closing. please reopen if problem persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants