Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pod stuck in ContainerCreating state with no logs or errors when running a job #26032

Open
csvlrs-lak opened this issue Nov 20, 2024 · 0 comments
Labels
deployment: k8s Related to deploying Dagster to Kubernetes type: bug Something isn't working

Comments

@csvlrs-lak
Copy link

csvlrs-lak commented Nov 20, 2024

What's the issue?

When triggering a run for the below Dagster asset job, the Kubernetes pod remains stuck in the ContainerCreating state indefinitely.

What did you expect to happen?

The pod should transition from ContainerCreating to Running and execute the job successfully.

How to reproduce?

  1. Define the job using the provided code sample.
  2. Trigger a job run manually or via the schedule.(pvc:mypvc is available in the namespace )
  3. Observe the pod state.
import pandas as pd
from dagster import asset, AssetIn, define_asset_job, ScheduleDefinition, DefaultScheduleStatus, AssetKey, AssetSelection, job
import time

@asset(group_name="check", key_prefix="check")
def Assest_1():
    return 0

check_job = define_asset_job(
    "check_job",
    selection=AssetSelection.keys(
        *[AssetKey(["check", node["id"]]) for node in [{'id': 'Assest_1'}]]
    ),
    tags={
        "dagster-k8s/config": {
            "container_config": {
                "volumeMounts": [
                    {
                        "name": "data-volume",
                        "mountPath": "/mnt/data"
                    }
                ]
            },
            "pod_spec_config": {
                "volumes": [
                    {
                        "name": "data-volume",
                        "persistentVolumeClaim": {
                            "claimName": "my-pvc"
                        }
                    }
                ],
                "affinity": {
                    "node_affinity": {
                        "required_during_scheduling_ignored_during_execution": {
                            "nodeSelectorTerms": [
                                {
                                    "matchExpressions": [
                                        {
                                            "key": "poolname",
                                            "operator": "In",
                                            "values": ["agentpool"]
                                        }
                                    ]
                                }
                            ]
                        }
                    }
                }
            },
        }
    }
)

check_schedule= ScheduleDefinition(
    job=check_job,
    cron_schedule="30 22 * * *",
    default_status=DefaultScheduleStatus.RUNNING
)

Dagster version

1.9.2

Deployment type

None

Deployment details

No response

Additional information

No response

Message from the maintainers

Impacted by this issue? Give it a 👍! We factor engagement into prioritization.
By submitting this issue, you agree to follow Dagster's Code of Conduct.

@csvlrs-lak csvlrs-lak added the type: bug Something isn't working label Nov 20, 2024
@garethbrickman garethbrickman added the deployment: k8s Related to deploying Dagster to Kubernetes label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment: k8s Related to deploying Dagster to Kubernetes type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants