Build internal repo to upgrade from 9.3-stable to 11.1-u7

fds09w4jih4r

Dabbler
Joined
Apr 4, 2019
Messages
44
For reasons beyond our control, the 9.3 refuses to work with our internal proxy servers for update checking. I've some manual update methods without much luck. So it seems like using an internal repo to update would be best. Any ideas or guidance on how to make an internal repo of 11.1u7 and point our freenas servers to it? Servers on 11.1 already update fine, so no changes needed there. Thanks...!
 

fds09w4jih4r

Dabbler
Joined
Apr 4, 2019
Messages
44
We may have to revisit that manual shell upgrade..... But I spent a bunch of time hacking away and couldn't get it to work properly... Seems at one point manual update was removed and then added back in again.. So unsure if 9.3-stable is able to update via shell or not... We could automate the copying of the file and then kick the update and reboot as needed after...
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
So, naively - could you:
- Copy the contents of http://update.freenas.org/FreeNAS/ to a local server
- Instruct your DNS (the one your FreeNAS boxen use, presumably internal / under your control) to lie and point them towards that server for update.freenas.org?

Alternatively you may be able to do a /etc/hosts entry on FreeNAS temporarily to make sure it uses that server, if you don’t want to muck with DNS. Probably a good idea at any rate on at least one box before mucking with DNS, to make sure your repo clone works.

And then back out the DNS change once update has been done.
 

fds09w4jih4r

Dabbler
Joined
Apr 4, 2019
Messages
44
Interesting idea... While we don't have control over the wider company DNS, we could either spin our own and script adding that into freenas or just modify all the /etc/hosts temporarily, run the update from shell and reboot as needed after... all by script...

I'll do some R&D around this idea...
 
Joined
Jul 3, 2015
Messages
926

fds09w4jih4r

Dabbler
Joined
Apr 4, 2019
Messages
44
I did play a bunch with a version of 9.x which refused to update when I was trying that... I'm going to revisit that option since it seems the simplest...
 

fds09w4jih4r

Dabbler
Joined
Apr 4, 2019
Messages
44
Have you tried copying the FreeNAS-11.1-U7-manual-update.tar file to /var/tmp/ and then run "freenas-update FreeNAS-11.1-U7.tar" and after it finishes reboot?

Seems that syntax doesn't work, this was my problem before I think...

I tried:

freenas-update FreeNAS-11.1-U7.tar
freenas-update update FreeNAS-11.1-U7.tar
freenas-update FreeNAS-11.1-U7.tar update

No go...
 

Attachments

  • Screenshot 2019-04-05 at 11.52.27.png
    Screenshot 2019-04-05 at 11.52.27.png
    50.7 KB · Views: 328
Joined
Jul 3, 2015
Messages
926
That's a shame. Works fine in vers11 so must be a 9.3 thing.

I guess you've tried "freenas-update -v update" although given your proxy server issue I doubt this will work.
 
Joined
Jul 3, 2015
Messages
926

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
If that DNS trickery works, by the way, it’s a good argument for putting freenas.org on DNSSEC. DNS hijacking is a thing and, while useful in this case, shouldn’t be able to succeed. That’s a way to introduce malicious code to FreeNAS users. The /etc/hosts override would still work even with DNSSEC as far as I understand it.
 

fds09w4jih4r

Dabbler
Joined
Apr 4, 2019
Messages
44
Yeah, that's a good tip/idea... It would be an ideal thing to hijack if I may be honest.. Introduce some nice code which could start wiping people's stuff out... Scary stuff...
 

fds09w4jih4r

Dabbler
Joined
Apr 4, 2019
Messages
44
So, naively - could you:
- Copy the contents of http://update.freenas.org/FreeNAS/ to a local server
- Instruct your DNS (the one your FreeNAS boxen use, presumably internal / under your control) to lie and point them towards that server for update.freenas.org?

Alternatively you may be able to do a /etc/hosts entry on FreeNAS temporarily to make sure it uses that server, if you don’t want to muck with DNS. Probably a good idea at any rate on at least one box before mucking with DNS, to make sure your repo clone works.

And then back out the DNS change once update has been done.


Any suggestion on how to easily make a repo of http://update.freenas.org/FreeNAS/ on my local lab storage node..? Downloading one by one on a browser isn't viable.. Is this repo available in FTP perhaps?
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
A script and wget?
 

fds09w4jih4r

Dabbler
Joined
Apr 4, 2019
Messages
44
There is more then meets the eye here:

[root@n32c01nas008] /# freenas-update -v check
TryGetNetworkFile([u'http://update-master.freenas.org/FreeNAS/FreeNAS-9.3-STABLE/LATEST'])
TryGetNetworkFile([u'http://update-master.freenas.org/FreeNAS/FreeNAS-9.3-STABLE/LATEST']): Read 8325 bytes total
TryGetNetworkFile(['https://web.ixsystems.com/updates/ix_crl.pem'])
Unable to load https://web.ixsystems.com/updates/ix_crl.pem: <urlopen error [Errno 60] Operation timed out>
Unable to load ['https://web.ixsystems.com/updates/ix_crl.pem']: <urlopen error [Errno 60] Operation timed out>
<urlopen error [Errno 60] Operation timed out>
Received exception during download phase, cannot update

So I need to play more and different DNS tricks...
 
Top