[(not quite)SOLVED] Storage Disks - DataTables warning

Hi,

I have build my first NAS Server. My first idea was to start with FreeNAS but i don’t like the hardware specs from ZFS, since i want to use my NAS Server not only for serving files. So my background knowledge is very limiteted especially becaus i am normally only working with windows.

I installed Rockstor and was able to create my pool with 5 x 4 TB WD RED as a RAID5 (i know its not stable but i am willing to give it a try :slight_smile: )
But on the web interface: Storage -> Disks Page i received the following error message every time i get on it:
DataTables warning: table id=disks-table - Cannot reinitialise DataTable. For more information about this error, please see http://datatables.net/tn/3

i get the error message multiple times an must click it away 20 times or more and I receive a similiar message under every other point from Storage Menue here from Storage -> Shares:
DataTables warning: table id=shares-table - Cannot reinitialise DataTable. For more information about this error, please see http://datatables.net/tn/3

@kyritrill Welcome to the Rockstor community.

Yes this error has been seen on occasions and is usually resolved by simply closing your browser / browser tab and starting a fresh session. At least on the occasions I’ve seen it. To properly sort we need a reproducer and to date we haven’t found one (it appears to be a rare and rather intermittent issue). See how the browser suggestion goes and if it sorts things for you. It seems that once the warning appears it’s sticky until your session is ended and a fresh one started.

Hope that helps.

2 Likes

@phillxnet
Closing the browser and deleting the cache has helped!

I would not have thought of such a simple solution :smile:

@kyritrill Great, thanks for the confirmation and glad it worked for you. It’s more of a work around really but to sort properly we need a way to reliable reproduce this behaviour.

Rockstor does a bunch of it’s UI magic via java script running in the browser so on occasions that code and the back-end code running on the Rockstor machine itself seems to get into this ‘out of kilter’ scenario.

Oh well; easily sorted/‘worked around’ for the time being.

ROCKSTOR 3.9.2-5 - Stable
This error is still happening. And its getting re-initialized over and over again, so the error gets queued about 10 times, which I then have to click cancel each time on the alert modal.

You’re getting this error because you’re not checking if the table has been initialized already before calling renderDataTables()

Add this to your function to fix it:

renderDataTables: function(customs) {
   var DataTable_obj = {
      'iDisplayLength': 15,
      'aLengthMenu': [
         [15, 30, 45, -1],
         [15, 30, 45, 'All']
      ],            
   };

    if (typeof customs == 'object'){
       _.extend(DataTable_obj, customs);
    }
   
    // Make sure i'm not a DataTable already...
    if ( ! $.fn.DataTable.isDataTable( 'table.data-table' ) ) {
       $('table.data-table').DataTable(DataTable_obj);
    } else {
       $('table.data-table').DataTable().ajax.reload( null, false );      
    }
},

@wwwizzarrdry Hello again.
This can happen if you haven’t refreshed your browser for a bit. Try pressing the browser refresh button and see if it clears up.
Hope that helps.

Haha, I’m no stranger to letting my end users know, “Its not a bug, its a feature!” I use datatables in all of my projects. If you don’t want to perform the check to fix the issue, you could at least let it fail quietly like so:

$.fn.dataTable.ext.errMode = 'none';

$('table.data-table').on( 'error.dt', function ( e, settings, techNote, message )  {
   console.log( 'An error has been reported by DataTables: ', message );
} ) ;

@wwwizzarrdry I only very rarely see this message myself and a browse refresh always sorts it for me, but if you fancy doing a pr it would be more than welcome. I’d assumed you had cut and past the recommended code from the link that appears when this message is displayed :slight_smile: . I haven’t myself done much with datatables in Rockstor or elsewhere except the odd little fix so I’m less inclined to look to this myself. Plus I’m a little tied up with a quotas behaviour thing currently.

Thanks for the pointers and you might find the following of use if you do end up having a go at this (which would be great) Contributing to Rockstor - Overview and specifically the Developers subsection. In any case do please feel free to create a GitHub issue explaining your understanding of this bug and linking back to this thread as it would be good to be better behaved, if possible, on this one.

Thanks.

@wwwizzarrdry

Just been dabbling with datatables for an in progress replication issue fix. From that little adventure it looks like our central definition of renderDataTables is in RockstorLayoutView here:

Just so that if anyone has a reliable reproducer of the above datatable issue they / we can test @wwwizzarrdry suggestion to see how it sits within Rockstor’s datatable use.

Hope that helps as it would be a nice one to get sorted.

Not sure about reviving this topic but I am getting the same warning
Data%20Tables%20warning
This is in the latest Rockstor updates on V4 15th Dec 21
Refreshing the browser does seem to remove it.

@Mike-B Yes, I’ve seen this occasionally myself still.

The work-around for now is to refresh the browser as there is occasionally some disconnect between sections of code that runs within the browser. What we need is a reliable way to reproduce this repeatedly. That way we can narrow down the exact series of events that least to this.

I.e. from a browser that has no knowledge of the Rockstor Web-UI (cleared cache for the Web-UI) a set of steps that reproduces this every time would be perfect.

Relevant here is that our soon to be release testing branch, post our first v4 stable, will re updating all technologies that we rely on. With Django and it’s cohorts as the first contender. From there we will be updating everything as we work our way through to then using Python 2 -> 3. So we may end up squashing this sporadic and difficult to reliable reproduce irritating issue.

Thanks again for your input and do let us know if you can reliable reproduce this, along with exactly how. And ideally from a browser that has no prior knowledge of the Web-UI (i.e. has never visited it or has had all relevant cache removed). Then we can prove our fix.

Hope that helps, at least to express where we are on this long standing anomaly. And thanks again for confirming it in our latest v4 offerings. We haven’t changed much in the way of those elements that migtht lead to this more just the OS related elements and a tone of bug fixes. But the DataTables arrangements/use is pretty much as-was from our last v3 offering. All in good time and a reproducer would be great. Cheers.

3 Likes