Conversation
|
Changes unknown |
imobachgs
left a comment
There was a problem hiding this comment.
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.
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.
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 <mvidner@suse.cz>
Co-authored-by: Martin Vidner <mvidner@suse.cz>
imobachgs
left a comment
There was a problem hiding this comment.
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 <igonzalezsosa@suse.com>
imobachgs
left a comment
There was a problem hiding this comment.
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