Re: How to set a HTTP proxy for sysupgrade

2021-07-02 Thread Raimo Niskanen
On Thu, Jul 01, 2021 at 09:34:32AM -0400, trondd wrote:
> On Thu, July 1, 2021 4:25 am, Raimo Niskanen wrote:
> > On Wed, Jun 30, 2021 at 09:23:15PM -0400, trondd wrote:
> >>
> >> I simply echo the export statements of the proxy environment variables
> >> to
> >> /etc/rc.firstime before reboot. The installer will always append to the
> >> file so fw_update will be added after the variables are exported.
> >
> > I will try to remember to do that the next time.
> > Thanks for the hint!
> >
> > Would that be a welcome addition to the installer to do this
> > automatically?
> >
> >
> 
> The installer can't do it.  Sysupgrade pulls the sets down and so the
> automated installation does not use the network.  It won't know if there
> is a proxy configuration to pass to rc.firsttime.
> 
> I suppose sysupgrade can check the environment for the variables and write
> them out to rc.firsttime if they are set.

I will try to explore that possibility next time I upgrade - had the same
idea.  Then send a patch suggestion when the change is tested.


> 
> I just have a wrapper script because I also have internally hosted site
> tarballs that need the proxy disabled to access so it was just easier to
> have my own script to enable and disable the proxy as needed for the steps
> I need to take.  I suppose that's why I never thought to try modifying
> sysupgrade.  In my environment, I would still need the script regardless.
> 
> Tim.

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB



Re: How to set a HTTP proxy for sysupgrade

2021-07-01 Thread trondd
On Thu, July 1, 2021 4:25 am, Raimo Niskanen wrote:
> On Wed, Jun 30, 2021 at 09:23:15PM -0400, trondd wrote:
>>
>> I simply echo the export statements of the proxy environment variables
>> to
>> /etc/rc.firstime before reboot. The installer will always append to the
>> file so fw_update will be added after the variables are exported.
>
> I will try to remember to do that the next time.
> Thanks for the hint!
>
> Would that be a welcome addition to the installer to do this
> automatically?
>
>

The installer can't do it.  Sysupgrade pulls the sets down and so the
automated installation does not use the network.  It won't know if there
is a proxy configuration to pass to rc.firsttime.

I suppose sysupgrade can check the environment for the variables and write
them out to rc.firsttime if they are set.

I just have a wrapper script because I also have internally hosted site
tarballs that need the proxy disabled to access so it was just easier to
have my own script to enable and disable the proxy as needed for the steps
I need to take.  I suppose that's why I never thought to try modifying
sysupgrade.  In my environment, I would still need the script regardless.

Tim.



Re: How to set a HTTP proxy for sysupgrade

2021-07-01 Thread Raimo Niskanen
On Wed, Jun 30, 2021 at 09:23:15PM -0400, trondd wrote:
> On Wed, June 30, 2021 5:28 am, Raimo Niskanen wrote:
> > Hello list!
> >
> > I just upgraded one of our lab machines from 6.8 to 6.9
> > (amd64), and our lab environment is closed to the Internet,
> > so using an HTTP proxy is required to reach out.
> >
> > I have set http_proxy, ftp_proxy and https_proxy in
> > /etc/login.conf, the default class, but it is apparently
> > not used by rc.firstboot after sysupgrade.
> >
> > With the new installer in 6.9 rc.firstboot seems to be
> > a background process that hangs because of this, so when I
> > logged in as root after remote upgrade I resolved the stalemate
> > by first killing an ftp job serving fw_update, then a similar
> > download job serving syspatch, and waited until the not updated
> > kernel was relinked.
> > Then I could run fw_update and syspatch manually.
> >
> > Is there a better / proper way to set a HTTP/HTTPS proxy
> > for sysupgrade?
> >
> > Cheers
> > --
> >
> > / Raimo Niskanen, Erlang/OTP, Ericsson AB
> >
> 
> I simply echo the export statements of the proxy environment variables to
> /etc/rc.firstime before reboot. The installer will always append to the
> file so fw_update will be added after the variables are exported.

I will try to remember to do that the next time.
Thanks for the hint!

Would that be a welcome addition to the installer to do this automatically?


> 
> The ftp process will timeout in, I think, 5 minutes.  That is a long time,
> but you're not going to be hung there forever.
> 
> Tim.

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB



Re: How to set a HTTP proxy for sysupgrade

2021-06-30 Thread trondd
On Wed, June 30, 2021 5:28 am, Raimo Niskanen wrote:
> Hello list!
>
> I just upgraded one of our lab machines from 6.8 to 6.9
> (amd64), and our lab environment is closed to the Internet,
> so using an HTTP proxy is required to reach out.
>
> I have set http_proxy, ftp_proxy and https_proxy in
> /etc/login.conf, the default class, but it is apparently
> not used by rc.firstboot after sysupgrade.
>
> With the new installer in 6.9 rc.firstboot seems to be
> a background process that hangs because of this, so when I
> logged in as root after remote upgrade I resolved the stalemate
> by first killing an ftp job serving fw_update, then a similar
> download job serving syspatch, and waited until the not updated
> kernel was relinked.
> Then I could run fw_update and syspatch manually.
>
> Is there a better / proper way to set a HTTP/HTTPS proxy
> for sysupgrade?
>
> Cheers
> --
>
> / Raimo Niskanen, Erlang/OTP, Ericsson AB
>

I simply echo the export statements of the proxy environment variables to
/etc/rc.firstime before reboot. The installer will always append to the
file so fw_update will be added after the variables are exported.

The ftp process will timeout in, I think, 5 minutes.  That is a long time,
but you're not going to be hung there forever.

Tim.