Forum Discussion

jonathan_239725's avatar
jonathan_239725
Icon for Nimbostratus rankNimbostratus
Apr 05, 2017

Error every time I load a tar ball as a iRulesLX workspace

I keep receiving a "Data Input Error: Error: tar file is not in correct format. Expected to find directories extensions and rules" error every time I load a .tgz to create a new iRulesLX workspace. I know the original workspace tarball works FINE. The only thing I have changed is adding another node module to the node_modules directory. I have updated the package.json to include the new module's name. I'm new to iRuleLX and am probably missing something obvious.

 

Thanks

 

2 Replies

  • I believe you saw the following error message in /var/log/ltm:

    Jul 24 14:06:05 ltm1212 err tmsh[22884]: 01420006:3: Error: tar file is not in correct format. Expected to find directories extensions and rules
    

    This happens when the tar file is created starting from a different directory. An archive file (

    tgz
    ; the extension can also be
    tar.gz
    ) must start from . (dot) under the workspace directory. e.g.,

     tar ztvf sat.tgz
    drwsrwsrwx user/group        0 2017-07-24 12:57 ./
    drwsrwsrwx user/group        0 2017-07-24 13:56 extensions/
    drwsrwsrwx user/group        0 2017-07-24 13:54 extensions/MyEXT2/
    -rwSrwSrw- user/group      198 2017-07-24 13:07 extensions/MyEXT2/index.js
    -rwSrwSrw- user/group      198 2017-07-24 13:54 extensions/MyEXT2/index.js
    -rwSrwSrw- user/group      197 2017-07-24 13:06 extensions/MyEXT2/index.js~
    ....
    

    The one below is invalid as it includes the workspace directory (here MyWS2):

    C:\temp\MyWS>tar ztvf sat2.tar.gz 
    drwsrwsrwx user/group        0 2017-07-24 12:57 MyWS2/
    drwsrwsrwx user/group        0 2017-07-24 13:56 MyWS2/extensions/
    drwsrwsrwx user/group        0 2017-07-24 13:54 MyWS2/extensions/MyEXT2/
    -rwSrwSrw- user/group      198 2017-07-24 13:07 MyWS2/extensions/MyEXT2/index.js
    -rwSrwSrw- user/group      198 2017-07-24 13:54 MyWS2/extensions/MyEXT2/index.js
    

    I hope this would help.

  • Ran into a similar issue. Exported the package, unpacked it, modified it, re-packed it into a .tgz and attempted an upload. Same error.

    From the information in Satoshi Toyosawa's previous post, I copied the 3 things to the root of my local machine: /extensions , /rules and version.

    After my modifications, I then repacked it using gnu-tar*:

    tar -r cvzf new-workspace_ws.tar ./extensions ./rules version

    I was able to re-import the file using the normal method for v12.1.2.1.

    *Note: If you don't use gnu-tar or similar, you're gonna get a bunch of crazy output when you try to re-import via the GUI and it will obviously fail:

    /bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
    /bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
    ----
    err:console buffer full
    

    -Additionally-

    Working with the files locally on the LTM through the bash prompt, I simply copied the files to a new directory, made my modifications via vi and used "chmod -R 777" to make sure the copied files have all the necessary rights. If not, you will not be able to modify them in the GUI since the user rights used to copy are different.

    [root@BigIP:Active:Standalone]/ cd /var/ilx/workspaces/Common
    [root@BigIP:Active:Standalone]/ cp -r old-workspace_ws/ new-workspace_ws/
    [root@BigIP:Active:Standalone]/ chmod -R 777 new-workspace_ws/
    

    Make all your changes as you wish. Through the GUI or via bash. Then make your new plugin and attach it to the new workspace.