f5devcentral / f5-automation-config-converter

Convert BIG-IP configs to AS3 and DO declarations
https://clouddocs.f5.com/products/extensions/f5-automation-config-converter/latest/
Apache License 2.0
35 stars 13 forks source link

Failing with v1.11, every prior release worked. #22

Closed vtog closed 3 years ago

vtog commented 3 years ago

Environment

Summary

Testing this with a simple config that worked with every version until v1.11.0.

Steps To Reproduce

Using v1.11.0 I'm seeing the following error. ubuntu@jumpbox:/Downloads/chacon$ sudo docker run --rm -v "$PWD":/app/data f5-as3-config-converter:v1.11.0 -o data/v14-test.json -u data/v14-test.ucs 1169 BIG-IP objects detected total 25 BIG-IP objects recognized by AS3 12 BIG-IP objects supported by ACC 5 AS3 stanzas generated (node:1) UnhandledPromiseRejectionWarning: Error: EACCES: permission denied, open 'data/v14-test.json' at Object.openSync (fs.js:476:3) at Object.writeFileSync (fs.js:1467:35) at module.exports (/app/src/main.js:122:8) at processTicksAndRejections (internal/process/task_queues.js:93:5) (Use node --trace-warnings ... to show where the warning was created) (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. ubuntu@jumpbox:/Downloads/chacon$

Expected Behavior

Using every previous released vesion I get the expected json output. ubuntu@jumpbox:/Downloads/chacon$ sudo docker run --rm -v "$PWD":/app/data f5-appsvcs-acc:1.10.0 -o data/v14-test.json -u data/v14-test.ucs stdout: 1169 BIG-IP objects detected total 25 BIG-IP objects recognized by AS3 12 BIG-IP objects supported by Charon 4 AS3 stanzas generated

ubuntu@jumpbox:/Downloads/chacon$

aheilmaier commented 3 years ago

maybe a related to the one of @vtog Also tried as REST-API service. With version 1.10 lgt (f5-appsvcs-acc:1.10.0)

`$ docker run --rm -v "$PWD":/app/data f5-as3-config-converter:v1.11.0 -o data/as3-out.json -u data/testucsfile.ucs ERROR! DUPLICATE OBJECT NAME DETECTED: abn-2020 exists as both Certificate and Certificate

ERROR! DUPLICATE OBJECT NAME DETECTED: VisaCallback exists as both Certificate and CA_Bundle

ERROR! DUPLICATE OBJECT NAME DETECTED: vali-2021 exists as both Certificate and Certificate

ERROR! DUPLICATE OBJECT NAME DETECTED: vali-2021 exists as both Certificate and Certificate

ERROR! DUPLICATE OBJECT NAME DETECTED: vali-2021 exists as both Certificate and Certificate

ERROR! DUPLICATE OBJECT NAME DETECTED: vali-2021 exists as both Certificate and Certificate

ERROR! DUPLICATE OBJECT NAME DETECTED: vali-2021 exists as both Certificate and Certificate

ERROR! DUPLICATE OBJECT NAME DETECTED: vali-2021 exists as both Certificate and Certificate

ERROR! DUPLICATE OBJECT NAME DETECTED: vali-2021 exists as both Certificate and Certificate

ERROR! DUPLICATE OBJECT NAME DETECTED: VisaCallback exists as both Certificate and CA_Bundle

ERROR! DUPLICATE OBJECT NAME DETECTED: valifc exists as both Certificate and CA_Bundle

(node:1) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'split' of undefined at findSchemaDefault (/app/src/removeDefaultValues.js:40:30) at /app/src/removeDefaultValues.js:62:33 at Array.forEach () at matchDefaults (/app/src/removeDefaultValues.js:60:10) at /app/src/removeDefaultValues.js:80:20 at Array.forEach () at findProfiles (/app/src/removeDefaultValues.js:76:10) at /app/src/removeDefaultValues.js:78:24 at Array.forEach () at findProfiles (/app/src/removeDefaultValues.js:76:10) (Use node --trace-warnings ... to show where the warning was created) (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.`

mdditt2000 commented 3 years ago

will look at this issue tomorrow

mdditt2000 commented 3 years ago

@v-zhuravlev-f5 is this the same issue as https://github.com/f5devcentral/f5-as3-config-converter/issues/23?

sschadwick commented 3 years ago

@mdditt2000 They look like the same issue, resolved in v1.12.0.

vtog commented 3 years ago

Just tested with v1.12.0, seeing same issue, and no output

❯ docker run --rm -v $PWD:/app/data/ f5-as3-config-converter:v1.12.0 -o data/clean-install.json -u data/clean-install.ucs 2021-05-25 21:05:24 INFO 175 BIG-IP objects detected total 2021-05-25 21:05:24 INFO 35 BIG-IP objects recognized by AS3 2021-05-25 21:05:24 INFO 22 BIG-IP objects supported by ACC 2021-05-25 21:05:24 INFO 9 AS3 stanzas generated (node:1) UnhandledPromiseRejectionWarning: Error: EACCES: permission denied, open 'data/clean-install.json' at Object.openSync (fs.js:476:3) at Object.writeFileSync (fs.js:1467:35) at module.exports (/app/src/main.js:124:8) at processTicksAndRejections (internal/process/task_queues.js:93:5) (Use node --trace-warnings ... to show where the warning was created) (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

mdditt2000 commented 3 years ago

@sschadwick @vtog is still seeing this issue on his ubuntu@jumpbox. I am going to create a issue in Jira

mdditt2000 commented 3 years ago

created CHARON-306 for PM tracking. No milestone at this time

sschadwick commented 3 years ago

My mistake, #23 and the issue @aheilmaier mentioned should be addressed in v1.12.0.

mdditt2000 commented 3 years ago

Setting milestone of 1.13 but cannot confirm until completed, however issue is in the queue

mdditt2000 commented 3 years ago

Resolved in ACC 1.13

vtog commented 3 years ago

Confirmed fix in my test environment.... Thanks!