David Jarmoluk
10/25/2023, 1:48 PMaz container create \
--resource-group data-non-production \
--name prefect-agent-test \
--image prefecthq/prefect:2-python3.10 \
--secure-environment-variables PREFECT_API_URL='<https://api.prefect.cloud/api/accounts/XXXXXX/workspaces/XXXXXX>' PREFECT_API_KEY='XXXXXX' \
--command-line "/bin/bash -c 'pip install adlfs s3fs requests pandas; prefect agent start -p default-agent-pool -q test'"
In all cases, the container goes into a waiting state and no work pool is created. I get different log results, but nothing that is useful.
I'm sure this is more of an Azure thing, but hoping someone can chime in and tell me that I'm doing something obviously wrong.Kevin Grismore
10/25/2023, 3:13 PMDavid Jarmoluk
10/25/2023, 3:48 PMKevin Grismore
10/25/2023, 3:52 PMprefect worker start --pool 'my-work-pool' --type azure-container-instance
, leaving out the pip installation steps just to eliminate any other potential causes hereDavid Jarmoluk
10/25/2023, 6:03 PMprefect worker start
command locally, and it spins up a local worker that is visible in Prefect.
But when I try to run it on the Azure container as part of the container create command, I get similar results as before. Without the pip install line, the returned status shows the instance starts, but then gets killed. It says ERROR, but doesn't provide any detail.
This is the full command I ran:
az container create \
--resource-group data-non-production \
--name prefect-agent-test \
--image prefecthq/prefect:2-python3.10 \
--secure-environment-variables PREFECT_API_URL='<https://api.prefect.cloud/api/accounts/XXXXXX/workspaces/XXXXXXX>' PREFECT_API_KEY='XXXXX' \
--command-line "/bin/bash -c 'prefect worker start --pool 'my-test-pool' --type azure-container-instance'"
I'm not sure if this is related, but I also tried to stand up a new Azure container via the Azure Console using the prefecthq/prefect:2-python3.10
image. I did not include any command line args when spinning up the instance via the console. If you look at the log from screenshot I sent earlier, you'll see a tini WARN
message. Sometime after this, the container was killed.Kevin Grismore
10/26/2023, 1:30 PMmy-test-pool
?
-command-line "/bin/bash -c 'prefect worker start --pool my-test-pool --type azure-container-instance'"
David Jarmoluk
10/27/2023, 5:55 PM