stevedrummond
Hot Shot
Hot Shot

vRA 8 - ABX - on-prem FaaS fails to find uploaded dependencies

Jump to solution

Using on-prem vRA 8 and the on-prem FaaS provider for ABX fails trying to resolve node_modules dependencies that have been uploaded via zip. This works fine if you set the FaaS provider to AWS. Anyone have any workarounds or know if there is already an open issue for it? It's a critical issue as we cannot use AWS/Azure FaaS nor can we pull dependencies from npmjs.org (due to both proxy issues for ABX runtime and corporate policy).

Unlike looking in AWS at the created lambda function, I don't know where to go looking on the appliance to even start to see what's going wrong (e.g., is node_modules completely missing or is the abx_wrapper.js broken for on-prem, etc.)

Steps to reproduce:

Extensibility -> Action -> Create

Set language to nodejs and provider to on-prem

Set script source to "Import Package"

Upload zip (see attached, or create your own basic nodejs test)

Set main function to "index.handler" (or your main if you make your own)

Click Save and then click test

You should receive an error that it cannot find module "diagnostics" (or whatever module you are trying to 'require')

Appreciate any help!

Tags (3)
1 Solution

Accepted Solutions
stevedrummond
Hot Shot
Hot Shot

Updated Answer

Importing Python ABX was fixed in 8.0.1.

Importing nodejs ABX was fixed in 8.0.1 HF1.

View solution in original post

0 Kudos
12 Replies
stevedrummond
Hot Shot
Hot Shot

An update for anyone interested.

I had a look in the container that ABX deploys on the appliance. It renames the function entry point script (for reasons?) and has failed to upload any other scripts, folders or dependencies (node_modules in this case). Updating the container and committing a new image (as latest) doesn't work unfortunately, and the deployed containers have rootfs as read only.

I have raised an issue with GSS and will report back on any fixes/workarounds.

0 Kudos
sanchezs
VMware Employee
VMware Employee

Hi stevedrummond​,

Have you checked the instructions from here: Create a ZIP package for Node.js runtime extensibility actions ?

ABX modifies the entrypoint to wrap the original code with some extra code to handle some ABX logic (preparing special inputs, handling outputs and so on).

I hope that helps.

Sergio

0 Kudos
stevedrummond
Hot Shot
Hot Shot

Hey sanchezs​,

Yep, I've checked those instructions.

As I mentioned in the original post, its working with AWS lambda (which does not rename the main script), though do use different abx_wrapper.js scripts

cheers

steve.

0 Kudos
radostin
VMware Employee
VMware Employee

Hi stevedrummond,

It appears this a bug related to a ZIP with NodeJS runtime. We are going to fix it for vRA 8.0.1.

Regards,

Rado

0 Kudos
stevedrummond
Hot Shot
Hot Shot

Hey radostin​,

Thanks for the update, and it's great to hear that a fix will be coming by 8.0.1.

Is nodejs used to build the python containers as well? I just tested an on-prem FaaS Python ABX through zip import and it has the same behaviour. None of the additional files in my zip are uploaded and requirements.txt is blank.

cheers

steve

0 Kudos
craigso
Enthusiast
Enthusiast

Could you elaborate how to you browsed the container on the appliance? This could be pretty handy for troubleshooting and I can't seem to find any documentation on it.

0 Kudos
stevedrummond
Hot Shot
Hot Shot

Updated Answer

Importing Python ABX was fixed in 8.0.1.

Importing nodejs ABX was fixed in 8.0.1 HF1.

View solution in original post

0 Kudos
stevedrummond
Hot Shot
Hot Shot

Use "docker list images" and "docker ps | grep" to find the right container. Then use "docker exec" to run a command or connect interactively, or "docker run" if you want to deploy a separate container to the ABX one.

stevedrummond
Hot Shot
Hot Shot

For anyone interested the issue was fixed for Python ABX in 8.0.1

Unfortunately nodejs wound up even more broken. I have an SR open that Engineering have confirmed a fix is "coming".

I'll provide another update later.

0 Kudos
craigso
Enthusiast
Enthusiast

Hi stevedrummond​,

Do you if there is any published documentation which explains how to correctly package a python dependency for import into vRA 8? or do you have an example zip? I looked at the one you posted for nodeJS and your infoblox offline example, but I couldn't make heads or tails of it.

Thanks,

Craig

0 Kudos
craigso
Enthusiast
Enthusiast

I did a bit more digging and found this doc: Create a ZIP package for Python runtime extensibility actions

I'm going to give that procedure a go. Can you confirm this is the process you followed?

0 Kudos
stevedrummond
Hot Shot
Hot Shot

I didn't, I just made a package; at a quick glance it should be enough to get you started.

It should be noted you do not need to use a Linux shell, unless you require dependencies that are compiled (like netifaces which is a common package). Of course your best bet is to be using containers for creating and testing your package anyway.

0 Kudos