Apply fix for bug in 8.3.1 - No Disk serial in GUI

Status
Not open for further replies.

Sir.Robin

Guru
Joined
Apr 14, 2012
Messages
554
I just spotted a bug in 8.3.1 wich seems to already been fixed. The GUI does not show serials.

According to this - Changeset 9123375:
http://support.freenas.org/changeset/9123375d#file0

It's already fixed!! :)

So can anyone explain how exactly i apply this fix?
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,402

Sir.Robin

Guru
Joined
Apr 14, 2012
Messages
554

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,402
How you know there will be a p1? :p
It's an open source project and it was mentioned, using that language, in the commits. They also show up under the Timeline on support.freenas.org.
 

Sir.Robin

Guru
Joined
Apr 14, 2012
Messages
554
Couldn't resist fiddling with it... so i finally found the notifier.py file and found a way to edit it! :)

Serials are now showing :cool:
 

Sir.Robin

Guru
Joined
Apr 14, 2012
Messages
554
For the qurious of you, here's what i did (and yes i'm a noob at freebsd):

WARNING: You're messing with system files and may render your FreeNAS useless for all i know. If you don't wan't to risk it, do as paleoN suggested: WAIT for the p1.

Official Fix: http://support.freenas.org/changeset/9123375d#file0

It's a syntax error in line 3591 : search = re.search(r'^Serial Number:[ \t\s]+(?P<serial>.+)', output, re.I)

Exchange it with: search = re.search(r'Serial Number:\s+(?P<serial>.+)', output, re.I)


The file system is read only so you can't just edit or overwrite the notifier.py file.

1. ssh in with root
2. cd /usr/local/www/freenasUI/middleware
3. make filesystem writeable: mount -uw / --> it's now writeable for root user
4. WinSCP with root user and go to /usr/local/www/freenasUI/middleware here is the notifier.py file
5. transfer notifier.py to local disk and open and edit it in a text editor (i used notepad++).
6. Save file and use WinSCP to transfer it back, overwriting the old one.
7. Close WinSCP
8. Make filesystem read only again in ssh session: mount -ur /
9. reboot freenas

Don't blame me if you mess it up though ;)
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,402
Or:

  1. ssh in with root
  2. mountrw /
  3. vi /usr/local/www/freenasUI/middleware/notifier.py
  4. /usr/local/etc/rc.d/django stop
    /usr/local/etc/rc.d/django start
  5. mount -ur -onoatime /

The -p1 is now unofficial, by the way.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
I'd just like to add my conservative comment in here. When p1 actually hits(if it hits) I'd still recommend people upgrade even if they apply this just in case you made a mistake with this edit and deleted/added an extra character or line you didn't mean to. Better to be safe than sorry.
 

Sir.Robin

Guru
Joined
Apr 14, 2012
Messages
554
Or:

  1. ssh in with root
  2. mountrw /
  3. vi /usr/local/www/freenasUI/middleware/notifier.py
  4. /usr/local/etc/rc.d/django stop
    /usr/local/etc/rc.d/django start
  5. mount -ur -onoatime /

The -p1 is now unofficial, by the way.


Nice :) What does mount -ur -onoatime / do?
 

Sir.Robin

Guru
Joined
Apr 14, 2012
Messages
554
Oh... and when i edit a file... with cli or WinSCP, all files get copied with .pyc ending automatically. Security function?
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,402
Oh... and when i edit a file... with cli or WinSCP, all files get copied with .pyc ending automatically. Security function?
No, it's python.

When p1 actually hits(if it hits) I'd still recommend people upgrade even if they apply this just in case you made a mistake with this edit and deleted/added an extra character or line you didn't mean to. Better to be safe than sorry.
There's more important reasons to upgrade and simply don't delete extra things or make a patch.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
I made the comment under the "worst case" that p1 has only that fix and a bunch of people choose not to upgrade because they consider themselves to have that patch anyway.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
-p1 will also include a SAMBA update and some other fixes so as CyberJock says, update when it comes out if you want to have the other updates.
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,402
-p1 will also include a SAMBA update and some other fixes so as CyberJock says,
Among others. ;)

update when it comes out if you want to have the other updates.
The main reason they rolled -p1: 5. Reset the passphrase and warn the use when extending an encrypted volume. This one as well: 3. Fix a kernel panic when the plugin jail is used with a lagg interface. Along with the others.
 
Status
Not open for further replies.
Top