Closed yamashin55 closed 2 years ago
Hi @yamashin55, the cli was for a corner case and I wasn't sure if it was being used or not so I haven't touched it in a while. Can you try to explore that ucs in the vscode-f5 extension?
Below is the log executed from VS Code with "vscode -f5 extension". It seems to be successful halfway, but the same error "Type Error: Cannot read property'internal' of undefined" is output.
1030 [2022-02-02T05:04:34.001Z] [INFO]: f5.cfgExplore, extracting apps
1031 [2022-02-02T05:04:34.078Z] [INFO]: f5.cfgExplore, extraction complete
1032 [2022-02-02T05:04:34.078Z] [INFO]: {
objectCount: 2145,
sourceSize: 5617264,
objects: {
virtuals: 152,
profiles: 6,
pools: 78,
irules: 5,
monitors: 1,
nodes: 138
},
sourceTmosVersion: '16.1.2.1',
parseTime: 636.5138,
appTime: 72.1651,
packTime: 4.4463
}
1033 [2022-02-02T05:04:34.085Z] [ERROR]: --- unhandledRejection --- [TypeError: Cannot read property 'internal' of undefined
at /home/ubuntu/.vscode-server/extensions/f5devcentral.vscode-f5-3.5.0/node_modules/f5-corkscrew/dist/digConfigs.js:297:79
at Generator.next (
Thanks. That helps. It seems it did not pick up any data-groups. I implemented a fix, but this may be a bigger problem with newer v16.1 code. Please try with the latest 0.9.3 release and let me know the outcome.
A similar error was output.
~/work$ corkscrew --version
0.9.3
-- 29 [2022-02-02T16:42:41.464Z] [INFO]: f5.cfgExplore path revieved: /home/ubuntu/work/f5-corkscrew/16.1.2.1_lb1_Dynad_Key_01.ucs 30 [2022-02-02T16:42:41.464Z] [INFO]: f5.cfgExplore: exploding config @ /home/ubuntu/work/f5-corkscrew/16.1.2.1_lb1_Dynad_Key_01.ucs 31 [2022-02-02T16:42:41.465Z] [INFO]: f5.cfgExplore, opening archive 32 [2022-02-02T16:42:41.505Z] [INFO]: f5.cfgExplore, parsing file -> config/bigip_base.conf 33 [2022-02-02T16:42:41.600Z] [INFO]: f5.cfgExplore, parsing file -> config/bigip.conf 34 [2022-02-02T16:42:41.755Z] [INFO]: f5.cfgExplore, parsing file -> config/bigip_user.conf 35 [2022-02-02T16:42:42.049Z] [INFO]: f5.cfgExplore, parsing file -> config/bigip.license ..
snip
..
.
1038 [2022-02-02T16:42:42.103Z] [INFO]: f5.cfgExplore, extracting apps
1039 [2022-02-02T16:42:42.198Z] [INFO]: f5.cfgExplore, extraction complete
1040 [2022-02-02T16:42:42.198Z] [INFO]: {
objectCount: 2145,
sourceSize: 5617264,
objects: {
virtuals: 152,
profiles: 6,
pools: 78,
irules: 5,
monitors: 1,
nodes: 138
},
sourceTmosVersion: '16.1.2.1',
parseTime: 637.2313,
appTime: 92.231,
packTime: 1.9678
}
1041 [2022-02-02T16:42:42.199Z] [ERROR]: --- unhandledRejection --- [TypeError: Cannot read property 'internal' of undefined
at /home/ubuntu/.vscode-server/extensions/f5devcentral.vscode-f5-3.5.0/node_modules/f5-corkscrew/dist/digConfigs.js:297:79
at Generator.next (
--
Supplement : VSCode's "CONFIG EXPLOTER" looks like it's confirmed as expected.
The v15.1.4 UCS file did not cause any errors.
Thanks for the feedback. I'll dig into testing this package with v16.1+.
This should be fixed with the latest release. Please confirm
I have uploaded a new version of the "F5 Extension". vscode-f5/3.8.2 As a result, parsing fails for all UCS Version files.
If I revert to the old version, the parsing is successful. Old version : v3.7.1
@yamashin55, this may be more related to the last features added in the vscode-f5 extension. I've released another tweek but i'm not seeing this issue in my lab with a handful of ucs/conf/qkviews. If you are still having problems, we may need to get together so you can show me what is happening. Is the cli working as expected?
@DumpySquare, I've upgraded the version of "vscode-f5 extension" to v3.8.3. I've tested with multiple versions. v12.1, v15.1, v16.1. As a result, all the errors have been resolved! Very great! I was impressed. Thank you for your help!
Awesome! thanks!
When I run "corkscrew", it fails with the following error: I couldn't find a fix. Do you have any idea?
root@ubuntu:/home/ubuntu/f5-corkscrew# corkscrew explode bigip_v16.1.2.1.ucs --no_command_logs > demo.json
/usr/local/lib/node_modules/f5-corkscrew/dist/digConfigs.js:297 const dataGroups = Object.keys(configObject.ltm['data-group'].internal);
TypeError: Cannot read properties of undefined (reading 'internal') at /usr/local/lib/node_modules/f5-corkscrew/dist/digConfigs.js:297:79 at Generator.next ()
at /usr/local/lib/node_modules/f5-corkscrew/dist/digConfigs.js:16:71
at new Promise ()
at __awaiter (/usr/local/lib/node_modules/f5-corkscrew/dist/digConfigs.js:12:12)
at /usr/local/lib/node_modules/f5-corkscrew/dist/digConfigs.js:262:43
at Array.forEach ()
at /usr/local/lib/node_modules/f5-corkscrew/dist/digConfigs.js:262:25
at Generator.next ()
at /usr/local/lib/node_modules/f5-corkscrew/dist/digConfigs.js:16:71
Node.js v17.4.0
root@ubuntu:/home/ubuntu/f5-corkscrew# node --version && npm --version
v17.4.0 8.3.1root@ubuntu:/home/ubuntu/f5-corkscrew# corkscrew --version
0.9.2