You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Ash Berlin-Taylor (JIRA)" <ji...@apache.org> on 2019/07/01 16:35:00 UTC
[jira] [Resolved] (AIRFLOW-4577) Azure Container Instances
Operator: Volumes
[ https://issues.apache.org/jira/browse/AIRFLOW-4577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ash Berlin-Taylor resolved AIRFLOW-4577.
----------------------------------------
Resolution: Fixed
Fix Version/s: 1.10.4
> Azure Container Instances Operator: Volumes
> -------------------------------------------
>
> Key: AIRFLOW-4577
> URL: https://issues.apache.org/jira/browse/AIRFLOW-4577
> Project: Apache Airflow
> Issue Type: Bug
> Components: operators
> Affects Versions: 1.10.3
> Reporter: Jonas
> Assignee: Asgeir Berland
> Priority: Major
> Fix For: 1.10.4
>
>
> Hi There,
> in my DAG File with an Azure Container Instances Operator i got an error after execution:
>
> {code:java}
> [2019-05-27 14:42:04,184] {{logging_mixin.py:95}} INFO - [2019-05-27 14:42:04,184] {{log.py:114}} INFO - ebf40d8d-89ca-4fda-8d21-116918844e82 - TokenRequest:Getting token with client credentials.
> [2019-05-27 14:42:04,306] {{__init__.py:1580}} ERROR - __init__() takes 1 positional argument but 4 were given
> Traceback (most recent call last):
> File "/usr/local/lib/python3.6/site-packages/airflow/models/__init__.py", line 1441, in _run_raw_task
> result = task_copy.execute(context=context)
> File "/usr/local/lib/python3.6/site-packages/airflow/contrib/operators/azure_container_instances_operator.py", line 157, in execute
> volume_mounts.append(VolumeMount(mount_name, mount_path, read_only))
> TypeError: __init__() takes 1 positional argument but 4 were given
> {code}
>
>
> My DAG File looks like:
>
> {code:java}
> aci_run = AzureContainerInstancesOperator(
> task_id='aci_run',
> ci_conn_id='azure_container_instances_default',
> registry_conn_id=None,
> resource_group='man-ano',
> name='aci-test-{{ ds }}',
> image='alfpark/batch-shipyard:latest-cli',
> region='Westeurope',
> environment_variables={},
> volumes=[('wasb_default', 'modelv19141447271', 'airflow-azure-batch-shipyard', '/mnt/azfile/', False),],
> memory_in_gb=2.0,
> cpu=1.0,
> command=['ls', '/mnt/azfile/config-gpu'],
> # command=['/opt/batch-shipyard/shipyard.py', '--version'],
> dag=dag
> )
> {code}
>
>
> I also fixed the Bug. I´ve seen that in file 'airflow/contrib/operators/azure_container_instances_operator.py' in line 157 something is missing:
> Instead of:
>
> {code:java}
> volume_mounts.append(VolumeMount(mount_name, mount_path, read_only))
> {code}
> I think the line has to be following:
> {code:java}
> volume_mounts.append(VolumeMount(name=mount_name, mount_path=mount_path, read_only=read_only))
> {code}
> After i changed the line everything works as expected
>
> BG
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)