-
Notifications
You must be signed in to change notification settings - Fork 43
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
Added proxy setup service #696
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, it looks good. However, I miss better documentation and tests.
An image can be tested from https://download.opensuse.org/repositories/home:/teclator:/branches:/systemsmanagement:/Agama:/Devel/images/iso/ |
service/lib/agama/proxy_setup.rb
Outdated
def write | ||
return unless proxy | ||
|
||
Proxy.Read |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that the tool will merge with any existing proxy configuration?
We should document it if it's intentional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently it follows the same approach we have for YaST based installers (https://github.com/yast/yast-network/blob/master/src/lib/network/install_inf_convertor.rb#L80).
So, it merges the configuration but in most of the cases it should be empty. I guess by now we could just write what is defined instead of merging it as we are not doing any upgrade or something like that where an existent config could be useful at all.
Applied fixes suggested from code review Co-authored-by: Martin Vidner <[email protected]>
Co-authored-by: Martin Vidner <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good. However I am not sure if we should keep the indentation in the setup-service.sh
script.
This reverts commit 37196ad.
Co-authored-by: Imobach González Sosa <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, sorry, I forgot about the changes file. Please, add an entry and do not forget the bsc and/or github references.
Problem
Currently Agama does not have support for setting up a proxy
In case of a network installation dracut url lib uses the one provided by the kernel command line option:
https://github.com/openSUSE/dracut/blob/5e324584a14377f52425be589ab53299609f066b/modules.d/45url-lib/url-lib.sh#L62
We should write a service that continue writing the /etc/sysconfig/proxy and use the microos-tools proxy setup service to make it available to the systemd units if we wanted, or own systemd service to do that before running agama.
The service should read the /proc/cmdline in case it was given as a kernel commandline option or check the configuration written by dracut when asking for more kernel paramaters
Solution
An agama-proxy-setup service and executable will take care of parsing the /proc/cmdline writing the information to /etc/sysconfig/proxy
The setup-systemd-proxy-env path provided by microos-tools is enabled in order to write the information as environment variables to systemd units.
See https://build.opensuse.org/package/rdiff/home:teclator:branches:systemsmanagement:Agama:Devel/agama-live?opackage=agama-live&oproject=systemsmanagement%3AAgama%3ADevel&rev=5
Testing